Skip to content

experimental theme how: a file named in url() is a value, written as typed - #13283

Merged
josephfarina merged 1 commit into
feature/theme-editorfrom
fix/theme-how-url-typed
Nov 21, 2026
Merged

josephfarina merged 1 commit into
feature/theme-editorfrom
fix/theme-how-url-typed

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

User impact

astryx experimental theme editor how rewrote a file named in url() while reading the question: url(hero.jpg) became url(hero jpg), capitals were lowercased, camelCase split, path words corrected or translated (gradients → gradient, btn → button), and a name such as black-and-white.jpg split the ask. So "cards background-image: url(hero.jpg)" wrote nothing, and "header background url(/img/bg.webp) no-repeat" wrote transparent.

Behavior

  • Each url(...) (in any case, URL(...) too) is set aside as url(uu<n>uu) before the question reader reads, rewrites or splits its words into asks. The ask keeps it aside, so no later reader reacts to a word of its path; every answer (a follow-up ask after a question too) writes the file back as typed, in its text and in each value. (The color-blind check, which reads the raw ask before the question reader, still sees the file name.) The file is written as typed, and no word of its path becomes a part (url(/img/avatars/me.png) writes on cards only).

  • A file inside url() is a value to write, never a picture to match: the "how reads words, never a picture" note no longer comes with it.

  • Not covered yet (each its own follow-up): two url() layers in one value, and a follow-up ask after a question whose path holds a word the follow-up reads as "them" or "it".

  • In "question? + ask" ("how rounded are cards? cards background-image: url(hero.jpg)"), the ask is now read, so the answer says the part's value now and answers the ask, as the existing follow-up behavior does ("how rounded are cards? make them 12px"). Before, the file made the ask unreadable, so only the question was answered.

Stack

Stack: #13283 → #13297 → #13298 → #13317

Bottom of a stack that enters together: this, then the follow-up ask fix, then the unwritten-layer note.

