poli0981andClaude Opus 5 372741142e feat(legal): the first-run Legal Gate
docs/14 §1: the Chrome Web Store has no pre-install acceptance mechanism, so a
first-run gate is what makes the terms reachable at all. Without it the
extension cannot be submitted.

acceptLegal writes, awaits, and flips to `accepted` ONLY once the write
resolves. Getting this backwards is the exact defect shape the last three
phase reviews kept finding: dismiss optimistically, await a chrome.* call that
can reject, never handle the rejection. Here that would leave the user
accepted in the UI and unaccepted on disk, so the gate would silently return
next launch with no explanation. There is a test that rejects the write and
asserts the gate stays up and storage stays empty.

It fails CLOSED: an unreadable store gates. Showing the gate to someone who
already accepted costs one click; skipping it for someone who has not is not
recoverable. A stored version NEWER than LEGAL_VERSION still counts as
accepted -- re-gating on a downgrade is noise, not consent.

The gate fills the content region rather than covering the viewport. docs/06
§3 calls it "a full overlay", but docs/14 §2 -- echoed in docs/03 §4 and the
docs/15 log -- requires #settings and #about to stay reachable while it is up,
and a literal inset:0 scrim buries the footer links that get you there. The
docs edit reconciling this follows in the docs commit. A side effect worth
keeping: Import/Export/Edit never mount before acceptance, so nothing touches
chrome.bookmarks until the user has agreed.

"Close tab" does not bet the decline path on window.close(): the Manager is
opened by tabs.create, so window.opener is null and close() may no-op. It
waits 150 ms and says so plainly if the document is still there. tabs.remove
is not an option -- that needs the `tabs` permission docs/08 §2 forbids.

Also finally consumes TabBar's `blocked` prop, which has sat unused since
Phase 2, and adds About's acceptance line -- showing the version the user
ACCEPTED, not the current constant.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 12:57:56 +07:00
2026-07-26 12:57:56 +07:00
2026-07-25 19:21:07 +07:00
S
Description
No description provided
GPL-3.0
3 MiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 75.8%
Svelte 14.5%
JavaScript 9.2%
CSS 0.4%