Repository navigation
1.0.4: pages that froze (#5), and the quirk form (#4) - #6
Merged
Merged
Conversation
#5: the extension could end up answering its own changes and freeze a page. - Inline !important colors were transformed again on every pass. Transforms don't settle (a border color drifts), and with nothing else to adjust on the element, each pass was an unmarked style write the observer answered in microtasks. Keep the original, transform once, restore on shutdown. - Text over a large background photo was re-queued on every frame: the photo is never classified, and the "classified, look again" step ran anyway. On the Oracle careers page this rewrote data-adm-base 60 times a second under Oracle JET components that re-render on attribute changes. - Write adjustments only when their value changes; ignore attribute records whose value didn't change. - Loop guard: per-task limits on observer rounds and per-element handling (defer, then drop after three hot tasks in a row); elements re-queued on every frame are parked and looked at a second later. Shown in the popup's statistics as "loops stopped". #4: after one invalid selector, the custom validity message stayed set and blocked the form, so every later selector was rejected until a reload. Clear it on input, and name the selector that's wrong. Tests: test/fixtures/loops.html with five loop cases, nine e2e checks, and three for the quirk form. 104/104 fixture checks, 115/115 with real sites. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #5 and #4.
#5: pages could stop responding
The extension could end up answering its own changes:
!importantcolors were transformed again on every pass. Transforms don't settle (a border color drifts:#f0f0f0 → #292929 → #a0a0a0 → #5f5f5f → #a0a0a0…). With nothing else to adjust on the element, each pass was an unmarked style write that the observer answered in microtasks, so the page never painted again. Onestyle="border-color: #f0f0f0 !important"was enough. Now the original value is kept, transformed once, and restored when the mode turns off (unless the page changed it in the meantime).data-adm-base60 times a second under Oracle JET components, which re-render when attributes under them change. Idle script time on that page went from ~650 ms per 12 s to ~1 ms.I couldn't get past the email step of the reported apply flow (that would mean submitting data to a real employer). So the exact path behind the reporter's freeze isn't confirmed, but all of the above were present on the pages I could reach.
#4: quirk form rejected valid selectors
After one invalid selector, the custom validity message stayed set on the field and blocked the form, so every later selector looked invalid until a reload. It's now cleared on input, and the message names the selector that's wrong. The placeholders no longer read like part of the value.
Tests
test/fixtures/loops.html: an inline!importantborder and background, text over a photo, a component that re-applies its children's classes, and one that re-renders fresh children on any attribute change under it. Nine e2e checks: the page still answers, no attribute is rewritten while idle, the border is stable, the ping-pong ends, and colors are restored on turning off. The original code freezes on this page.--sites(0 contrast failures), 21/21 unit tests.🤖 Generated with Claude Code