Skip to content

refactor: behavior-preserving hygiene - #8

Merged
harshabala merged 5 commits into
mainfrom
ref/hygiene-2026-10-06
Oct 9, 2026
Merged

harshabala merged 5 commits into
mainfrom
ref/hygiene-2026-10-06

Conversation

@harshabala

@harshabala harshabala commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Shared hostname helpers elsewhere in the extension. Drift threshold 0.7 and the 5-minute override cooldown are unchanged.

extractDomain is the original function: empty host (about:blank, file:///) is ""; invalid URLs are null. Characterization pins that. Local npm test 361 pass; npm run verify:static 74 pass. CI: test 18/20/22.x + browser green.

Draft; do not merge until reviewed.

harsha balakrishnan 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.
@harshabala
harshabala marked this pull request as ready for review October 9, 2026 05:38
@harshabala
harshabala merged commit c991a6e into main Oct 9, 2026
8 checks passed
@harshabala
harshabala deleted the ref/hygiene-2026-10-06 branch October 11, 2026 09:27
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.

1 participant