Skip to content

experimental theme how: a label after an earlier part's sentence still sets its setting - #13374

Merged
josephfarina merged 1 commit into
feature/theme-editorfrom
c/how-label-sentence-scope
Nov 21, 2026
Merged

josephfarina merged 1 commit into
feature/theme-editorfrom
c/how-label-sentence-scope

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

User impact

In astryx experimental theme editor how, a labelled spacing or corners value ("Radius: small.") was left unread when any part had been named earlier in the ask. "soft shadows on cards. Radius: small." wrote the shadow but read "Radius" only as one step rounder (corners round), not as corners small.

Problem and solution fit

The label step skipped every label after any part named earlier in the ask. That keeps a part's own labels with the part, but it also drops labels that come in a later sentence. Now a label is the part's only when:

  • the part is named in the label's own sentence ("cards: white background, radius: large"; a decimal such as "1.5px" does not end a sentence), or
  • the part names the short heading line above a run of label lines. Numbered labels, a blank line and a heading's own colon ("Cards:") are passed over.

Decision

The owner approved this reading at this head: a "Label: value" for spacing or corners sets that setting unless a part keeps it as above. The earlier labelled-dials release note is reworded to match.

Expected behavior and authority

The how reader's contract: a clause names its setting and value. It is covered by theme-how-long-ask-binding.test.mjs.

Smallest restoration

One check in the label step. Its sentence and heading start after the label's lead (the period or line break before it). No setting, command or flag changes.

Evidence

  • Before: "soft shadows on cards. Radius: small." → corners round.
  • After: → corners small, and the shadow line is unchanged.
  • Unchanged, the part keeps its labels: "Card\nPadding: roomy\nRadius: large", "Cards:\nPadding: roomy\nRadius: large", "Card:\nRadius: large", "Card\n\nRadius: large", "Card\n1. Padding: roomy\n2. Radius: large", "cards: 1.5px border, radius: large", "cards: 0.5rem gap, padding: roomy" → --on card lines only.
  • Unchanged: "Density: roomy\nRadius: small" → spacing roomy, corners small.
  • Regression test: the new row "a label after an earlier part sentence still sets its dial" fails on the base. New rows cover each heading and decimal shape above.

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

CI=1 vitest run --project node on the four how test files (binding, every-clause, how, non-asks): 910/910 pass.

