Add: tab-scoped recovery pause, in one unified popup off-switch card (spec 0010 FR-7e–h, ADR-0018/0019)#237
Merged
Merged
Conversation
…e (spec 0010 FR-7e–h, ADR-0019) Fast, reversible recovery for the "this page looks broken" case, distinct from the permanent per-site denylist: - "Reveal everything on this page" — one-click panic button; reveals all hidden content and stops re-hiding for the current page load. Page-scoped, cleared on the next top-frame navigation. - Time-boxed snooze — "Pause for this tab" / "15 min" / "1 hour". Tab-scoped, survives navigation within the tab (so a checkout stays unblocked) until expiry or tab close. Live countdown + "Resume now". Both are stored per tab in chrome.storage.session via webext-storage's StorageItemMap, so they survive service-worker restarts and auto-clear on browser restart — no denylist-style cleanup debt. The pause is a third input to effective-enforcement, reusing the engine's existing reveal-all + teardown path. No chrome.alarms and no new permissions: liveness is lazy, so a timed snooze that expires while the page is open leaves it revealed and re-engages protection on the next navigation. The toolbar gains a "paused" off-reason (greyed icon + off badge). Content scripts learn pause state by message since they can't read the session area or know their own tabId. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…010, ADR-0018/0019) The four "turn protection off" controls (global Enforcement, Disable on this site, Reveal everything, Pause this tab) had no scope hierarchy and inverted visual weight — the most ephemeral, narrowest action (Reveal) shouted loudest with an orange fill. Collapse the site-disable + recovery cards into one "Protection" card with an internal scope ladder, each row labeled by an eyebrow that states scope + persistence once: "This tab · temporary" (reveal + tab snooze) then "This site · saved" (denylist). Demote Reveal to an orange outline so it stays findable without dominating. New ProtectionSection wraps both rows; the divider is a CSS adjacent-sibling rule so it only shows when both rows render (recovery still drops out on denylisted/non-content pages, leaving the site row alone). Also: shorten the indefinite-pause label to "Until closed" so it stops wrapping to three lines at 280px, and drop the now-stale "use Disable on this site above" cross-reference (that control is now an adjacent row). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two tab-scoped, non-persistent recovery controls in the popup for the "this page looks broken" case — deliberately distinct from the permanent Disable on this site denylist (ADR-0018):
Why
When a rule eats real content today, the only escapes are hunting for the per-element reveal, or writing a permanent denylist entry a daily driver never cleans up — silently unprotected on that site forever. There was no panic button and no "just let me through this once."
How
TabPauseinto awebext-storageStorageItemMapon thesessionarea. It becomes a third input toeffective-enforcement.ts(global && !denylist && !tabPaused); flipping it false routes through the engine's existingrevealAll+teardownpath — no new reveal code.chrome.storage.sessionsurvives MV3 service-worker restarts and auto-clears on browser restart — exactly the ephemerality we want, no cleanup debt.chrome.alarms, no new permissions. Liveness is lazy (expiresAt > now). A timed snooze that expires while the page is open leaves the page revealed and re-engages protection on the next navigation — a forgotten timer never yanks content back mid-task. Manual Resume now re-enforces immediately."paused"off-reason, reusing the greyed icon +offbadge (FR-2a).sessionarea or know their own tabId, so the background resolves liveness for them viaget-tab-pause+tab-pause-changedmessages. Popup and background (privileged) read/write the map directly, mirroring the denylist flow.Popup hierarchy
Landing recovery as a third standalone card under Disable on this site left the popup with four ungrouped "turn protection off" controls whose visual weight inverted their scope — the narrowest, most ephemeral action (Reveal) shouted loudest with an orange fill.
Consolidated the site-disable + recovery cards into one Protection card with an internal scope ladder, each row carrying an eyebrow that states scope + persistence once:
New
ProtectionSectionwraps both rows; the divider is a CSS adjacent-sibling rule, so it only appears when both render (recovery still drops out on denylisted / non-content pages, leaving the site row alone). Also shortened the indefinite-pause label to Until closed so it stops wrapping to three lines at 280px.Docs
docs/install.md— user-facing "Recovering a page the shield broke" section.Verification
bun run preflight(build → biome+eslint → tsc → knip → coverage): green; 2027 tests pass, including newtab-pauseunit +fast-checkproperty tests and extendedtoolbar-protectiontests.bun run build: bundles cleanly; background-worker purity canary passes.pre-commit run: mdformat + markdownlint pass.Review note
A denylisted-and-paused tab reports the
sitetoolbar reason (the popup only offers recovery when not denylisted, so they don't overlap in practice) — documented as a consequence in ADR-0019.🤖 Generated with Claude Code