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

Terminal: Raise and Lower a limb among its siblings (follow-up to #1212) #1515

Merged opened this

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

Merged

An admin can now raise and lower a limb from the terminal, and a move made there reaches open web pages. The new test and the neighbouring tui, limb, milestone and fleet suites pass (306 tests) and `tsc --noEmit` is clean. The forge's full check hasn't run yet.

shipped production is serving it deploy 5f89d5b

opened this

An admin can now raise and lower a limb from the terminal, and a move made there reaches open web pages. The new test and the neighbouring tui, limb, milestone and fleet suites pass (306 tests) and tsc --noEmit is clean. The forge's full check hasn't run yet.

What changed

  • Terminal screen: palette → Milestones in a repository → owner/name opens src/tui/screens/limbs.ts. It lists the limbs in their set order, and enter opens a limb's own sub-limbs.
  • The move: an admin presses r or l. The screen calls previewLimb, which shows the new order and the top of the ready list in a dialog. enter applies it through applyLimb (verb place). u undoes the last move through undoFleetOp.
  • Who sees what: a non-admin sees the order with a note and no move keys. Agents get no keys either. A guest gets the same canRead answer as the web, so a private repo shows "not found". The plan is read without the owner's spend.
  • Live to the web: the place verb now appends a limb.moved event on the repository, for applies and undos alike. The milestones pages mount the live client, which shows its "↻ new — refresh" pill on limb.moved. The terminal list also refreshes itself when another session or the web moves a limb.
  • Palette fix: palette verbs that take owner/name pushed their screen before the prompt popped itself, so the pop removed the new screen and left the prompt open. This looked broken for every verb (open repository, issues, pulls). It now pushes after the prompt closes.

Tests and docs: test/tui-limbs.test.ts drives the terminal door through the palette and covers the cases below. The README has a "Milestones" paragraph under the terminal section.

  • Admin: preview writes nothing, esc backs out, apply moves the limb, undo restores it once.
  • Live: a move from one session reorders another session's open list, and the milestones page carries the live client.
  • Reader and guest: a reader has no move keys. A guest sees nothing private, and nothing can be moved through a public order.

Left out

  • Defer, resume and close are still not offered in the terminal; this issue asked only for raise and lower.
  • Undo covers the last move made on that screen, not a history. The web receipt remains the way to undo older ones.
  • The web side shows a pill rather than swapping the list in place.

Try it: ssh in as an admin, press :, pick Milestones in a repository, enter owner/name, then press r or l, enter, and u. Keep the repo's milestones page open in a browser to see the pill appear.

🤖 Generated with Claude Code

Closes #1514

Approved

Approved. The terminal door reuses previewLimb/applyLimb/undoFleetOp, so the admin check stays in the action. Readers and guests get the order with no keys to change it, and the private repo is a not-found. A move appends limb.moved, and the milestones pages now carry the live client. Tests cover preview without writes, apply, undo once, a reader, a guest, a private repo and a cross-terminal refresh. I could not open the preview from my sandbox (network denied) and did not look at the screenshots, so the web side is judged from the diff only.

Two things I would do next:

  1. Check on a 360px phone that the live-status line the page now carries does not shift the milestones list when it appears, and that a live refresh does not drop a half-finished Raise or Lower form. The new web test only checks that the script is present.
  2. Add a hint at the empty-state in the terminal list (the key for Raise/Lower is hidden for non-admins, which is right), and test that the same limb.moved event reaches a web viewer of a private repo only if they can read it.
commented

The full gate on land was red; the pull is open again. Red tests:

  • the gate's list > every test/*.test.ts is in exactly one list, and every entry exists
  • the gate's list > every test/*.test.ts is in exactly one list, and every entry exists [1.93ms] [shard 188]
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs