feat(stagecraft): the studio's work-item page, /w/<key> (swamp-club #2944) #441

Merged
seth merged 1 commit from cue/2944-stagecraft-studio-work into main 2026-10-02 16:04:57 +00:00
Owner

Adds the studio's work-item page at /w/<key>. It shows one work item on the graph of the definition it pinned: where it is now, how it got there, and what it is waiting on. This is the studio's version of the Lab's per-issue lifecycle view. swamp-club #2944.

What it shows

  • Graph, drawn on the definition the item pinned:
    • how many times it entered each stage in this era;
    • the exits it took, drawn solid with a count, the rest faint;
    • the current stage glowing, and stages it never entered dimmed.
  • Older-definition notice, when the item is pinned to an older definition than the factory's file.
  • Now: what the item is waiting on, in the same words status prints:
    • a person's decision, and which gates;
    • evidence a person records;
    • the stage's dispatch;
    • parked at the dispatch cap;
    • each exit's readiness with the engine's reasons, and how long it has been in this stage.
  • Timeline: the journal. ↑/↓ move through it, and Enter selects that entry's stage on the graph.
  • Metrics: Simulate's panel, on the real run.
  • Tracker: the ticket as its tracker last recorded it, with a link and its relations (parent, blocked by, duplicate). Read from local records, with no network call.
  • Copy reference, and Copy as scenario. The scenario is replayed on the pinned definition, and the page says whether it ends where the real run is. Anything a scenario can't carry is listed as a note.
  • Getting there: a Board card, the address /w/<key>, or the bar's "go to work item" key box. The page updates live as the agent moves the item.

How

  • GET /api/work-items/<key> (studio_work_item.ts) returns:

    • the run;
    • the pinned definition at the version the run names, checked by digest;
    • the status, plus the exit readiness it was built from;
    • the ticket.

    ?payloads=1 adds the product payloads, which only Copy as scenario needs. A key that isn't a valid name, or that no work item has, gets a 404 before any query. Only keys that exist get a live-update poll. The response type is in studio_item_types.ts, which imports types only.

  • status_view.ts: the pure part of the status method, now shared by the method and the route. What status prints is unchanged.

  • Builds on #2943's pieces: the routing, the shared read helper (this adds readRun and exports pinnedByVersion) and the poll, which now also sends { kind: "work-item", key }.

  • Page: the graph, the overlay and the Run/Journal/Metrics frame now follow whichever view is open.

Testing

  • Unit tests: the reader, the server route, the page logic (on runs produced by playing saved scenarios) and the page state.
  • Integration test against real swamp:
    • an item that looped through review and is waiting on a person;
    • both versions of its stored payload;
    • the older-definition check, in both directions;
    • unknown and invalid keys;
    • the live-update event;
    • the page served at /w/<key>.
  • Headless Chromium: rendering, keyboard navigation, contrast (every new text element at least 5.89:1), and the live update.
  • Verification: verify-build and verify-reviews ran on this commit, and the attestation is posted. Non-blocking review findings are filed as swamp-club #2956.

🤖 Generated with Claude Code

Adds the studio's work-item page at `/w/<key>`. It shows one work item on the graph of the definition it pinned: where it is now, how it got there, and what it is waiting on. This is the studio's version of the Lab's per-issue lifecycle view. swamp-club #2944. ## What it shows - **Graph**, drawn on the definition the item pinned: - how many times it entered each stage in this era; - the exits it took, drawn solid with a count, the rest faint; - the current stage glowing, and stages it never entered dimmed. - **Older-definition notice**, when the item is pinned to an older definition than the factory's file. - **Now**: what the item is waiting on, in the same words `status` prints: - a person's decision, and which gates; - evidence a person records; - the stage's dispatch; - parked at the dispatch cap; - each exit's readiness with the engine's reasons, and how long it has been in this stage. - **Timeline**: the journal. ↑/↓ move through it, and Enter selects that entry's stage on the graph. - **Metrics**: Simulate's panel, on the real run. - **Tracker**: the ticket as its tracker last recorded it, with a link and its relations (parent, blocked by, duplicate). Read from local records, with no network call. - **Copy reference**, and **Copy as scenario**. The scenario is replayed on the pinned definition, and the page says whether it ends where the real run is. Anything a scenario can't carry is listed as a note. - **Getting there**: a Board card, the address `/w/<key>`, or the bar's "go to work item" key box. The page updates live as the agent moves the item. ## How - **`GET /api/work-items/<key>`** (`studio_work_item.ts`) returns: - the run; - the pinned definition at the version the run names, checked by digest; - the status, plus the exit readiness it was built from; - the ticket. `?payloads=1` adds the product payloads, which only Copy as scenario needs. A key that isn't a valid name, or that no work item has, gets a 404 before any query. Only keys that exist get a live-update poll. The response type is in `studio_item_types.ts`, which imports types only. - **`status_view.ts`**: the pure part of the `status` method, now shared by the method and the route. What `status` prints is unchanged. - **Builds on #2943's pieces**: the routing, the shared read helper (this adds `readRun` and exports `pinnedByVersion`) and the poll, which now also sends `{ kind: "work-item", key }`. - **Page**: the graph, the overlay and the Run/Journal/Metrics frame now follow whichever view is open. ## Testing - **Unit tests**: the reader, the server route, the page logic (on runs produced by playing saved scenarios) and the page state. - **Integration test against real swamp**: - an item that looped through review and is waiting on a person; - both versions of its stored payload; - the older-definition check, in both directions; - unknown and invalid keys; - the live-update event; - the page served at `/w/<key>`. - **Headless Chromium**: rendering, keyboard navigation, contrast (every new text element at least 5.89:1), and the live update. - **Verification**: verify-build and verify-reviews ran on this commit, and the attestation is posted. Non-blocking review findings are filed as swamp-club #2956. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(stagecraft): the studio's work-item page, /w/<key> (swamp-club #2944)
All checks were successful
CI / Review Integrity (pull_request) Successful in 53s
CI / Validate Attestation (pull_request) Successful in 1m11s
c19caca6f4
One work item on the graph of the definition it pinned: visit counts for
this era, the exits it took, where it is and what it waits on in status's
own words, its journal as a timeline (an entry selects its stage), Metrics
on the real run, its ticket and relations from the tracker's records, Copy
reference, and Copy as scenario with a replay check on the pinned
definition. A notice says when the pin is older than the factory's file;
the page reads the item again when it changes.

- GET /api/work-items/<key> (studio_work_item.ts): run, pinned definition,
  product payloads checked by digest, status and the readiness it was built
  from, and the ticket. Unsafe or unknown keys are 404 before any query.
- status_view.ts: the pure part of status, shared by the status method
  (output unchanged) and the route.
- Builds on swamp-club #2943's routing, read helper (adds readRun) and poll
  ({ kind: "work-item", key }).
- The graph, nav, overlay and the Run/Journal/Metrics frame follow the
  view; a key box in the bar opens /w/<key>.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
seth merged commit 0878be7c65 into main 2026-10-02 16:04:57 +00:00
seth deleted branch cue/2944-stagecraft-studio-work 2026-10-02 16:05:13 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
swamp-club/swamp-extensions!441
No description provided.