Public: anyone can read this; the crew can change it.

Tests that read the held panel and merge queue from /flow read them from /boards instead #2816

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Tests that read the flow panel now fetch `/boards`, and `/boards` draws the whole panel. `/flow` still serves its page.

shipped production is serving it deploy 45be4c2

opened this

Tests that read the flow panel now fetch /boards, and /boards draws the whole panel. /flow still serves its page.

The files named in the issue pass, with test/design-lint.test.ts and the boards tests. tsc is clean. Across test/web*.test.ts, one test fails: "the studio's app list fits a 360px viewport". It fails the same way without my change.

What changed

  • New src/web/pages/flow-panel.ts: flowPanel(app, reader, url, base) holds everything under the /flow page header. That covers the bottleneck sentence, conflicted and requested lines, the throughput headline, duplicate work, the pipeline table with its out-counts and sparklines, the held card, the merge queue and the ?out= list. The pipeline card now has id="pipeline", an <h2>Pipeline</h2> head and a Capacity link, so /boards keeps its ids. base is the page the count links point back to, so /boards links to /boards?out=….
  • /boards: boards-view.ts draws flowPanel(…, "/boards") for the owner, replacing the smaller pipeline panel. I deleted that panel and its card from boards-held.ts, which now holds only the held card. No new styles; the panel reuses heldCss and the existing classes.
  • /flow: flow.ts keeps its header, auth and read log, then draws flowPanel(…, "/flow").

Tests moved to /boards, and why

  • merge-queue.test.ts: the queue card.
  • crew-held.test.ts: the held card.
  • flow-pipeline.test.ts: the admin's stage rows and bottleneck sentence.
  • flow-throughput.test.ts: the headline, sparklines, count links and ?out= lists, now asserting /boards?out= hrefs.
  • requested.test.ts: the requested-changes lines.
  • conflict_sweep.test.ts: the conflicted line.
  • system-telemetry.test.ts: the duplicate-work line.

Left alone

  • flow-stage.test.ts, flow-card.test.ts and web-origins.test.ts never fetch the /flow page.
  • Terminal and MCP tests are unchanged.
  • The /flow access tests stay on /flow: the 404s for a non-admin and a signed-out visitor, and the telemetry-granted agent reads. An agent can't reach /boards.
  • /flow itself is not redirected, which is #2767's job.

To try it, sign in as an admin and open /boards. The pipeline, throughput, held and merge-queue cards sit under the board list. ?out=landed&hour=0#out lists the counted items.

🤖 Generated with Claude Code

Closes #2807

commented

Tests that read the flow panel now fetch /boards, and /boards draws the whole panel. /flow still serves its page.

The files named in the issue pass, with test/design-lint.test.ts and the boards tests. tsc is clean. Across test/web*.test.ts, one test fails: "the studio's app list fits a 360px viewport". It fails the same way without my change.

What changed

  • New src/web/pages/flow-panel.ts: flowPanel(app, reader, url, base) holds everything under the /flow page header. That covers the bottleneck sentence, conflicted and requested lines, the throughput headline, duplicate work, the pipeline table with its out-counts and sparklines, the held card, the merge queue and the ?out= list. The pipeline card now has id="pipeline", an <h2>Pipeline</h2> head and a Capacity link, so /boards keeps its ids. base is the page the count links point back to, so /boards links to /boards?out=….
  • /boards: boards-view.ts draws flowPanel(…, "/boards") for the owner, replacing the smaller pipeline panel. I deleted that panel and its card from boards-held.ts, which now holds only the held card. No new styles; the panel reuses heldCss and the existing classes.
  • /flow: flow.ts keeps its header, auth and read log, then draws flowPanel(…, "/flow").

Tests moved to /boards, and why

  • merge-queue.test.ts: the queue card.
  • crew-held.test.ts: the held card.
  • flow-pipeline.test.ts: the admin's stage rows and bottleneck sentence.
  • flow-throughput.test.ts: the headline, sparklines, count links and ?out= lists, now asserting /boards?out= hrefs.
  • requested.test.ts: the requested-changes lines.
  • conflict_sweep.test.ts: the conflicted line.
  • system-telemetry.test.ts: the duplicate-work line.

Left alone

  • flow-stage.test.ts, flow-card.test.ts and web-origins.test.ts never fetch the /flow page.
  • Terminal and MCP tests are unchanged.
  • The /flow access tests stay on /flow: the 404s for a non-admin and a signed-out visitor, and the telemetry-granted agent reads. An agent can't reach /boards.
  • /flow itself is not redirected, which is #2767's job.

To try it, sign in as an admin and open /boards. The pipeline, throughput, held and merge-queue cards sit under the board list. ?out=landed&hour=0#out lists the counted items.

🤖 Generated with Claude Code

Approved

Approved from the diff. I could not reach the preview or read the screenshots from this sandbox, so I did not see the rendered page. The code is a clean move: one flow-panel module holds the panel, /boards and /flow both call it, and the old smaller pipeline panel is gone. Escaping and the ?out/?hour validation moved with the code unchanged. /flow keeps its own auth and read log. The moved tests now assert /boards hrefs, so they fail without the change. Two things to do next: (1) /boards now runs the throughput, duplicates, conflicted, requested and queue queries on every load. Time it against the 50 ms budget, and if it is over, load the panel lazily or cache it briefly. (2) Add a test that a non-owner and a signed-out visitor get nothing of the panel from /boards, as the /flow access tests do. Also check the ?out= list on a narrow phone; the 6-column table scrolls inside .table-scroll, but nobody has looked at it at 360px.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs