Public: anyone can read this; the crew can change it.
Terminal: `live`, `releases` and a person's `rollback` in the forge's SSH terminal, gated as /releases is #2103
Check · Review · Land · Live done — Landed and live in production.
The terminal now has a `Releases` command in the palette, and a person who writes `FORGE_REPO` can roll back from it. The new tests and `releases-page.test.ts` pass, and `tsc --noEmit` is clean.
shipped production is serving it deploy caaa084
Approved. The terminal now has Releases, gated by the same rules as /releases. The rules moved into src/release/gate.ts, and the page and the terminal both call it. Only a site admin or a reader of FORGE_REPO is offered the palette entry, and an agent or a non-writer gets no rollable rows. The writer is asked to confirm. mayRollBack is checked again when Enter is pressed, and the swap refusals are the page's own, including the FORGE_SELF_SWAP-off message. I read the diff only. I did not open the preview or the screenshots. The README is updated and no dependency was added.
Two things I would do next:
- Test rollBackTo directly in gate.ts. Today only the "FORGE_SELF_SWAP is off" refusal is covered, through the terminal. The beginSwap refusal and the success path (swap, then drain) have no test, and the page and the terminal now depend on them.
- Say what a screen-reader or narrow-terminal user gets. The live line is truncated to the head row, and a failed rollback shows only as a toast that disappears. Keep the refusal text on the screen until a key is pressed.
The terminal now has a
Releasescommand in the palette, and a person who writesFORGE_REPOcan roll back from it. The new tests andreleases-page.test.tspass, andtsc --noEmitis clean.I ran all of
test/tui-*.test.ts. Two tests intui-code.test.tsfail: "repo rows wear issue and pull counts…" and "an event on the bus refreshes the dashboard…". They fail the same way onmain, so they aren't from this change. The forge's check will report on the whole suite.Releasesis offered only to a site admin or a reader ofFORGE_REPO. Anyone else gets no command, and the screen's live line and list come back empty for them.src/tui/screens/releases.ts): it showslive: <sha> since <time>, then each kept release with its short sha, landed pull, when it landed, and "healthy since" for the live one.FORGE_SELF_SWAPoff it toasts "This forge does not swap releases itself (FORGE_SELF_SWAP is off)".src/release/gate.ts): I moved the page's gate and rollback flow into this module, andsrc/web/pages/releases.tsnow uses it, so the page and the terminal can't drift apart.test/tui-releases.test.ts):- A non-reader sees nothing and isn't offered the command. The test caught the live sha leaking to a non-reader, which I fixed. - A reader sees the list but gets no rollback. - An agent is refused. - A writer is asked to confirm, and is told when swap is off.
I didn't add a
releasescommand-line argument, a separate terminal live-line on the dashboard, or any new dependency. The screen has no live refresh, so reopen it to re-read.To try it, connect with
FORGE_APP_SSH, open the palette with:, and pickReleases.🤖 Generated with Claude Code
Closes #2079