Public: anyone can read this; the crew can change it.
Removing a deal, a party or a date asks once before it happens, so a mis-tap in the meeting never loses a deal #70
Check · Review · Land · Live done — Landed and live in production.
Removing a deal, a party or a date from the page now takes two taps, and still works without JavaScript. What changed Confirm step: the three removals use the existing pattern. The summaries read "Remove this deal…", "Remove …" and "Remove this date…".
shipped production is serving it deploy d2eada7
Removing a deal, a party or a date from the page now takes two taps, and still works without JavaScript.
What changed
- Confirm step: the three removals use the existing
<details class="confirm">pattern. The summaries read "Remove this deal…", "Remove <name>…" and "Remove this date…". Opening one shows a line saying what goes, then a Yes, remove button. For a deal the line reads "77 Harbor View Dr, its 6 dates, 4 parties and their messages." Each button's accessible name includes what it removes. The markup is in a newsrc/pages/confirm.ts, whichdeal.tsandsheet.tsboth use. - Handlers:
/deals/:id/delete,/parties/:id/removeand/deadlines/:id/removenow refuse a POST withoutconfirm=yes. They answer 422 with the refused page and remove nothing. The deal route didn't read the form before, so it does now. The APIDELETEroutes, the MCP tools,canRemoveandcontract.jsonare untouched. - Notices: the notice now names what went: "Removed 77 Harbor View Dr.", "Removed Bo Buyer.", "Removed HOA review." I added a small
nameOfhelper insrc/deals.tsto look up the party or date name before it is removed. - CSS: one rule changed in
static/app.css. The party row'sorderrule now targets.confirm, and a new.party-controls > .confirm[open]rule lets an opened confirm take the full row. No new class.docs/design/areas/remove.mdrecords this. - README: the steps on removing a party and a date now say it asks once.
- Audit: the deal-removal audit row is unchanged, and a test asserts exactly one new
delete/okrow per removal. - Tests: in
src/server.test.ts, the party and date tests now assert a refusal with noconfirm(and withconfirm=no) that leaves the row in place, then a removal withconfirm=yes. A new test covers the deal's removal line, accessible name, 422 without confirm, the notice and the 404 afterwards.
Checks
bun test src/server.test.ts src/deals.test.tspasses (73 tests). I did not run the full suite.bun x tsc --noEmitonly printed its help text, because the repo has notsconfig.json, so there was no type check.bun scripts/lint-design.tsprinted nothing, so I take it as clean.scripts/gate.tsandscripts/fast.tsdon't exist in this repo.
Left alone: I kept the edits to the removal forms so the rebase against #62 stays small.
To try it: open a deal you own, tap Remove this deal…, and read the line before confirming. The party Remove <name>… and a custom date's sheet work the same way.
🤖 Generated with Claude Code
Clean. All three page removals use the existing confirm pattern and refuse a POST without confirm=yes (422, nothing removed). Notices name what went. API DELETE, MCP, canRemove and contract.json are untouched, so no cell is loosened and the actions still go through permit. lint-design passes (the script is lint-design.ts) and the preview serves. Minor: nameOf reads a name without permit, but only to word the notice after a removal that succeeded.
Removing a deal, a party or a date from the page now takes two taps, and still works without JavaScript.
What changed
<details class="confirm">pattern. The summaries read "Remove this deal…", "Remove <name>…" and "Remove this date…". Opening one shows a line saying what goes, then a Yes, remove button. For a deal the line reads "77 Harbor View Dr, its 6 dates, 4 parties and their messages." Each button's accessible name includes what it removes. The markup is in a newsrc/pages/confirm.ts, whichdeal.tsandsheet.tsboth use./deals/:id/delete,/parties/:id/removeand/deadlines/:id/removenow refuse a POST withoutconfirm=yes. They answer 422 with the refused page and remove nothing. The deal route didn't read the form before, so it does now. The APIDELETEroutes, the MCP tools,canRemoveandcontract.jsonare untouched.nameOfhelper insrc/deals.tsto look up the party or date name before it is removed.static/app.css. The party row'sorderrule now targets.confirm, and a new.party-controls > .confirm[open]rule lets an opened confirm take the full row. No new class.docs/design/areas/remove.mdrecords this.delete/okrow per removal.src/server.test.ts, the party and date tests now assert a refusal with noconfirm(and withconfirm=no) that leaves the row in place, then a removal withconfirm=yes. A new test covers the deal's removal line, accessible name, 422 without confirm, the notice and the 404 afterwards.Checks
bun test src/server.test.ts src/deals.test.tspasses (73 tests). I did not run the full suite.bun x tsc --noEmitonly printed its help text, because the repo has notsconfig.json, so there was no type check.bun scripts/lint-design.tsprinted nothing, so I take it as clean.scripts/gate.tsandscripts/fast.tsdon't exist in this repo.Left alone: I kept the edits to the removal forms so the rebase against #62 stays small.
To try it: open a deal you own, tap Remove this deal…, and read the line before confirming. The party Remove <name>… and a custom date's sheet work the same way.
🤖 Generated with Claude Code
Closes #64