<< All versions
Skill v1.0.1
currentAutomated scan100/100lichtblick-suite/lichtblick/panel-state-transitions
+3 new
──Details
PublishedAugust 25, 2026 at 11:36 PM
Content Hashsha256:ca536477e121c056...
Git SHA355014d99402
Bump Typepatch
──Files
Files (1 file, 2.8 KB)
SKILL.md2.8 KBactive
SKILL.md · 73 lines · 2.8 KB
version: "1.0.1" name: "panel-state-transitions" description: "Deep StateTransitions panel knowledge: TimeBasedChart segments, message-path extraction, preloaded-range subscription with 250ms batch flush, block+currentFrame merge, and messagesToDataset."
Panel State Transitions Skill
A timeline visualization for discrete state changes extracted from messages.
Structure
panels/StateTransitions/├── index.tsx # main panel, TimeBasedChart usage, message-path config├── messagesToDataset.ts # message → Chart.js dataset (perf-critical)└── hooks/├── useDecodedMessageRange.ts # preloaded-range subscription, 250ms batch flush└── useStateTransitionsData.ts # merges preloaded blocks + current frame
Data Flow
- User configures message paths (e.g.
/robot/state.mode) useDecodedMessageRangesubscribes to preloaded blocks for those paths- Messages arrive in batches (250ms flush interval)
messagesToDatasetextracts discrete values and builds chart segmentsuseStateTransitionsDatamerges block data with live current-frame dataTimeBasedChartrenders colored segments on a timeline
messagesToDataset (Performance Critical)
typescript
function messagesToDataset(messages: MessageEvent[], path: MessagePath): ChartDataset {// iterate all messages, extract value at path// create segment boundaries at state-change points// return { data: [{ x: startTime, x2: endTime, y: stateLabel }] }}
Runs on every data update — must stay fast for large datasets.
250ms Batch Flush
useDecodedMessageRange debounces:
- Accumulates incoming messages for 250ms
- Triggers a single state update with the full batch
- Prevents a React re-render per message — critical for topics with thousands of preloaded messages
TimeBasedChart
Shared chart component (also used by other panels):
- Time on the X-axis, discrete values on the Y-axis
- Supports multiple series (each path = a row)
- Zoom/pan synchronized with global playback time
- Colored segments represent distinct state values
Performance Notes
- 250ms batch flush prevents render storms from high-frequency messages
messagesToDatasetisO(n)per path — keepnbounded (downsample if needed)- Avoid re-processing already-processed blocks during the block + currentFrame merge
- Message-path parsing is cached (nearley grammar not re-parsed)
Key Files
packages/suite-base/src/panels/StateTransitions/index.tsxpackages/suite-base/src/panels/StateTransitions/messagesToDataset.tspackages/suite-base/src/panels/StateTransitions/hooks/useDecodedMessageRange.tspackages/suite-base/src/panels/StateTransitions/hooks/useStateTransitionsData.ts
Skills Reference
- For message-path syntax and extraction: load
message-pathskill