Repository navigation
docs(embedding): fix the troubleshooting row that denies the shadow root - #265
Merged
Merged
Conversation
The "looks wrong on your site only" row told integrators their global CSS was reaching into the widget and that there was no shadow DOM to keep it out. Both halves stopped being true at #236, and five other passages in the same file say the opposite — so the row sent a host looking for a cause that cannot exist. It now points at the three paths that survive an open shadow root: an inherited property the widget does not restate on its own root, the host's root `font-size` reaching the calendar's rem-sized grid, and the `sahaj-atlas-fonts` `<style>`, the one rule that cannot live inside the root because an `@font-face` registered there is never applied. The cell names each path and links the section that explains it, rather than re-explaining all three. Every mechanism already has a home under "What the widget does to your page", and a duplicate in a triage column is the copy nobody updates. Keeping it at 322 characters also keeps it under the table's existing widest cell, so the next `prettier --write` on this file still pads the rows to 336 rather than rewriting all 25. Which inherited properties the widget restates is deliberately left to that section. The shipped `.sy-atlas` rules carry `line-height` — from Tailwind's preflight, not `host-reset.css` — on top of the six the section lists, so an example list here would be the complement of a list that is maintained elsewhere and already incomplete. `::part` is absent because nothing in `src/` sets a `part` attribute, so a host cannot reach the widget that way at all. Guide accuracy only, so `CHANGELOG.md` is untouched — nothing a host can observe changed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Deploying sahajatlas-design with
|
| Latest commit: |
473353f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://054e2cd4.sahajatlas-design.pages.dev |
| Branch Preview URL: | https://claude-docs-261-shadow-root.sahajatlas-design.pages.dev |
Deploying sahajatlas with
|
| Latest commit: |
473353f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e5e18e24.sahajatlas.pages.dev |
| Branch Preview URL: | https://claude-docs-261-shadow-root.sahajatlas.pages.dev |
sydevs-bot
marked this pull request as ready for review
October 9, 2026 17:00
sydevs-bot
enabled auto-merge
October 9, 2026 17:00
Contributor
Author
|
Adversarial review skipped: 1 file(s), 2 changed line(s), under 🤖 sydevs dispatcher |
Ardnived
approved these changes
Oct 9, 2026
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
Change outline
Contract —
docs/embedding.md, TroubleshootingOne row of the Troubleshooting table, paraphrased as rules. The diff is one line; this is what it asserts.
The three replacement paths were read off the shipped stylesheet, not the source.
pnpm build, thengrep -o '\.sy-atlas{[^}]*}' dist/assets/sheet-*.js, emits two root rules carryingcolor,font-family,letter-spacing,text-align,text-transform,word-spacingandline-height.Preview
The deploy carries no part of this change — the diff is a documentation file, which neither build output includes. The row renders on the branch:
Test results
test:run(136 files, 1682 tests)docs/embedding.mdas textpnpm build, includingassert:cssandassert:mapsManual verification
## What the widget does to your page— the row should add no mechanism that section does not explain.sahaj-atlas-fontsstays in your document on purpose" under### The style-tag ids.Notes for reviewer
Nothing a host can observe changed, so
CHANGELOG.mdis untouched per the ticket's fourth criterion, and the in-tree consumers (WeMeditateWeb/lib/atlas-embed.ts, the WordPress templates) need nothing.No spec was added. A spec could only pin a literal phrasing, not the claim —
docs/testing.md's vacuous-assertion rule is the argument against one, since the next wrong sentence would word itself differently and pass.Three findings filed on the way, all #236's unswept blast radius:
colorstill reaches widget text —--foregroundis never declared #262 —host-reset.css:62restatescolorashsl(var(--foreground)), and--foregroundis declared nowhere. A host'sbody { color }still reaches widget text. Filed as a Bug.style-src 'unsafe-inline'actually breaks #263 — the CSPstyle-src 'unsafe-inline'consequence ("completely unstyled") predates the shadow root. The sheet is a constructedCSSStyleSheet, whichstyle-srcdoes not gate.postcss-scope-widget.mjsandglobals.cssstill state the widget has no shadow boundary.Detail
Two wordings were corrected before the push, both caught by checking the build output rather than the source.
The first draft offered
line-heightas an example of an inherited property that crosses. It does not: Tailwind's preflight collapseshtml, :hostonto.sy-atlas, so the shipped sheet carries.sy-atlas{line-height:1.5}. The guide's own list at the "Two things still cross" paragraph names six restated properties and omits that seventh, which is why the final row names no examples at all — a list here would be the complement of a list maintained elsewhere and already incomplete.::partwas considered and dropped. The ticket's approach offered it as a remaining path. Nothing insrc/sets apartattribute and nothing setsexportparts, so a host cannot reach the widget that way at all.The third path deliberately does not say what removes the font
<style>. The review pass argued CSP is a likelier cause than an optimizer, and it is right about the mechanism —src/styles/sheet.ts:74-85constructs the sheet, sosahaj-atlas-fonts(src/styles/fonts.ts:131) is the only inline<style>the widget still puts in the host document. But'unsafe-inline'also licensesstyleattributes, which this widget sets everywhere, so what a host actually sees needs a browser rather than a source read. That is #263, not this PR.Review pass:
/simplifyand/code-review high— thepr-review-toolkitplugin is not installed in a routine session, whichListPluginsconfirms. The quality pass ran as one agent covering all four angles rather than four, because the diff is a single line of prose with no code for the reuse, efficiency or altitude lenses to act on. Its findings on cell length and the duplicated property list were applied; the compressed cell is 322 characters against the table's existing widest of 336, so the nextprettier --writeon this file pads the rows to the same width as before. The file is not Prettier-clean onmaineither, so it was left unformatted.Security review: skipped, correctly —
docs/embedding.mdmatches no alternative insecurityReview.triggerPattern.comment-lint.mjs --base origin/main: 0 changed files, no banned comment added.Closes #261
Generated by Claude Code