Skip to content

V2 Loom 01–02: render a horizontal execution field with one shared loaded-page replay cursor #1100

Description

@ScriptedAlchemy

Target and branch safety

Implement the accepted Follow loaded tail and Temporal replay states as one real, read-only Loom surface. Any implementation PR targets codex/tracedecay-total-redesign-plan-reopened; #707 stays DRAFT and unmerged. Renderer qualification is tracked in #1099. Layout/state/DOM work can proceed independently; do not hard-wire an unqualified production renderer.

Source review: product dd002654eb9ccc277eda0f9f4fe87ef1e6f0a660; demo 87e14dcd1026e63390233f56c795accee81b351e. This is a source-to-brief gap analysis, not a pixel comparison or executed browser/test report. Recheck current signatures before editing.

Exact plates and requirements

Primary images in ScriptedAlchemy/td-brain-demo:

  • lookbook/pngs/03-loom/final/01-follow-loaded-tail.png
  • lookbook/pngs/03-loom/final/02-temporal-replay.png

The complete individual briefs are available in the product mirror:

Follow lookbook/IMPLEMENTATION.md sections Deterministic temporal layout, Semantic zoom, replay, and addressability, and Loom final-state implementation map. Time is horizontal. Agent/subagent/workstream hierarchy provides deterministic branch placement. Visible relations require source evidence. Luminous depth and curved execution paths are the target, not an admin table restyled as a timeline; the exact DOM fallback remains first-class.

Verified current implementation

  • LoomPage.tsx reads generated LoomTemporalPayloadV1 from project-scoped /api/loom/temporal?limit=200, plus the LCM timeline. It builds a session weave and joins selected provider/session identities to persisted commit, edited-file, and branch/worktree rows. Preserve these real authorities and their separate coverage/freshness/watermark states.
  • WeaveCanvas.tsx is actually SVG, with time mapped to Y, host columns across X, and packed session marks. Its zoom/pan/fit behavior is useful, but it does not implement the target horizontal event/branch field.
  • ThreadPlayback.tsx owns a cursor inside the selected session's loaded LCM transcript. LoomPage's primary weave and thread table do not consume that cursor. Selection is local React state; the inspected path has no shared URL-addressable scene/reveal state.
  • playback.ts already initializes at the latest loaded frame with followLive: true and playing: false, preserves stable event identity across refetches, and suspends following on seek. Initial tail-follow is not a missing behavior. Paused presentation and tracking the loaded tail are distinct. Its step speed is explicitly presentation pacing, not recorded elapsed time.
  • The demo's src/loom/{LoomPage,WeaveField}.tsx and packScenes.ts illustrate state composition, horizontal geometry, and pack-selected events. They use bundled pack identities and page-owned scene state; they are not the product's generated, freshness-qualified read path. Do not copy pack rows or frontend evidence-grade assignment into production.

Smallest implementation sequence

  1. Own one scene/replay state at the existing Loom composition boundary. Keep selected stable event ID, explicit loaded-tail/inspection/replay mode, cursor, filters, semantic zoom, and focused/expanded branch state synchronized with the existing URL/scope machinery. Do not add another router or global rail.
  2. Derive one visible model from admitted source records and that cursor. The scene, hit-testing, keyboard event list, accessible tree/table, and replay evidence pane consume the same reveal boundary. Future event bodies, labels, relation details, and inferred outcomes must not leak through an inspector or fallback while hidden on the canvas. Clearly labelled withheld counts can remain, as the brief permits.
  3. Build deterministic horizontal geometry independent of the renderer. X uses recorded timestamp or explicitly qualified source sequence; null/ambiguous time stays in an undated/ambiguous representation. Do not synthesize timestamps or globally order unrelated source-local ordinals. Y follows evidenced hierarchy; missing parent/handoff/rejoin evidence remains a typed gap. Preserve stable coordinates within a projection revision and across renderer changes; no force simulation.
  4. Compose a bounded production read, not a new truth store. Reuse the existing generated contract/envelope/query ladder. Audit available generated relations before adding anything. Where a required relation genuinely is not served, extend its Rust authority and crates/tracedecay-dashboard-api/src/contract_schema.rs, regenerate dashboard/src/contracts/generated.ts, and show unavailable until it is composed. No handwritten parallel wire DTO, path-resemblance join, or browser-created certainty.
  5. Mount the winning shared scene adapter from V2 UI: qualify one shared luminous scene runtime against Brain 01–05 and Loom 01–02 #1099 in the visualization layer. React owns the temporal controls and exact evidence. Screen-space overlays own the ruler/cursor/selection. Revision-tagged worker output handles large-history lanes, bundles, culling, and label priority without assigning truth. This is not accomplished by rotating the existing SVG or adding glow to rectangles.

The first scoped PR can establish the pure model, shared state/reveal behavior, and synchronized DOM tests. It must not claim finished plate fidelity until the scene integration and captures are reviewed. Full Delivery joins, feedback writes, provider mutations, and a fourteen-surface reskin are outside this slice.

Loaded-tail and replay invariants

  • FOLLOW LOADED TAIL and RETURN TO LOADED TAIL refer only to the newest event actually loaded and admitted. NOW is not a live-stream, complete-history, or provider-coverage claim. Feed, pagination, source bounds, and freshness stay visible beside the transport.
  • Pan into history, seek, or select older evidence suspends following without rewriting the loaded endpoint. Refetch while paused preserves stable selection when retained; removed/off-page identities are disclosed rather than silently relabelled as a neighbor. An explicit return resumes tail tracking.
  • Reveal a spawn, handoff, or rejoin only when its supporting record is within the reveal boundary. Endpoint proximity does not create an edge. Future nodes are withheld, not dimmed as if already known.
  • Distinguish source timestamp replay from ordinal presentation stepping. Null timestamps remain null; changing playback speed must not invent elapsed time.
  • Keep EXACT/EXPLICIT/INFERRED/AMBIGUOUS/STALE/UNAVAILABLE and source class separate. No reconstruction of private reasoning, stale-as-fresh fallback, expanded timeout, or synthetic-as-real evidence.

Acceptance tests and review evidence

Extend the existing playback.test.ts, LoomPage.dom.test.tsx, and applicable canvas/layout tests instead of replacing the entire suite.

  • A retained page plus appended records follows only in follow mode; paused selection survives refetch; page removal/compaction and missing boundaries remain explicit.
  • Seeking before a future event removes its content and relation from scene picking, inspector, and exact fallback together; stepping forward reveals the same stable source ID everywhere.
  • Identical projection revision and view inputs produce identical lane, curve, bundle, and minimap coordinates; obsolete worker jobs cannot commit.
  • Pointer and keyboard selection resolve the same provider-qualified source identity. Cross-workspace pivots preserve supported project/time/selection context.
  • Partial, stale, unavailable, undated, truncated, empty, and transport-failure states remain distinct. Do not claim the current 200-session query is a complete execution history or a 20k qualification.
  • Verify 5k/20k event and 100+ agent density through reconciled bundles and virtualized exact rows, with actual measurements under V2 UI: qualify one shared luminous scene runtime against Brain 01–05 and Loom 01–02 #1099. Do not allocate a permanent visible lane/DOM row per agent at overview scale.
  • Review actual 01/02 runtime captures at 1440/768/320 CSS pixels, 200% zoom, reduced motion, and renderer failure. Controls and evidence reflow; static mode retains chronology, selection, grade, and direction.

Report executed commands, source revision, browser/device, data provenance, and capture paths. A test-only DOM fallback or demo screenshot is not completion of the accepted luminous execution canvas.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions