Repository navigation
test(browser): read the widget through its shadow root, and judge a preview - #56
Merged
Merged
Conversation
…review SahajAtlasWeb#243 renders the widget in an open shadow root on <sahaj-atlas>. The lane read `.sy-atlas` from the light DOM and hit-tested with document.elementFromPoint, which stops at the host, so every cell would report "no .sy-atlas" the day it ships. `laneDom` reads through either tree and descends shadow roots for hit tests. SAHAJ_ATLAS_WIDGET_FROM answers sahajatlas.com from a Cloudflare preview, so a widget PR is judged in every theme before it deploys. The typeface probe skips Mapbox's container. Mapbox sets Helvetica Neue on its own attribution link and zoom buttons, which made 40 of the 64 typeface findings on main; the 24 left are real `h2` leaks on six themes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 2, 2026
Merged
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.
Summary
<sahaj-atlas>'s open shadow root. SahajAtlasWeb#243 moves the widget into one, and the lane read.sy-atlasfrom the light DOM. The day #243 deploys, every cell would have reported "no.sy-atlas". The lane still reads the current light-DOM widget.document.elementFromPointstops at the host, so "the search box is on top" and the overlay's close-button and drawer checks would all have failed.SAHAJ_ATLAS_WIDGET_FROM=<preview origin>serves sahajatlas.com from a SahajAtlasWeb Cloudflare preview. A widget PR can now be judged in every theme before it deploys.main's 64 typeface findings. The remaining 24 are realh2leaks on Enigma, Esotera, Fluida, Mesmerize, Seva Lite and Twenty Twenty-Four.AGENTS.md: documents the preview override, and the trap thatpnpm testdeletes the network log every lane reads, so lanes must run one at a time.Test results
Full lane, every cell:
h2leaks (was 64)4336c065(shadow root)Under #243 all 24
h2leaks are gone. The one remaining finding is Enigma at laptop size: the search input and one link carry Mapbox Search JS's own system font stack, not the theme's. The overlays, stacking and hit tests pass in both builds.A standalone probe confirmed each piece:
shadowRoot.querySelector('.sy-atlas')is found, the light-DOM lookup is not).sahaj-atlas .sy-atlasselector pierces the shadow root.body h2 { font-family: Georgia }in production. It finds real widget elements in both builds, so it can't pass by finding nothing.Notes for reviewer
Test-only change: nothing here ships in the zip.
🤖 Generated with Claude Code