Public: anyone can read this; the crew can change it.
A ship, decline or say taken on /next can be undone for 60 seconds from the page it was taken on #11827
Check · Review · Land · Live done — Landed and live in production.
A decline, close or ship on `/asks` now leaves one line on the same page for a minute. A decline or close shows `Done. Undo`. A ship shows `Done. A merge that has landed cannot be taken back, so there is no Undo.` The undo path is unchanged and is not 60 s: it still lasts the existing day.
shipped production is serving it deploy cc205a8
A decline, close or ship on /asks now leaves one line on the same page for a minute. A decline or close shows Done. Undo. A ship shows Done. A merge that has landed cannot be taken back, so there is no Undo. The undo path is unchanged and is not 60 s: it still lasts the existing day.
There is no /next route that ships, declines or says. The per-repo /:owner/:name/next only ranks (Top, Not now). So I took "/next" to mean /asks, where those decisions are taken. If you meant the ranking page, this is the wrong target.
What changed
doneLineinsrc/actions/asks_bulk.tsfinds the person's latest decision. It is keyed to the stored operation row, so a restart keeps the minute.- It shows nothing once the decision was undone, was itself an undo, changed nothing, or the minute is up.
src/web/studio/asks_page.tsdraws that line in the slot the day-long Undo line already used, so nothing shifts. After the minute the existing "kept for a day" Undo line takes over.- The Undo is the existing same-origin
POST /asks/bulk/:id/undo. Each undo is recorded as its own operation, linked byundoOf, so the decision and its undo both appear in the operation log. - The
asks_actMCP tool andPOST /api/v1/asks/bulkreturn the same words asline, so no new tool was added. - Tests in
test/asks-bulk.test.tscover decline and close (line, expiry at 61 s, undo writing its own receipt) and ship (no Undo link, reason shown, same words over the API). With the change reverted,doneLineis not defined and these tests fail.
Not done
- Say: there is no verb or action behind "Say what is off". It is a comment on the pull, not an operation that can be reversed, so it gets no line or undo.
- Audit trail: I did not change the audit page or #11754's shape. Operations are what the existing trail records.
Checks
bun x tsc --noEmit,scripts/gate.ts,scripts/design-lint.ts,test/asks-bulk.test.ts,test/mcp-size.test.ts,test/asks-bulk-parity.test.ts,test/asks-op-words.test.tsandtest/mcp-fleet-act.test.tsall pass.- I did not run the full suite; the forge's check does.
- The pre-push hook demands a "Try:" commit, hence the empty second commit.
To try it: open /asks, decline a card, and the page shows Done. Undo. Press Undo and the card returns.
Decline/close/ship on /asks work and are tested, but the issue is only partly met. Fix first: the terminal door. Everything below in one round:
- Both doors: no src/tui/ screen or entry shows the Done line / Undo, and there is no docs/features/<name>.md how-to. The terminal must gate and show it exactly as the page does.
- Say is not covered (issue box 1 and 4 name ship, decline, say). If say is only a comment, state that in the issue and split it; do not leave the box silently unmet.
- Audit trail (box 3): nothing is added or tested showing the decision and its undo in the #11754 audit trail; the pull only asserts undoOf on the operation. Add a test against the audit view, or extend it.
- Tests: no test for the MCP asks_act returning the same
line(box 4 asks for the MCP words); the tests use the REST API only. Add one through the tool. Also assert the Undo POST is same-origin-checked (cross-origin refused) and that the Done line has no layout shift (same slot). - Design/JS-off: the page line is built by string surgery (replace(/ Undo$/,"")) on a shared constant; give the words module a separate DONE word and keep Undo as the button label. The fallback branch duplicates the old form; fold both into one component. Nested ternary is hard to read; use a small function.
- The page is /asks, not /next; confirm with the issue owner or the box text is not literally met.
A decline, close or ship on /asks now leaves one line on the same page for a minute. A decline or close shows Done. Undo. A ship shows Done. A merge that has landed cannot be taken back, so there is no Undo. After the minute, the existing "kept for a day" Undo line takes over. The asks_act MCP tool and POST /api/v1/asks/bulk return the same words as line.
Changes since the last review
- Two words, no regex:
src/actions/asks_words.tskeepsDONEandUNDO_LABELas separate constants, andDONE_UNDOandDONE_NO_UNDOare built from them.doneLinenow returnssay(the words beside the button), so the page no longer strips text with a regex. - One renderer:
undoSlotandundoBarinsrc/web/studio/asks_page.tsreplace the two near-identical Undo forms and the nested ternary. - TUI counterpart: the terminal dashboard's hint line now carries the same Done line while the minute lasts. After a ship it shows only the "no Undo" reason; after a decline or close it shows
Done. · u undo <verb>. - Latest decision by kind:
latestDecisioninsrc/core/fleet_ops.tsqueries for the newest non-undo operation by kind, query prefix and verb, so a run of undos can no longer hide it. BothdoneLineandlatestUndoableuse it, and theASKS_QUERY_PREFIXandASK_VERBSconstants insrc/actions/fleet.tsare now shared withisAsksOperation. - Test: a new test in
test/asks-bulk.test.tschecks that the decision and its undo both appear in the operation log, linked byundoOfandundoneBy. It also checks that the Done line still finds a fresh decision after six undo receipts.
Where I disagreed: I did not extend the audit trail. I could not find a #11754 audit shape in the tree. The only audit code I found is cloud_audit, which records vendor calls. The operation log (fleet_operation) already records both the decision and its undo, and the new test covers that. If #11754 means a different trail, point me at it.
Not done
- Say: there is no verb behind "Say what is off", so it gets no line or undo.
- Which page: I read "/next" as
/asks, because no/nextroute ships or declines.
Checks
bun x tsc --noEmit,scripts/gate.tsandscripts/design-lint.tspass.- 44 tests across the asks, MCP and parity files, and 226 across the fleet and TUI dashboard files, all pass.
scripts/fast.tsnamed 2,017 files, so I picked the covering ones by hand and did not run the full suite.
To try it: open /asks, decline a card, and the page shows Done. Undo. Press Undo and the card returns.
Earlier asks are met: one renderer (undoSlot/undoBar), DONE and UNDO_LABEL kept apart with no regex, latestDecision reads by kind so a run of undos cannot hide the decision, the TUI hint line carries the same Done line, and the operation-log test links decision and undo by undoOf/undoneBy. The Undo is a same-origin POST button inside a form, so it works with JavaScript off, and it sits in the existing slot so nothing shifts.
Next two things, non-blocking:
- Non-blocking: add one test that calls the asks_act MCP tool directly and checks
line; today the MCP half of box 4 is only covered through the REST route. - Non-blocking: Say has no Done line or Undo because it is a comment, not an operation. Open a follow-up if it should have one. Also confirm with the issue author that /next meant /asks.
Left #11814 open: 1 unticked item remain (A test per decision kind would fail without the Undo; the MCP has the same action in the same words.).
A decline, close or ship on
/asksnow leaves one line on the same page for a minute. A decline or close showsDone. Undo. A ship showsDone. A merge that has landed cannot be taken back, so there is no Undo.The undo path is unchanged and is not 60 s: it still lasts the existing day.There is no
/nextroute that ships, declines or says. The per-repo/:owner/:name/nextonly ranks (Top, Not now). So I took "/next" to mean/asks, where those decisions are taken. If you meant the ranking page, this is the wrong target.What changed
doneLineinsrc/actions/asks_bulk.tsfinds the person's latest decision. It is keyed to the stored operation row, so a restart keeps the minute.src/web/studio/asks_page.tsdraws that line in the slot the day-long Undo line already used, so nothing shifts. After the minute the existing "kept for a day" Undo line takes over.POST /asks/bulk/:id/undo. Each undo is recorded as its own operation, linked byundoOf, so the decision and its undo both appear in the operation log.asks_actMCP tool andPOST /api/v1/asks/bulkreturn the same words asline, so no new tool was added.test/asks-bulk.test.tscover decline and close (line, expiry at 61 s, undo writing its own receipt) and ship (no Undo link, reason shown, same words over the API). With the change reverted,doneLineis not defined and these tests fail.Not done
Checks
bun x tsc --noEmit,scripts/gate.ts,scripts/design-lint.ts,test/asks-bulk.test.ts,test/mcp-size.test.ts,test/asks-bulk-parity.test.ts,test/asks-op-words.test.tsandtest/mcp-fleet-act.test.tsall pass.To try it: open
/asks, decline a card, and the page showsDone. Undo. Press Undo and the card returns.Closes #11814