Skip to content

Add warning-mode block behavior with fresh blocked-tab reconciliation#102

Merged
danielchalmers merged 4 commits into
mainfrom
copilot/add-bypassable-warning-mode-again
May 28, 2026
Merged

Add warning-mode block behavior with fresh blocked-tab reconciliation#102
danielchalmers merged 4 commits into
mainfrom
copilot/add-bypassable-warning-mode-again

Conversation

Copilot AI commented May 28, 2026

Copy link
Copy Markdown
Contributor

This adds a bypassable warning mode alongside the existing hard block flow, with a global default and per-filter overrides that preserve current behavior for existing and new users. It also treats blocked-page rendering as a tab-state reconciliation problem so tabs already sitting on the blocked page re-resolve correctly when rules change.

  • Block-type configuration

    • Adds global Block Type storage/defaulting (Block Page or Warning)
    • Adds per-filter override support (Default, Block, Warning)
    • Keeps current behavior as the default for migrated and fresh installs
  • Filtering and precedence

    • Extends block decisions to carry effective blockType
    • Resolves per-filter override vs global default in the filtering engine
    • Preserves existing allow precedence
    • When multiple filters match, hard block wins over warning; otherwise the applicable warning is used
  • Blocked-tab state machine / reconciliation

    • Reworks blocked-page state resolution around fresh background-computed tab state
    • Stops relying on stale blocked-page URL params except as fallback/migration input
    • Handles transitions across allowed, hard-blocked, warning-blocked, and warning-bypassed
    • Ensures hard blocks override any prior warning bypass
  • Warning bypass behavior

    • Adds blocked-page Continue for warning interstitials
    • Persists bypass state per tab session, scoped to the same warning filter and URL origin/fallback key
    • Temporary filters inherit the global block behavior unless later edited
  • UI surfaces

    • Adds block-type controls in settings/modal flows only
    • Leaves popup and filter lists unchanged as requested
    • Updates blocked-page actions to show warning-specific behavior without changing hard-block behavior
  • Tests

    • Adds/updates unit and e2e coverage for block-type normalization, precedence, warning bypass scope, and blocked-page state transitions, including hard-block → warning while already on the blocked page
const decision = evaluateFilterDecision(url, data);

if (decision.action === 'block') {
  // decision.blockType is 'block' | 'warning'
  // hard blocks take precedence over warnings
}

Copilot AI linked an issue May 28, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add configurable block behavior for warning mode Add warning-mode block behavior with fresh blocked-tab reconciliation May 28, 2026
Copilot AI requested a review from danielchalmers May 28, 2026 23:53
@danielchalmers danielchalmers marked this pull request as ready for review May 28, 2026 23:53
@danielchalmers danielchalmers merged commit f042348 into main May 28, 2026
4 checks passed
@danielchalmers danielchalmers deleted the copilot/add-bypassable-warning-mode-again branch May 28, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add bypassable warning mode

2 participants