Testing

  • theme-how-url-file-name.test.mjs: twelve asks (case, an uppercase URL( with and without a colon, a placeholder@2x name, a follow-up ask after a question, camelCase, a path word the speller would correct, a short word the translator would expand, and in a file name, a path word that names a part, a url() with no-repeat) are written as typed with no picture note; all fail on main. A length in a file name (arrow-24px.svg) adds no "not used" line.
  • CI=1 vitest run --project node packages/cli/api/theme-edit: 5857 pass; the 13 failures are the same 8 files that fail on main on the same machine (theme-app-copy-written-around, theme-compile-writes-app-copy, theme-data-safety-value-checks, theme-headings-half-word-letters, theme-open-states-page-starter, theme-preview-safety, theme-preview, theme-starter-apps-pages-pictures: app-copy, compile-check and link tests that need a real checkout). sync:api-types is clean.

preflight: pass 3fc5435 (CI half pass; review findings are the paired fixes': #13297, #13298, #13317)

replay: group worse 0 at 6eb7b57 (this head alone is worse; enters only with its group)

@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 11:25am 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, 2:37 PM UTC

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 3fc5435

Storybook · Sandbox · built from this PR's head

Current run: Heavy CI deferred: runs when review passes and before merge. Lint, typecheck and any path-filtered checks ran on this push.


Generated by PR Enrichment workflow | View current CI run

@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.

Approval waits on an engineering owner's decision, and two fixes are needed.

No current spec record covers how experimental theme editor how reads an ask, so an engineering owner needs to provide or identify the governing spec, or decide that a url(...) in an ask is held aside and written back exactly as typed, with no picture note and no "not used" line for a length in its file name. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so, being an engineering owner.

Blocking:

  • In a follow-up ask after a question, the pronoun swap at packages/cli/api/theme-edit/_how-question.mjs:29922 runs after the files are restored, so how rounded are cards? cards background-image: url(/locales/it/flag.png) is refused as url(/locales/card corners/flag.png); swap the pronoun on the placeholder text, then call withUrls.
  • cards background-image: url(a.png), url(b.png) offers set … 'url(a.png)' "as you wrote it" and drops url(b.png) without a "not used" line, because asTyped (_how-question.mjs:32810) looks for the placeholder text in the raw ask; compare withUrls(c.text) there, or keep a comma-joined run of url() layers as one value.
Claims and files checked

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

  • Changeset: a file in url() is written as typed, with case, dots and words kept. Verified for single asks: the new tests fail on main and pass on the head and on the head merged onto main. False for a follow-up ask whose path holds it, them, those or these (first blocking finding).
  • Changeset: no word of the path is read as a part, corrected or taken as a break. Verified by the avatars, gradients, btn and black-and-white cases, apart from the follow-up pronoun swap.
  • Changeset: before, the reader rewrote the file and wrote another value or none. Verified on main: url(hero.jpg) got no set line, and url('hero.jpg') became url('hero jpg').
  • Changeset and description: a file in url() no longer brings the picture note. Verified by the tests; the picture check reads the set-aside text.
  • Description: on main, capitals were lowercased, camelCase split, path words rewritten, and black-and-white split the ask. Verified: each case fails on main, and gradients.png wrote a gradient.
  • Description: on main, the hero ask wrote nothing and the header ask wrote transparent. Verified on main.
  • Description: each url(...), URL(...) too, is set aside before the reader. Verified (case-insensitive pattern at _how-question.mjs:5038).
  • Description: no later reader reacts to a word of the path, and every answer, a follow-up too, writes the file back as typed. False for the follow-up pronoun swap and for a second url() layer (both blocking findings).
  • Description: the color-blind check still sees the file name. Verified: it reads the raw ask before the question reader.
  • Description: url(/img/avatars/me.png) writes on cards only. Verified by its test.
  • Description: twelve asks are written as typed with no picture note, and all fail on main. Verified; the file-name length case also fails on main.
  • Description: a length in a file name adds no "not used" line. Verified by its test.
  • Description: the theme-edit suite results and a clean sync:api-types. Not verified: only the new file and four neighbouring how suites (681 tests) were run, and all passed on the head merged onto main.
  • .changeset/experimental-theme-how-url-file-name.md: an [experimental] patch for @astryxdesign/cli; claims as above.
  • packages/cli/api/theme-edit/_how-question.mjs: two blocking findings (lines 29922 and 32810).
  • packages/cli/api/theme-edit/theme-how-url-file-name.test.mjs: clear; no case covers a follow-up whose path holds a pronoun word, or a two-layer value.

Automated review (maintainer link)

// them aside and writes them back itself.)
named0
? followAsk.replace(
? withUrls(followAsk).replace(

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.

Blocking: the pronoun swap runs after withUrls. When the follow-up names the part instead of using a pronoun, the first it, them, those or these it finds is inside the restored path. how rounded are cards? cards background-image: url(/locales/it/flag.png) is then refused as url(/locales/card corners/flag.png). Swapping on the placeholder text first keeps the path whole:

named0
  ? withUrls(
      followAsk.replace(
        /\b(them|it|those|these)\b/i,
        `${named0} ${asked === 'border-radius' ? 'corners' : asked.replace(/-color$/, '').replace('-', ' ')}`,
      ),
    )
  : withUrls(followAsk),

const named = [];
// (A file named in url() is a value as typed, never a typed length.)
const typedSegments = raw0
.replace(/url\([^()]*\)/gi, ' ')

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.

Blocking: with two layers, cards background-image: url(a.png), url(b.png), the comma splits off a clause whose text is url(uu1uu). No line takes it, and asTyped (line 32810) looks for that placeholder text in raw0, so the "not used" line never names url(b.png). The answer offers 'url(a.png)' "as you wrote it". Comparing the restored text there names the dropped layer:

const t = withUrls(c.text).trim();

@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.

Approval waits on an engineering owner's decision, and one fix is needed.

No current spec record covers how experimental theme editor how reads an ask, so an engineering owner needs to provide or identify the governing spec, or decide that a url(...) in an ask is held aside and written back exactly as typed, with no picture note and no "not used" line for a length in its file name. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so, being an engineering owner.

Blocking:

  • cards background-image: url(a.png), url(b.png) offers set … 'url(a.png)' "as you wrote it" and drops url(b.png) with no "not used" line, because asTyped (packages/cli/api/theme-edit/_how-question.mjs:32810) looks for the placeholder text in the raw ask; listing two layers as not covered does not stop that wrong offer, so compare withUrls(c.text) there, or keep a comma-joined run of url() layers as one value.

The follow-up pronoun case at line 29922 no longer blocks, since this pull request now lists it as not covered and main already got that ask wrong; the one-line reorder in the earlier inline comment still fixes it.

Claims and files checked

Review mode: full; reason: history

  • Changeset: a file in one url() is written as typed, with case, dots and words kept. Verified: the new tests fail on main and pass on the head and on the head merged onto main.
  • Changeset: no word of the path is read as a part, corrected or taken as a break. Verified for single asks (avatars, gradients, btn, black-and-white cases); the follow-up exception is the one it names.
  • Changeset: before, the reader rewrote the file and wrote another value or none. Verified on main: url(hero.jpg) got only the picture note, gradients.png wrote a gradient, and the header ask wrote transparent.
  • Changeset and description: a file in url() no longer brings the picture note. Verified by the tests; the picture check reads the set-aside text. A quoted path with a parenthesis still gets it, as on main.
  • Changeset and description: two url() layers are not covered yet. Understated: the answer offers the first layer as typed and drops the second silently (the blocking finding).
  • Changeset and description: a follow-up ask whose path holds a word read as "them" or "it" is not covered yet. Accurate: such an ask is refused with a rewritten path.
  • Description: each url(...), URL(...) too, is set aside before the reader. Verified (case-insensitive pattern at _how-question.mjs:5038).
  • Description: every answer, a follow-up too, writes the file back as typed. Verified for single-layer asks and the follow-up url(hero.jpg) case, apart from the two named exceptions.
  • Description: the color-blind check still sees the file name. Verified: it reads the raw ask before the question reader.
  • Description: url(/img/avatars/me.png) writes on cards only. Verified by its test.
  • Description: twelve asks are written as typed with no picture note, all failing on main, and a length in a file name adds no "not used" line. Verified: 13 of 13 tests fail on main and pass on the head.
  • Description: the theme-edit suite results and a clean sync:api-types. Not verified in full: every theme-how suite (60 files) passes on the head; the whole directory and sync:api-types were not run.
  • .changeset/experimental-theme-how-url-file-name.md: an [experimental] patch for @astryxdesign/cli; the two-layer wording is understated (blocking finding).
  • packages/cli/api/theme-edit/_how-question.mjs: one blocking finding (line 32810); non-blocking notes at lines 29922 and 5038.
  • packages/cli/api/theme-edit/theme-how-url-file-name.test.mjs: clear; no case covers a two-layer value.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 3fc5435

@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: one fix is needed.

An engineering owner's /approve-spec for this head settles how experimental theme editor how reads a url(...), so approval no longer waits on a spec decision; a new commit needs that approval again for its own head.

Blocking:

  • cards background-image: url(a.png), url(b.png) offers set … 'url(a.png)' "as you wrote it" and drops url(b.png) with no "not used" line, because asTyped (packages/cli/api/theme-edit/_how-question.mjs:32809-32812) compares the placeholder text with the typed ask; comparing withUrls(c.text) there, as #13298 does, names the dropped layer.

The Stack: line is not reviewed as one stack because #13297, #13298 and #13317 target the branch below rather than main, so the fix in #13298 does not count for this pull request: fold it in here, or retarget those pull requests to main. The follow-up pronoun case at line 29922 stays non-blocking, and #13297 fixes it.

Claims and files checked

Review mode: same-head; reason: none

  • Changeset: a file in one url() is written as typed, with case, dots and words kept. Verified: the new tests fail on main and pass on the head and on the head merged onto main.
  • Changeset: no word of the path is read as a part, corrected or taken as a break between asks. Verified for single asks; the follow-up exception is the one it names.
  • Changeset: before, the reader rewrote the file and wrote another value or none. Verified on main: url(hero.jpg) got only the picture note, gradients.png wrote a gradient, and the header ask wrote transparent.
  • Changeset and description: a file in url() no longer brings the picture note. Verified by the tests; a quoted path with a parenthesis still gets it, as on main.
  • Changeset and description: two url() layers are not covered yet. Understated: the answer offers the first layer as typed and drops the second silently (the blocking finding).
  • Changeset and description: a follow-up ask whose path holds a word read as "them" or "it" is not covered yet. Accurate.
  • Description: each url(...), URL(...) too, is set aside before the reader. Verified (case-insensitive pattern at _how-question.mjs:5038).
  • Description: every answer, a follow-up too, writes the file back as typed. Verified for single-layer asks, apart from the two named exceptions.
  • Description: the color-blind check still sees the file name. Verified: it reads the raw ask before the question reader.
  • Description: url(/img/avatars/me.png) writes on cards only. Verified by its test.
  • Description: in "question? + ask" the ask is now read and answered after the part's value. Verified by the follow-up branch at _how-question.mjs:29907-29938 and its test case.
  • Description: twelve asks are written as typed with no picture note, all failing on main, and a length in a file name adds no "not used" line. Verified: 13 of 13 tests fail on main and pass on the head.
  • Description: the theme-edit suite tallies and a clean sync:api-types. Not verified: the new test file passes on the head, but the whole directory and sync:api-types were not run.
  • Description: a stack of four pull requests that enters together. The Stack: line is identical in all four and each head is contained in the top, but the later three target the branch below rather than main; the sentence after it names three of the four.
  • Description: the earlier review findings are fixed in the follow-up pull requests. Accurate: #13297 moves the pronoun swap and #13298 fixes the dropped layer; neither lands with this one.
  • Description: the replay and preflight lines. Not verified: they report runs outside this pull request; on this head typecheck, lint and the CLI smoke test pass and the heavy jobs are deferred.
  • .changeset/experimental-theme-how-url-file-name.md: an [experimental] patch for @astryxdesign/cli; the two-layer wording is understated (blocking finding).
  • packages/cli/api/theme-edit/_how-question.mjs: one blocking finding (lines 32809-32812); non-blocking notes at lines 29922 and 5038.
  • packages/cli/api/theme-edit/theme-how-url-file-name.test.mjs: clear; no case covers a two-layer value.

Automated review (maintainer link)

@josephfarina
josephfarina changed the base branch from main to feature/theme-editor November 21, 2026 15:11
@josephfarina
josephfarina merged commit bc01054 into feature/theme-editor Nov 21, 2026
133 of 136 checks passed
josephfarina added a commit that referenced this pull request Nov 21, 2026
…#13297)

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

Reviewed pull request #13283, 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
…#13297)

Reviewed pull request #13297, merged into the theme working branch with only its own changes (the layer below it, #13283, is already here). It reaches main with the branch's next landing.
@josephfarina

Copy link
Copy Markdown
Contributor Author

Taken out of landing #13377 together with the rest of its group (#13283, #13297, #13298, #13317), which lands as one. The review of the combined head flagged the url() handling (asTyped drops a second url() layer) and the two url release notes. The group stays on the working branch and rides again once a fix pull request that names these enters the branch.

josephfarina added a commit that referenced this pull request Nov 21, 2026
…typed (#13283)

Reviewed pull request #13283, 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
…#13297)

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

Reviewed pull request #13283, 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
…#13297)

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

Reviewed pull request #13283, 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
…#13297)

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

Reviewed pull request #13283, 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
…#13297)

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

Reviewed pull request #13283, 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
…#13297)

Reviewed pull request #13297, merged into the theme working branch with only its own changes (the layer below it, #13283, 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 fix/theme-how-url-typed branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 3fc54350 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