Freeze page on Done, with timed-grace Undo (#6)
When you click Done, the page freezes into a live → closing → closed flow with a ~6 s grace banner offering Undo / Close now. /done fires exactly once, on commit. Frontend-only (annotate.js + theme.css); the server is unchanged.
Robustness (post-review hardening on PR #9)
- No silent comment loss while frozen — the answer-option (
mg-opt) handler now carries the live-only guard, so keyboard-Enter and programmatic activation can't POST a comment during the grace/closed window (CSS only blocked the mouse). - No stranded thread on tab-close — a
pagehide→sendBeacon("/done")delivers/doneif you close the tab mid-grace, soawait_commentnever hangs. - No stray cards under the closed banner — a late
/repliespoll is ignored once closed.
44 tests pass. Verified by running: live edge-case dogfood (frozen keyboard activation blocked, tab-close beacon delivered, live answer-options still post).
Install: uvx --from git+https://github.com/Jin-HoMLee/marginalia@v2.1.0 marginalia