Repository navigation
refactor: behavior-preserving hygiene - #8
Merged
Merged
Conversation
added 5 commits
October 6, 2026 13:46
Move the duplicated auto/light/dark class logic into theme.js, convert history to a module so it can import it, and drop an unused newtab helper.
Replace the long onMessage if-else with a handler map, share hostname and cooldown matching, and collapse repeated local-storage epoch guards.
Share provider POST + tracking checks, overlay transition sends, and the trackingIsDisabled helper. No change to lock or matching rules.
about:blank and file:/// hostnames are null (legacy empty string). Callers treat both as missing except one stored hostname field.
about:blank and file URLs stored "" in override events. Alias to hostnameFromUrl returned null. Restore the original function body.
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.
Shared hostname helpers elsewhere in the extension. Drift threshold 0.7 and the 5-minute override cooldown are unchanged.
extractDomainis the original function: empty host (about:blank,file:///) is""; invalid URLs arenull. Characterization pins that. Localnpm test361 pass;npm run verify:static74 pass. CI: test 18/20/22.x + browser green.Draft; do not merge until reviewed.