Skip to content

Add progressive artifact reveal to catwalk demo replay #259

Description

@williamthorsen

Problem

When the catwalk scene loads, all artifacts render immediately — inputs, outputs, and summary deliverables appear at once. In a demo or replay, artifacts should appear progressively as the orchestrator advances through stations and delivers outputs to recipients.

Three underlying issues prevent this:

  1. Eager input derivation: buildInputArtifacts derives all input artifacts regardless of orchestrator position, so outputs and their derived inputs appear in the same diff with no delivery animation.
  2. Wrong delivery target: The delivery choreography targets artifacts at the origin station instead of the destination, landing them at the wrong station.
  3. No backward path: The scene can only move forward — there's no rebuild path when the demo restarts or steps backward.

Considerations

  • The Polish catwalk M3: chute alignment, error visibility, and mapper test gap #239 catwalk layout work added input artifact propagation and summary station collection, roughly tripling the artifact count for completed runs.
  • The demo system currently models recordings as { header: RunHeader, events: RunEvent[] } and folds events into snapshots on every tick — an unnecessary indirection.
  • The non-catwalk visualizations (factory scene, flow diagram) are unused and can be removed.
  • CatwalkCanvas.tsx imports GameCanvas.css directly, so deleting GameCanvas.tsx requires renaming the CSS file to avoid breaking canvas styles.
  • Task 4 (choreographer delivery fix) depends on Task 2 (mapper deferral) for integration testing, since the new delivery filter only matches deferred inputs. Unit tests can be written independently.

Solution

  • Remove non-catwalk visualizations. Strip the visualization switcher, factory scene, and flow diagram. Render CatwalkCanvas directly from App.tsx.
  • Defer input derivation in mapper. buildInputArtifacts only derives inputs for stations the orchestrator has reached. Inputs appear in the diff exactly when the orchestrator moves to their station, producing the co-occurrence signal the choreographer needs.
  • Add scene rebuild on artifact regression. updateStatus detects artifacts disappearing between configs and triggers a full clear + rebuild. Handles backward stepping and demo restarts.
  • Fix delivery choreography. Delivery targets are slot: 'input' artifacts at the destination station. Sequence: flying ascend from origin chute → orchestrator walks → flying descend at destination → static input fades in.
  • Simplify demo data model. Replace RunHeader + RunEvent[] with a flat CanonicalRunStatus[] snapshot sequence. PlaybackController becomes a snapshot stepper with fixed base interval (~1.5s at 1x) and minimum floor (~300ms).
  • Create curated demo recording. ~20–25 snapshots covering all animation types: orchestrator movement, artifact fade-in, delivery, gate opens, agent state changes, summary reveal.

Acceptance criteria

  • Artifacts appear only after their producing phase completes (or as the orchestrator arrives at the station)
  • Input artifacts at station N+1 appear after outputs at station N are visible — delivered by the orchestrator (ascend → walk → descend → land)
  • Summary station artifacts appear only when the run reaches completed status
  • Loading a completed run in non-replay mode still shows the final state immediately
  • Demo data is a flat CanonicalRunStatus[] snapshot sequence
  • Non-catwalk visualizations removed

Metadata

Metadata

Labels

featureAdded or improved external functionalityscope:factory

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions