docs(guide): stop authoring ${…} in six expression keys with no carriage row (objectui#7418) - #7847
Merged
Conversation
…riage row
The 2026-09-01 ruling chose fork (B): non-`text` types get no new carriage
rows, and the docs stop authoring `${…}` in keys that have none. It named
`progress.value` and `input.value`, both already landed. Six more sites in the
same file are the same class, found by re-reading the file against the carriage
map rather than against the `type: "text"` census.
Measured on this tree from the built artifact — `expressionBindableTextKeysFor`
out of `@objectstack/spec@17.2.0`'s `dist/ui/index.mjs`, the same lookup
`SchemaRenderer.tsx` consumes: `badge` and `progress` and `input` carry nothing,
`card` carries `title`/`description` only.
Each site is repaired by what its passage teaches, not by one blanket rule:
- Comparison Operators, Nested Ternary — the subject is the operator, the badge
was incidental. Moved onto `text`/`content`, which is evaluated on every type,
so both keep demonstrating binding.
- Scoped Data — demonstrating scoped `item` data. `card.body` moved to
`card.description`, a real carriage key on the same node, which also removes
the half-working node whose `title` evaluated while its sibling did not.
- Status Badge, Conditional Styling — the subject IS the non-carrying component,
so binding is not available under (B). Literal values plus prose naming the
missing row and the working alternative, matching how `progress` and `input`
were rewritten.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3
os-sam
marked this pull request as ready for review
September 6, 2026 00:15
This was referenced Sep 6, 2026
This was referenced Sep 6, 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.
Fixes #7418
The maintainer's 2026-09-01 ruling chose fork (B): non-
texttypes get no new carriage rows, and the docs stop authoring${…}in keys that have none — 「文档教现实」. It namedprogress.valueandinput.value; both landed with objectui#7115 and are untouched here. This carries the same ruling to the six remaining sites in the same file. No carriage rows are added, and nothing outsidecontent/docs/guide/expressions.mdis touched.The measurement — from the artifact, on this tree
Not from the card's table and not by line number.
expressionBindableTextKeysForread out of the builtdist/ui/index.mjsof@objectstack/spec@17.2.0(this repo's lockfile still resolves that version), which is the same lookupSchemaRenderer.tsxconsumes:SchemaRendererevaluates exactly four top-level channels —content(no type gate), the carriage keys for the node's type, thepropertiesbag and thepropsbag — plus the condition keys. Anything else at a node's top level reaches the renderer as the characters the author typed.A mechanical sweep of all 39 json fences in the page against that lookup reproduced the card's six independently, and found no seventh:
The 2 that remain are the two
list.itemsoccurrences the card deliberately did not claim —itemsis a data key, not one of the four text keys the carriage map governs, and whether the list renderer resolves it is a separate unmeasured question. Left deliberate, as recorded.Per site: which repair, and why
Each is one of two repairs, decided by what the passage teaches — not one blanket rule.
badge.varianttextnode'scontent, evaluated on every type, so it still demonstrates binding.card.bodyitemdata.bodybecamedescription, a realcardcarriage key on the same node.badge.varianttext/content.badge.text,badge.variantprogressandinput: name the missing row, author resolved values, keep the condition key as an expression.card.classNameclassNamecarries on no type at all. Prose names it and points at the two working routes; the example gates an authored variant withvisibleOn.So: three sites were demonstrating binding and keep demonstrating it; three could not, and say why in prose rather than being silently downgraded.
Two further defects found in the same passages
Measured through the real production renderers, not read off prose:
textis not abadgekey at all.BadgeSchemadeclareslabel/variant/icon/children, andrenderers/data-display/badge.tsxrendersschema.label. So"text": "${status}"rendered an empty badge withtext="${status}"leaked as a DOM attribute — worse than the literal characters the card predicted. Repaired tolabel.success/warning/infoare not badge variants. The closed set isdefault/secondary/destructive/outline. All three invalid values appeared in the sites being repaired; authoring a literal forced picking a valid one, so the page no longer teaches any of them.card.classNamewas the most visible of the six: the expression's own source text landed inside the renderedclassattribute.Is this page gated? Yes — but not where the defect lives
Worth stating plainly, because it is the same shape as objectui#7488.
check:doc-typesdoes scan this page and judged itstypeliterals. Its own header states the limit: "NOT in scope, deliberately: whether the snippet's OTHER keys are read by the renderer the type resolves to." Everytypehere was always valid, so it was always green.check:doc-snippetsdoes cover this page (confirmed by asking the gate's ownanalyze()), but only its ts/tsx blocks. All six defects live injsonfences, which it does not type-check.⇒ The page is gated, and no gate reads the json fences' non-
typekeys. All six sat under green gates. objectui#4795's second half (build-time rejection of${…}outside the carriage map) is what would redden them; this PR clears that path ahead of it.Verification
Union re-run after the final commit, at
586e637f9:node scripts/check-changeset-presence.mjs— EXIT=0, verbatim:Acted on: no changeset added.
Not run, said plainly: the full
pnpm lintrepo-wide scan and the repo-wide test suite — this diff is one markdown file with no ts/tsx block touched, and CI runs the farm regardless.Generated by Claude Code