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 #64

shipped production is serving it opened this has it

Landed in pull #70 · run

opened this

Intent: every removal on a page takes two deliberate taps, and still works without JavaScript.

Today on main, Remove this deal (src/pages/deal.ts:146), a party's Remove (deal.ts:33) and removing a date are each a one-button form that deletes right away, with no undo.

Done looks like:

Files: src/pages/deal.ts, src/pages/sheet.ts (if the date removal lives there), src/routes.ts, tests (deals.test.ts / server.test.ts), README.md. Risks: #62 is editing src/pages/deal.ts (the Messages record); keep this change to the removal forms so the rebase stays small. Don't change who may remove (canRemove / contract.json). Suggested: mason.

commented

Reviewed pull #70 at its head: ticked Each of the three removals is wrapped in the existing <details class="confirm"> pattern the clock already uses for Restore the sample deals (src/pages/clock.ts:204). The summary reads "Remove this deal…" / "Remove <name>…" / "Remove this date…". Opening it shows one line saying what goes ("77 Harbor View Dr, its 6 dates, 4 parties and their messages") and a Yes, remove button. The page needs no JavaScript and has no layout shift.; The page form handlers require a confirm=yes field. A POST without it is refused like any invalid form (the refused page, nothing removed). Tests assert this for the deal, a party and a date. The API DELETE routes and the MCP tools are unchanged, since they are already explicit.; After a removal, the notice names what was removed ("Removed 77 Harbor View Dr.").; Each removal stays in the audit log as today (a test asserts the deal removal row).; The button has an accessible name that includes what it removes. If any new class is needed, it is named in docs/design/areas/<area>.md, and bun scripts/design-lint.ts passes.; The README's step on removing says it asks once..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs