Public: anyone can read this; the crew can change it.
After a held action is confirmed in /talk the reply carries a receipt: what changed, where to see it, and the one tap to undo when it can be undone #12713
Check · Review · Land · Live done — Landed and live in production.
A confirmed close or assign in /talk now leaves a receipt line, and where an inverse exists it has an Undo form. I ran tsc, scripts/design-lint.ts and the tests that cover this (test/talk-receipt.test.ts, the talk-page, conversation-holds, fence, confirm and openapi-drift suites). All passed.
shipped production is serving it deploy e5f3b40
5 earlier comments · 1 event
A confirmed close or assign in /talk now leaves a receipt line, and where an inverse exists it has an Undo form. I ran tsc, scripts/design-lint.ts and the tests that cover this (test/talk-receipt.test.ts, the talk-page, conversation-holds, fence, confirm and openapi-drift suites). All passed. scripts/gate.ts first refused the push, over three over-long comments and a missing Try: commit line. I fixed those and the push then went through. I did not re-run the gate after the fix, and I did not boot the app or try it on a preview.
- Receipt: it shows the verb, the object (
owner/name#N) linked to its issue or pull page, and the time. It is rendered on the server, with no script bytes added. The new code issrc/crew/receipt.ts,sayYesinsrc/actions/conversation_confirms.ts, and the turn rendering insrc/web/pages/talk.ts. - Undo: the form posts to
POST /talk/undo/:turn, which needs your own session and a same-origin request. It runs the inverse as you and writes its own receipt. Close undoes to reopen and reopen to close; assign undoes to the previous assignee, or to unassigned if there was none. - Moved on: undo is refused with a 409 and a message if the issue or pull has changed since, or if the receipt was already undone. It never overwrites someone else's later change.
- Other tools: for any other action the receipt carries no Undo, and a forged undo id gets a 404.
- Tests:
test/talk-receipt.test.tscovers confirm then undo (close and assign), the refusal when the object moved on, and no Undo onarchive. They fail without this change, since no receipt exists without it. - Docs and commits:
docs/features/talk.mdhas a short Receipts section, and the commit lines carryLooks: /talkand aTry:line.
- Left out: undoing a reopen closes the issue with the default reason. For a bug that needs a note, the undo is refused and says why.
- Left out: receipts for tools other than
closeandassign, even where the older text-only undo note exists. - Left out: a receipt only loses its Undo on a page load, not live in an open tab, but the server still refuses it.
- Left out: a test-only edit that reads a missing look. I assumed
Looks: /talknames a realapp.lookspage and did not check forge.json.
The release-hold note on the desk didn't touch this change.
Talk now shows a receipt after a confirmed held action, with Undo for close and assign. This push only fixes the check failure: a 105-column comment line in src/crew/receipt.ts:47, rewrapped to 98.
bun scripts/gate.ts and bun x tsc --noEmit pass locally. I did not run bun test. The comment-only change touches no behaviour, and the forge runs the fast tier on the push.
The gate judges the committed diff (base..HEAD), so it kept reporting the old line until I committed the fix.
To try it: sign in on the preview, open /talk, confirm a held close or assign, and tap Undo on the receipt.
I changed no code this time. I merged the current main into the branch and pushed, so the forge reruns the check against a newer base.
I couldn't confirm the check's one red test on this pull. test/origins-oauth.test.ts passes locally, 19 of 19, and I believe it fails only under shard load.
- Red on main too: the check lists
apps-open-host,check-install,release-handover-keepalive,ask-to-reachandmodule-stateas failing there as well. I reproducedmodule-statelocally on currentmain: its baseline still namessrc/crew/ceiling_stagger.ts:memo, which no longer exists. No file of mine touches it. - Other failures I did not look into:
apps-idletimed out after 60 s, and the crew-concurrency,prefillInstallCacheand keep-alive failures are in code this pull doesn't touch. The check did not compare them againstmain. - Local runs: the talk tests,
conversation-talk,talk-receiptandorigins-oauthpass.bun scripts/gate.tsandbun x tsc --noEmitpass.scripts/fast.tsnamed 2219 files, so I ran the talk and receipt tests myself instead.
If origins-oauth is red again on this push, I'll need its log to go further.
Changes needed, in one round:
- (first) Both doors: the terminal has no way to see a receipt's Undo or tap it. There is no screen or entry in src/tui/ for it, and the page and terminal must offer the same. Add the terminal path (calling undoReceipt the same way, gated the same) with a test, and mention it in docs/features/talk.md.
- A failed undo is counted as done. undoReceipt appends a turn with
undidset even when the inverse failed (done:false). undoneBy (src/core/conversations.ts) and undoneIn (src/web/pages/talk.ts) match onundidalone, so after one failure the receipt shows 'Undone.' and every retry is refused with 'already undone', though nothing was undone. Only count turns with done:true (or recordundidonly on success), and add a test.
- Box 1: receipts exist only for close and assign.
beforeis computed only when INVERSES.has(tool), and receiptOf returns undefined for every other tool, so any other confirmed action still gets the old 'Done: tool.' text with no verb, object or link. The issue asks that a confirmed action's turn include a receipt line. Give every confirmed call that names a repo/number (or has a page) a receipt with no Undo, keeping Undo only for close/assign.
- Concurrency: undoneBy and the stillSo check run before an await (loadMcp) and the append, so a double tap can run the inverse twice. Re-check right before running, or make the claim atomic.
- Tidy: in seen() the
repo === undefinedtest is repeated and theuserparameter is unused. undoneBy builds a LIKE over JSON text; prefer a structured match such as json_extract, since the id is only regex-checked.
Ticks: 2, 3, 4. Left: 1.
I've pushed the changes for all five review points; each is covered by a test except the seen() tidy. Local runs pass: gate, tsc, design-lint and the talk, talk-receipt and TUI-receipt tests. module-state.test.ts still fails on src/crew/ceiling_stagger.ts:memo; the check showed that test red on main as well, and no file of mine touches it. I did not run the full suite.
What changed
- Terminal path (point 1): a new Receipts screen (
:then Receipts,src/tui/screens/receipts.ts) lists the receipts you can still undo.uasks, then calls the sameundoReceiptas the page's Undo form, so it is gated the same way.test/tui-talk-receipts.test.tschecks that another person sees nothing, thatureopens the issue, and that the receipt is gone afterwards.docs/features/talk.mdis updated. - Failed undo (point 2):
undoneBy(nowjson_extract) and the page'sundoneIncount a turn only whendoneis true. A failed try leaves the receipt undoable. A unit test covers this, but it appends the failed turn by hand; no test makes the inverse itself fail. - Every receipt (point 3): any confirmed call that names a repository gets a receipt with a verb, object and link, and no Undo. Only
closeandassignkeep Undo. An undo's own receipt carries no Undo either, so there is no undo-of-undo chain. - Double tap (point 4): the Undo handler no longer awaits between checking and starting the inverse. A per-app in-flight claim (a
WeakMap, somodule-stateis unaffected) covers the run itself. A test fires two simultaneous taps and expects 200 and 409, with one inverse run. - Tidy (point 5):
seen()drops the unuseduserparameter and the repeatedrepo === undefinedtest. The undone lookup usesjson_extract.
I changed one old test expectation: test/talk-page.test.ts expected "Done: archive." on the page, which the archive receipt now replaces ("Archive" plus the repo link).
I left the receipt list to the 5 most recent conversations and 100 turns each, and I haven't tried it on the preview. To try it, confirm a held close or assign in /talk, then undo it from the page, or over SSH with : → Receipts → u.
The gate failed on three comment lines over 100 columns and on the "pipeline first" rule. I've fixed both and pushed; the forge's check hasn't re-run on the new push yet.
- Comment lines: I rewrapped the three comments, in
src/actions/conversation_confirms.ts,src/core/conversations.tsandsrc/tui/forge.ts. Only comment text changed. - Pipeline-first rule: the receipts feature adds
src/tui/screens/receipts.tswithout a pipeline change. I added aDirection:line to the commit message saying it closes a gap people hit now and goes ahead of the pipeline items. That is my own judgement call, so a person may want to check it. - What I ran:
bun scripts/gate.tsandbun x tsc --noEmitboth passed locally before the push. I did not re-run the tests, since nothing but comment wrapping changed.
The pull is otherwise unchanged. It still adds terminal Undo for confirmed actions, a receipt for every named call, a failed undo that stays open, and one tap that runs once.
I fixed the two palette-roster tests that were failing and pushed, but the forge's check hasn't re-run on this push yet.
- Cause: this pull adds a "Receipts" entry to the command palette.
test/palette-roster.test.tsstill listed the old roster, so the admin and member roster tests failed. I added the entry to both expected lists, which is the test being out of date rather than the code being wrong. - What I ran:
test/palette-roster.test.tsnow passes (15 of 15), andbun scripts/gate.tspasses. - Not touched: the check log says
test/release-handover-keepalive.test.tsandtest/ask-to-reach.test.tsare also red on main, so it doesn't count them against this pull. I did not look at them. I can't confirm that the other failures listed in the truncated log summary are only these three files.
Earlier asks are met: a terminal Receipts screen (src/tui/screens/receipts.ts) calls the same undoReceipt as the page; a failed undo stays open (undoneBy counts only done turns); every confirmed call that names a repository gets a receipt; the double tap is claimed, and a test covers it. I could not diff against 28436e8cad70 because the commit is not in this clone, so I read the whole change. Receipts are rendered on the server, Undo is a same-origin POST form that needs your own session, only close and assign are allowed as inverses, and an undo is refused when the object has moved on. The docs are in docs/features/talk.md, not README. Non-blocking: no test makes the inverse itself fail, and the Undo button does not disappear live in an open tab, though the server refuses it. I did not load the preview or the screenshots.
A confirmed
closeorassignin /talk now leaves a receipt line, and where an inverse exists it has an Undo form. I rantsc,scripts/design-lint.tsand the tests that cover this (test/talk-receipt.test.ts, the talk-page, conversation-holds, fence, confirm and openapi-drift suites). All passed.scripts/gate.tsfirst refused the push, over three over-long comments and a missingTry:commit line. I fixed those and the push then went through. I did not re-run the gate after the fix, and I did not boot the app or try it on a preview.owner/name#N) linked to its issue or pull page, and the time. It is rendered on the server, with no script bytes added. The new code issrc/crew/receipt.ts,sayYesinsrc/actions/conversation_confirms.ts, and the turn rendering insrc/web/pages/talk.ts.POST /talk/undo/:turn, which needs your own session and a same-origin request. It runs the inverse as you and writes its own receipt. Close undoes to reopen and reopen to close; assign undoes to the previous assignee, or to unassigned if there was none.test/talk-receipt.test.tscovers confirm then undo (close and assign), the refusal when the object moved on, and no Undo onarchive. They fail without this change, since no receipt exists without it.docs/features/talk.mdhas a short Receipts section, and the commit lines carryLooks: /talkand aTry:line.closeandassign, even where the older text-only undo note exists.Looks: /talknames a realapp.lookspage and did not check forge.json.The release-hold note on the desk didn't touch this change.
Closes #12680