replay: worse 0 at 3e7094d
preflight: pass 3e7094d (CI half pass; review findings are the paired fix's: #13396)

@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 21, 2026 3:47pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 21, 2026
@astracat-bot

astracat-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟡 Reviewed (for maintainers only) Nov 21, 2026, 4:07 PM UTC

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec e806292

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the label fix works for its own example, and an engineering owner recorded the reading for this head, but three things need fixing.

  • A part named as a heading with a colon ("Cards:" then "Radius: large") or above numbered labels ("1. Padding: roomy"), or with a blank line before its labels, now sends a corners label to the whole theme (corners large) instead of the part (corners round --on card), because the heading walk in packages/cli/api/theme-edit/_how-question.mjs (lines 5157-5166) skips or rejects those heading lines, so the release note's "under a part's heading line ... still keeps the part's reading" does not hold for them.
  • A decimal in the part's own sentence ends that sentence, so "cards: 1.5px border, radius: large" now writes corners large on the whole theme, because line 5154 splits on every full stop instead of only on one before a space or the end, as the clause scans further down the same file do.
  • The earlier unreleased release note .changeset/experimental-theme-how-labelled-dial-values.md still says a label sets its value only "when no part is named before it in the ask", which this change makes false, so the two notes in the next release contradict each other; reword it to the new scope.

Each fix wants a test row: a colon heading, a numbered list under a heading, a blank line under a heading, and a decimal in the part's sentence. A new commit needs a fresh /approve-spec for its head.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim, release note: tagged experimental with a patch bump for the CLI: verified.
  • Claim, release note: a spacing or corners label now sets its value after an earlier sentence that names a part: verified ("soft shadows on cards. Radius: small." writes corners small).
  • Claim, release note: a label in a part's own sentence keeps the part's reading: verified for the example given; false when that sentence holds a decimal (second finding).
  • Claim, release note: a label under a part's heading line keeps the part's reading: verified for "Card" then "Radius: large"; false for a heading with a colon, numbered labels or a blank line (first finding).
  • Claim, description: before the change the shadow was written and "Radius" read as one step rounder: verified on the base (corners round).
  • Claim, description: a part now keeps a label only in its own sentence or on the heading line above the label lines: holds for plain headings and sentences without decimals; false for the cases in the first two findings.
  • Claim, description: the same reading as the earlier, owner-approved label step, only narrowed: the earlier approval covered labels with no part named before them; this head carries its own owner approval; the earlier ruling it names is not recorded in the repository.
  • Claim, description: the reader's clause contract is covered by the long-ask binding tests: the test file states the clause-binding rules; no spec record states them.
  • Claim, description: one check in the label step, with no setting, command or flag change: verified.
  • Claim, description: after the change the label writes corners small and the shadow line is unchanged: verified.
  • Claim, description: the three unchanged asks (a heading with two labels, a part's colon list, two label lines) answer as before: verified, identical on the base and the head.
  • Claim, description: the new test row fails on the base: verified (the base writes corners round).
  • Claim, description: split out of the earlier labelled-settings pull request: consistent with that pull request's review history.
  • Claim, checklist: one defect restored, no tagalongs, no new public API, no internal context: verified; the restoration also brings the regressions in the first two findings.
  • Claim, testing: the four how test files pass, 904 of 904: verified at this head.
  • File .changeset/experimental-theme-how-label-after-part-sentence.md: its heading and own-sentence sentences overreach (first two findings).
  • File packages/cli/api/theme-edit/_how-question.mjs: first and second findings.
  • File packages/cli/api/theme-edit/theme-how-long-ask-binding.test.mjs: clear; the new row fails on the base and passes on the head; rows for the first two findings are missing.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the c/how-label-sentence-scope branch from e806292 to 3e7094d Compare November 21, 2026 15:38
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 3e7094d

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the earlier heading and decimal regressions are fixed, and an engineering owner recorded the reading for this head, but two things still need fixing.

  • Miss: a label line with a two-word label under a part's heading ("Card", then "Background color: white", then "Radius: large") now sends the corners label to the whole theme (corners large instead of corners round --on card), because the heading walk in packages/cli/api/theme-edit/_how-question.mjs (line 5162) accepts only one word before a label line's colon; letting it take one to three words keeps these asks on the part.
  • The earlier unreleased release note .changeset/experimental-theme-how-labelled-dial-values.md still says a label that "comes after a part is named" keeps the part's reading, which contradicts the new note and what "soft shadows on cards. Radius: small." now does; reword it to a label in a part's own sentence or under its heading line.

Please add a test row for a two-word label line under a heading. A new commit needs a fresh /approve-spec for its head.

Claims and files checked

Review mode: full; reason: history

  • Claim, title: a label after an earlier part's sentence still sets its setting: verified (corners small).
  • Claim, new release note: tagged experimental with a patch bump for the CLI: verified.
  • Claim, new release note: a spacing or corners label now sets its setting after an earlier sentence that names a part: verified.
  • Claim, new release note: a label in a part's own sentence keeps the part's reading: verified, decimals included.
  • Claim, new release note: a label under a part's heading line keeps the part's reading: verified for plain, colon, blank-line and numbered headings; false when a two-word label line sits between (first finding).
  • Claim, earlier release note as reworded: a label that names the spacing or corners setting, with one of its values, sets it; one that belongs to a part keeps the part's reading: verified.
  • Claim, earlier release note as reworded: a label that comes after a part is named keeps the part's reading: false (second finding).
  • Claim, description: before the change the shadow was written and "Radius" read as one step rounder: verified (corners round).
  • Claim, description: after the change the label writes corners small and the shadow line is unchanged: verified.
  • Claim, description: the seven heading and decimal asks it lists still write only part lines: verified.
  • Claim, description: two label lines with no part set spacing and corners: verified.
  • Claim, description: a part keeps a label in its own sentence, or under the short heading above a run of label lines, past numbered labels, blank lines and a heading's colon: false for a run holding a two-word label line (first finding).
  • Claim, description: an engineering owner approved this reading at this head: verified.
  • Claim, description: the earlier release note is reworded to match: partly; one clause still contradicts (second finding).
  • Claim, description: the reader's clause contract is covered by the long-ask binding tests: the test file states the clause rules; no spec record states them.
  • Claim, description: one check in the label step, with no setting, command or flag change: verified.
  • Claim, description: the new row fails before the change, and new rows cover each heading and decimal shape: verified.
  • Claim, checklist: one defect restored, no tagalongs, no new public API, no internal context: verified, apart from the first finding's regression.
  • Claim, testing: the four how test files pass, 910 of 910: verified.
  • File .changeset/experimental-theme-how-label-after-part-sentence.md: its heading sentence overreaches (first finding).
  • File .changeset/experimental-theme-how-labelled-dial-values.md: second finding.
  • File packages/cli/api/theme-edit/_how-question.mjs: first finding.
  • File packages/cli/api/theme-edit/theme-how-long-ask-binding.test.mjs: clear; a row for the first finding is missing.

Automated review (maintainer link)

while (
k >= 0 &&
(!String(lines[k]).trim() ||
/^\s*(?:\d+[.)]\s*)?[a-z]+[ \t]*:[ \t]*\S/.test(String(lines[k])))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miss: this test takes only one word before the colon, so a two-word label line ends the walk, becomes the heading, and is then rejected at line 5170 for holding a colon. "Card" ⏎ "Background color: white" ⏎ "Radius: large" now writes corners large on the whole theme (before: corners round --on card), and so do "Font weight: bold" and "Text color: gray" lines; "Card" ⏎ "Border radius: 12px" ⏎ "Padding: roomy" writes spacing roomy. Taking one to three words before the colon keeps these on the part:

/^\s*(?:\d+[.)]\s*)?[a-z]+(?:[ \t]+[a-z]+){0,2}[ \t]*:[ \t]*\S/.test(String(lines[k]))

[experimental] `astryx experimental theme editor how` reads a labelled look more closely:

- A label at the start of a clause or a line that names the spacing or the corners setting, followed by one of that setting's own values ("Density: roomy.", "Radius: small"), sets it to that value when no part is named before it in the ask. A label that belongs to a part ("Body weight: bold.", "Buttons: soft."), or comes after a part is named ("Card" with "Radius: large" on the next line), keeps the part's reading.
- A label at the start of a clause or a line that names the spacing or the corners setting, followed by one of that setting's own values ("Density: roomy.", "Radius: small"), sets it to that value. A label that belongs to a part ("Body weight: bold.", "Buttons: soft."), or comes after a part is named ("Card" with "Radius: large" on the next line), keeps the part's reading.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"or comes after a part is named" still contradicts the new note: "soft shadows on cards. Radius: small." comes after a part is named and now writes corners small. Something like "or sits in a part's own sentence or under its heading line ("Card" with "Radius: large" on the next line)" matches the new rule.

@josephfarina
josephfarina marked this pull request as ready for review November 21, 2026 16:46
@josephfarina
josephfarina merged commit 9f64aa3 into feature/theme-editor Nov 21, 2026
9 checks passed
josephfarina added a commit that referenced this pull request Nov 21, 2026
…enated labels; a short sentence is no heading (#13396)

Reviewed pull request #13396, merged into the theme working branch with only its own changes (the layer below it, #13374, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…l sets its setting (#13374)

Reviewed pull request #13374, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…enated labels; a short sentence is no heading (#13396)

Reviewed pull request #13396, merged into the theme working branch with only its own changes (the layer below it, #13374, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…l sets its setting (#13374)

Reviewed pull request #13374, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…enated labels; a short sentence is no heading (#13396)

Reviewed pull request #13396, merged into the theme working branch with only its own changes (the layer below it, #13374, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…l sets its setting (#13374)

Reviewed pull request #13374, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…enated labels; a short sentence is no heading (#13396)

Reviewed pull request #13396, merged into the theme working branch with only its own changes (the layer below it, #13374, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…l sets its setting (#13374)

Reviewed pull request #13374, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…enated labels; a short sentence is no heading (#13396)

Reviewed pull request #13396, merged into the theme working branch with only its own changes (the layer below it, #13374, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…l sets its setting (#13374)

Reviewed pull request #13374, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…enated labels; a short sentence is no heading (#13396)

Reviewed pull request #13396, merged into the theme working branch with only its own changes (the layer below it, #13374, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
- #13196 how: every part named before a colon is a subject of the list
- #13283 experimental theme how: a file named in url() is a value, written as typed
- #13297 experimental theme how: a file in a follow-up ask is written as typed
- #13298 experimental theme how: a second url() layer left unwritten is named as not used
- #13317 experimental theme how: a file's path changes no other ask inside the question reader
- #13251 set: a text size said of a title piece goes on its holder's main text
- #13374 experimental theme how: a label after an earlier part's sentence still sets its setting
- #13396 experimental theme how: a heading's label run reads two-word and hyphenated labels; a short sentence is no heading
- #13263 how: in asks like "Header: navy. Cards: …, gray header." another sentence's part stays an item
- #13378 fix(cli): a radius named for one corner writes that corner only
- #13389 experimental theme how: the url() note no longer lists the follow-up ask as uncovered
- #13435 experimental theme how: the url() layer note names only the phrasing still left out
- #13449 how: a colon-list item is read in the sentence that holds it as typed
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed on main in #13412.

@github-actions
github-actions Bot deleted the c/how-label-sentence-scope branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 3e7094de Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant