Uh oh!
There was an error while loading. Please reload this page.
docs(types,components): name the real per-tier page-source styling primitive - #5471
Merged
os-support-ai merged 1 commit intoAug 21, 2026
Merged
Conversation
…imitive (#5461) Three sources still taught the "constrained JSX/HTML + Tailwind" framing that ADR-0080's 2026-06-30 header amendment (under ADR-0065, Accepted) retracted on styling: a page's `source` is runtime metadata, the console's Tailwind is compiled at build time over the console's own `src` with no safelist, so an authored utility class silently produces no CSS. - `packages/types/src/layout.ts` — the TSDoc on `PageSchema.kind`. Published surface: it ships in the built `.d.ts` and shows on hover, and it links `content/docs/guide/react-pages.md`, which #5413 has already corrected — so the shipped type documentation contradicted the guide it points readers to. - `packages/components/src/renderers/layout/react-page.tsx` — the injected-scope note and the `buildComponentScope` comment, plus the styling note the file header was missing. Wording is matched to the two landed authorities, not invented: the corrected guide's per-tier table, and `validatePageSourceStyling` (rule `page-source-className-tailwind`, `@objectstack/lint@11.5.0`). The "layout containers are deliberately not injected" claim is untouched — only the "so use Tailwind" conclusion is replaced. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-support-ai
marked this pull request as ready for review
August 21, 2026 01:13
Uh oh!
There was an error while loading. Please reload this page.
os-support-ai
deleted the
claude/issue-5461-page-source-tailwind-framing
branch
August 21, 2026 01:14
This was referenced Aug 22, 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 freeto 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#5461
Three sources still taught the "constrained JSX/HTML + Tailwind" framing that ADR-0080's
2026-06-30 header amendment retracted on styling. One of them ships in a published
.d.tsand links the very guide that now says the opposite.
The authority I matched against — not this PR's own phrasing
Two landed sources, cross-checked against each other before a word was written:
content/docs/guide/react-pages.md§"Styling — page source is metadata, not buildinput", corrected by docs(guide): react-pages.md contradicts the framework's sources on four points — Tailwind styling, record:* scope, adapter.find options, and the block inventory #5413 / PR docs(guide): resolve four react-pages.md contradictions toward the framework's sources #5462 and on
mainas of688cb93ad. It carries theper-tier table verbatim:
kind"react"style={{ … }}, withhsl(var(--token))for colour."html"direction/gap, gridcolumns) plus a JSONstyleobject.packages/lint/src/validate-page-source-styling.tsin the framework —validatePageSourceStyling, rule idpage-source-className-tailwind, released in@objectstack/lint@11.5.0. Read directly, not from the card's summary. It gates onkind !== 'html' && kind !== 'react' && kind !== 'jsx' → continue, emitsseverity: 'warning', and its two hints are the same split as the guide's table:react → inline
style={{}}withhsl(var(--token))theme colors; html → thecomponents' structured props plus a JSON
styleobject.Both trace to ADR-0080's header amendment (2026-06-30, under ADR-0065, Accepted),
which I read at source: "The tiers themselves stand; only the styling primitive
changes ... Do not author Tailwind classes in page source."
Citation hygiene, per the card's own warning. The card flagged that this family's
citation trail had a bad link elsewhere —
validate-responsive-styles.tsdoes not readpage
sourceat all. Verified: that rule walksregions[].components[], so it is notcited here. Two further corrections to the trail:
note both say the spec-side
PageSchemadescribes "has just" been fixed. As ofobjectstack@7679f8b54(2026-08-21 00:13)packages/spec/src/ui/page.zod.ts:520/560/566still carry
constrained JSX/HTML+Tailwind. This changes nothing about the defect here —the ADR amendment, the released lint rule and the corrected guide are all landed and all
agree — but the wording in this PR is aligned with that pending PR's shape, so the two
trees converge rather than diverge when it merges.
The change
Comment/TSDoc prose only. No behaviour change, no export change, the accepted
kindsetuntouched.
packages/types/src/layout.ts— the TSDoc onPageSchema.kind. This is theconsumer-facing one: it ships in the built
.d.tsand is what shows on hover. Verified,not assumed — after
pnpm --filter @object-ui/types build, the new prose is atpackages/types/dist/layout.d.ts:582-604. It now states the per-tier primitive, thatcolors on both tiers come from the theme as
hsl(var(--token)), and the do-not-authorrule with its mechanism and the rule id that reports it.
packages/components/src/renderers/layout/react-page.tsx— the injected-scope note(
:24) and thebuildComponentScopecomment (:49), plus the styling note the fileheader was missing (inline
styleobjects with token colours; overlays throughObjectFormwithformType="drawer"|"modal"rather than a hand-rolledfixed inset-0).Every load-bearing claim survives, which was the card's explicit constraint:
htmlis PARSED into a SchemaNode tree, never executedhtmlis safe for untrusted authors'jsx'is a deprecated alias, still acceptedreactis EVALUATED in the main tree, no sandboxreactgated behind thereact-pageshost capabilityreact-pages.mdcontent/docs/guide/react-pages.mdis not touched: it is already correct as of PR #5462.Sweep — the card's "three" is not the complete set
The card measured with
grep -rn "HTML + Tailwind" packages/ apps/ content/→ 3 hits. Thatsingle-line, single-spelling probe misses three classes: the no-space spelling
HTML+Tailwind, theJSX/Tailwindspelling that drops "HTML", and any occurrence wrappedacross a line boundary. A multiline-tolerant sweep for every compound spelling, run at the
merge base
9bd753682:11 live sites, not 3 (plus 5 in
CHANGELOG.mdfiles — immutable release history, leftalone). Three are this PR's; the other 8 are outside the declared file surface, so per the
dispatch's stop-on-breach clause they are filed, not fixed:
packages/components/src/renderers/layout/page.tsx:541sits on thekind === 'html'dispatch arm itself, and
packages/react-runtime/README.md:17-18is a published npmREADME — and it is the one the card's grep could never have seen, because the exact
phrase wraps across a blockquote line boundary.
sourcestrings — the practice the shipped lint rule warns on, working only by the coincidence ADR-0065 names as the failure #5470 — a different and worse class: the three console SDUI previewharnesses do not merely describe the retracted framing, they demonstrate it. 79
Tailwind
classNameattributes inside real pagesourcestrings, working only becauseeach file's own header arranges for the console's build-time Tailwind to scan it — the
ADR-0065 "works only by coincidence" failure, stated as the mechanism. All three would
trip
page-source-className-tailwind.Counter-probe
The sweep's zeros are real zeros, not a broken search — each probed with the identical
grep invocation:
grep -rnP -U -z -oscripts/Tailwindskills/Tailwinddocs/Tailwindexamples/Tailwinde2e/Tailwindreturns 0 there too, so probed withexpectTailwindin those same two filesThe last row is the one that matters for this PR: the compound spelling is gone from both
files (0 hits) while the same command still finds 7 bare
Tailwindmentions in them, sothe zero is the edit's, not the probe's.
Verification
All commands below on the final commit
7d2391fde, exit codes captured before any pipe.The test run is from the repo root with no
--, per this repo's vitest guard (objectui#3288 /#3378) — the package-scoped
pnpm --filter … test -- --maxWorkers=2form is refused here,and the refusal is correct.
Gates re-derived from the actual diff and re-run on the final commit:
Control-byte self-scan beyond the gate, on all three changed files:
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'→ no match.Changeset
One entry,
@object-ui/typespatch — consumer-visible, and evidenced rather thanasserted: the new TSDoc is present in the built
packages/types/dist/layout.d.ts, which iswhat a consumer's editor reads on hover. Scored
patch, nevermajor(AGENTS.md §版本号策略).The
react-page.tsxhalf gets no entry of its own: file-header and internal functioncomments project into no
.d.tsand change no export, so there is nothing an@object-ui/componentsconsumer could read in a CHANGELOG and act on. It is named in thechangeset body rather than left silent.
Generated by Claude Code