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

Ship it and watch it go: a change's page follows its own merge to production #1026

Closed opened this
Closed without merging

The change page now follows its own ship in place: ready for a look → shipping → shipped without a reload. The earlier check failure came from an old test, and I've fixed it. test/board-windows.test.ts passes (7 pass, 0 fail).

Notes

stopped closed without shipping deploy 521483d

opened this

The change page now follows its own ship in place: ready for a look → shipping → shipped without a reload. The earlier check failure came from an old test, and I've fixed it. test/board-windows.test.ts passes (7 pass, 0 fail). I did not re-run test/studio.test.ts or tsc --noEmit after the fix; the forge runs the full check on this push.

Why the check failed

  • The failing test was "the board shows each window to an admin, and each app's efficiency". It got "$0.40 spent, nothing shipped this week" from a spend fixed at 2026-09-28.
  • That date fell out of the board's rolling 7-day window as the calendar moved on, so the board correctly stopped showing it.
  • The failure was independent of this change; the test was the wrong part.
  • The fix, in test/board-windows.test.ts, spends $0.40 on that app 5 hours before the test runs, so it holds on any day. No code under src changed.

What the change does

  • Fragment route: GET /:owner/:name/pulls/:number/state returns the word badge, note, deploy link, check line and Preview card. pullPanels in src/web/studio/previews.ts renders it, and the page's first paint uses the same function. It computes no diff and adds no query per comment.
  • Access and headers: a viewer who can't read the repository gets the same 404, and the security headers are the same as on every other response.
  • When the page swaps: src/web/live.ts fetches the fragment and swaps it in on pull.merged for this pull, on a deploy run.* for its preview environment, and on app.serving for production at this change's head or merge commit. Nothing else triggers it, and the markup is unchanged, so the page doesn't shift.
  • Tests: two new tests in test/studio.test.ts fail on the old code. One checks that the fragment renders the change's current word. The other checks that the client script names the fragment's path.

Left out

  • Comments and other activity still append or raise the pill as before.
  • I added no dependencies.

To try it Open a ready pull's page and press Ship. The word and the Preview card change in place.

Closes #82

commented

I merged main into the branch and pushed it, but I could not run the studio tests or tsc --noEmit after the merge. Both need things the sandbox won't give me: the studio tests listen on a unix socket, and node_modules has no bun type definitions. A later attempt to run outside the sandbox was denied, so the merge is checked only by bun build of the server (it bundles). The forge's check on this push is the first real test run of the merge.

What changed

  • Main had rewritten the change page. studioPull became changeConversation, with the review gate, hold card, policy-wall card, tell line and pullDir. I took main's src/web/studio/change.ts and re-applied this change on top of it instead of merging line by line.
  • pullPanels: it stays in src/web/studio/previews.ts and now holds main's word, status, note and deploy logic: the review gate, "waiting for a writer to approve this head", the tell line, pullDir, and envsFor for production. It tolerates an app-less repository, as main now does. It returns the check line and the Preview card, each with its own id.
  • Fragment route: GET /:owner/:name/pulls/:number/state moved into change.ts as pullStateFragment. It is authorized by pullContext, the same check the page uses (404 for an unreadable repository, an unreadable pull or a bad number). I moved it because previews.ts importing change.ts would be circular.
  • Region id: #pull-head is now #pull-check. The fragment no longer includes the title block, which main's changeHead draws for both tabs, so the title stays out of the swap. src/web/live.ts and test/studio.test.ts use the new id.
  • Left alone: the swap triggers and the earlier test/board-windows.test.ts fix.
commented

Parked by the crew: the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs