Skip to content

Workbench Data Flow module — Marey timeline + Access Matrix (closes #327) - #328

Merged
nockawa merged 2 commits into
mainfrom
feature/327-data-flow
May 10, 2026
Merged

nockawa merged 2 commits into
mainfrom
feature/327-data-flow

Conversation

@nockawa

@nockawa nockawa commented May 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the Data Flow Timeline (Marey-style: data tracks on Y, tick time on X, system runs as coloured bars) and Access Matrix (system × data heatmap) Workbench panels per claude/design/workbench/modules/14-data-flow.md, plus the engine-side telemetry that feeds them. Sibling to the System DAG (data-first vs. scheduler-first); both panels ship and cross-link.

Closes #327.

Phases shipped

  • Phase A — Engine + wire — ArchetypeAttribute.Alias, new [ComponentFamily] + ComponentFamilyResolver, SchedulerSystemArchetypeEvent gated by TelemetryConfig.SchedulerArchetypeTouchesActive (default true), extended TopologyDto (Archetypes / ComponentTypes / ComponentFamilies), new track families on the existing /data/track/{id} route (archetype/<label>, system-archetype/<sys>/<arch>, component-family/<name>).
  • Phase B — Data Flow Timeline — uPlot-backed multi-row Marey chart in normalized [0, 1] phase-space, single-tick replay on the dominant tick, full L0–L4 granularity with D9 auto-fallback + auto-promote, 3 X-axis modes (uniform / equal / log), 3 aggregation modes (replay / p5–p95 envelope / per-(track, phase) density heatmap), phase header strip with click-cycle collapse + D10 auto-collapse <5%, hatched per-row gap waits + phase-fence waits, mouse-wheel zoom anchored at cursor + middle-click reset + F-key fit, hover-to-isolate, inline system-name labels inside bars, hover tooltip with §11.3 contract content, "?" help overlay gated by L-key legends-visible flag.
  • Phase C — Access Matrix — virtualised CSS Grid + TanStack Virtual, sticky phase headers, sortable rows/columns, full L0–L4 granularity.
  • Phase D — Cross-panel — useSelectionStore extended (dataTrack, phase, hoveredSystemTickKey), bidirectional bridges between Data Flow / Access Matrix / System DAG, lifted gatingAnalysis to @/lib/dag/ shared via useGatingStore.

Drive-by fixes (in this PR)

  • AntHill ProfilerSetup.BuildSessionMetadata now derives thin ArchetypeRecord[] / ComponentTypeRecord[] from the rich definitions (was passing [], [], leaving the Workbench's topology empty).
  • Workbench TraceSessionRuntime.ProjectHeaderAndTables falls back to the v7 rich definitions when the thin tables are empty — backward-compat for older AntHill traces.
  • DagScheduler.SystemEndCallback now fires for parallel-query systems too (was only callback-systems).
  • TraceFixtureBuilder.BuildTraceWithArchetypeTouches — new fixture variant (binary-encoded SchedulerSystemArchetype events) that drives the Playwright bar-click + hover canary cases.

Test plan

  • dotnet test test/Typhon.Engine.Tests/... — green
  • npx vitest run (Workbench client) — 514 / 514 green (+18 new tests for applyPhaseCollapse, tickOffsetToNormalizedX, buildEnvelopeBars, buildDensityCells)
  • npx tsc --noEmit — clean
  • npx playwright test e2e/data-flow.spec.ts — 5 / 5 green (the previously test.fixme()'d bar-click + hover cases now pass against the new fixture variant)
  • Manual sweep: AntHill trace open → Replay / Envelope / Density modes, wheel-zoom + middle-reset + F-fit, phase header click-collapse, hover tooltip, "?" help overlay, L key toggle

🤖 Generated with Claude Code

nockawa added 2 commits May 9, 2026 21:25
…y-style timeline panel (closes #327)

Phase A: SchedulerSystemArchetypeEvent + cache fold + 3 new track families. Phase B: timeline panel, L0–L4 granularity, hover-isolate, click-to-select.
@nockawa
nockawa merged commit 7741eef into main May 10, 2026
6 checks passed
@nockawa
nockawa deleted the feature/327-data-flow branch May 10, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workbench Data Flow module — Marey-style timeline + Access Matrix

1 participant