Deep RawMessages panel knowledge: legacy (react-json-tree) vs virtual (@tanstack/react-virtual) implementations, flattenTreeData, TreeNode shape, expansion-state management, shared logic hook, and diff mode.
74%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.github/skills/panel-raw-messages/SKILL.mdMessage-inspection panels that display structured message data as expandable trees. There are two implementations sharing one logic/diff core.
Both registered in packages/suite-base/src/panels/index.ts:
panelType: "RawMessages" — legacy (react-json-tree <Tree>, full DOM render of expanded nodes)panelType: "RawMessagesVirtual" — performant (@tanstack/react-virtual windowed rendering)Shared code lives in panels/RawMessagesCommon/:
types.ts (TreeNode, NodeState, configs, props)constants.ts (PATH_NAME_AGGREGATOR, CUSTOM_METHOD, PREV_MSG_METHOD)useSharedRawMessagesLogic.ts (topic resolution, expansion state)useRenderers.ts, getDiff.ts, Value.tsx, getValueActionForValue.ts, utils.ts, …const virtualizer = useVirtualizer({
count: flatData.length,
getScrollElement,
estimateSize: () => fontSize ?? DEFAULT_FONT_SIZE, // 12px
overscan: SCROLLL_OVERSCAN, // 5
measureElement: (el) => el.getBoundingClientRect().height,
useAnimationFrameWithResizeObserver: true,
});Key constants: ROW_HEIGHT 24px, TREE_NODE_INDENTATION 16px/level, DEFAULT_FONT_SIZE 12px,
SCROLLL_OVERSCAN 5.
Converts a nested object → flat TreeNode[] for virtualization:
function flattenTreeData(
data: unknown,
expandedNodes: Set<string>,
parentPath?: string,
depth?: number,
keyPath?: (string | number)[],
): TreeNode[]null, non-objects, and ArrayBuffer.isView values (typed arrays like point-cloud buffers)PATH_NAME_AGGREGATOR in reverse order (child~|~parent)type TreeNode = {
key: string; // unique path string, e.g. "x~|~position~|~pose"
label: string; // display name, e.g. "x"
value: unknown;
depth: number; // nesting level for indentation
isExpandable: boolean;
keyPath: (string | number)[];
parentPath: string;
};useSharedRawMessagesLogic manages expansion: "all" | "none" | Record<string, NodeState>RawMessagesVirtual converts it to Set<string> via useMemo
"all" → all possible paths (recursive generateDeepKeyPaths)"none" → empty setstate === NodeState.ExpandedtoggleExpansion() flips a node Expanded ↔ CollapsedgetDiff() — compares baseItem (current topic) vs diffItem (another topic or
the previous message)CUSTOM_METHOD diffs against a different topic path; PREV_MSG_METHOD against the prior messagepackages/suite-base/src/panels/RawMessages/packages/suite-base/src/panels/RawMessagesVirtual/packages/suite-base/src/panels/RawMessagesCommon/message-path skilllichtblick-suite/lichtblick
9589f38
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.