poli0981andClaude Opus 5 0a14fb4257 fix(legal): make the gate reachable from every route, and stop About lying after a bump
Found by the Phase 4 adversarial review; four of six lenses filed it
independently.

The gate rendered only on #import/#export/#edit, and TabBar rendered exactly
those three tabs `disabled` while it was up. But they are the only in-app
navigation to a gated route, and the footer only offers #settings and #about.
So a first-run user who reached #settings -- the flow docs/14 §2 explicitly
prescribes, "so a VI/JA user can switch language and theme first" -- had no
enabled control that led back to the accept UI.

Worst path, introduced by the popup gear this same phase: fresh profile, no
Manager tab, click ⚙. openManager creates a NEW tab at #settings, so there is
no history entry to go Back to. Reopening from the popup does not rescue it
either -- open-manager deliberately focuses the existing tab without touching
its hash (docs/02 §6). The only escapes were editing the URL fragment or
closing the tab.

The fix is that disabling was never what blocked anything: App.svelte already
substitutes <LegalGate> for the tab body on any gated route, which is what
keeps Import/Export/Edit from mounting pre-acceptance. So the tabs are now
clickable and clicking one shows the gate. They carry legal.blocked as their
title -- a key that was translated into all three locales and rendered
nowhere, which is its own half of the same defect: the dead tabs gave no
reason at all.

Separately: decideLegalStatus dropped the stored record on the `updated` path,
so the first time LEGAL_VERSION is bumped, About would tell a user who
accepted v1 that they have never accepted anything. It now carries the
superseded acceptance. Dead code today (LEGAL_VERSION is 1), a wrong statement
about consent the day it is not.

Also clears LegalGate's close timer before setting a new one; repeated clicks
stacked timers and only the last was ever cleaned up.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 13:26:57 +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%