Repository navigation
experimental theme how: a file named in url() is a value, written as typed - #13283
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
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:29922runs after the files are restored, sohow rounded are cards? cards background-image: url(/locales/it/flag.png)is refused asurl(/locales/card corners/flag.png); swap the pronoun on the placeholder text, then callwithUrls. cards background-image: url(a.png), url(b.png)offersset … 'url(a.png)'"as you wrote it" and dropsurl(b.png)without a "not used" line, becauseasTyped(_how-question.mjs:32810) looks for the placeholder text in the raw ask; comparewithUrls(c.text)there, or keep a comma-joined run ofurl()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 onmainand pass on the head and on the head merged ontomain. False for a follow-up ask whose path holdsit,them,thoseorthese(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 nosetline, andurl('hero.jpg')becameurl('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, andblack-and-whitesplit the ask. Verified: each case fails onmain, andgradients.pngwrote a gradient. - Description: on
main, the hero ask wrote nothing and the header ask wrotetransparent. Verified onmain. - 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 onmain. - 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 ontomain. .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.
| // them aside and writes them back itself.) | ||
| named0 | ||
| ? followAsk.replace( | ||
| ? withUrls(followAsk).replace( |
There was a problem hiding this comment.
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, ' ') |
There was a problem hiding this comment.
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();d893a3f to
3fc5435
Compare
There was a problem hiding this comment.
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)offersset … 'url(a.png)'"as you wrote it" and dropsurl(b.png)with no "not used" line, becauseasTyped(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 comparewithUrls(c.text)there, or keep a comma-joined run ofurl()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 onmainand pass on the head and on the head merged ontomain. - 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.pngwrote a gradient, and the header ask wrotetransparent. - 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 onmain. - 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 onmainand pass on the head. - Description: the theme-edit suite results and a clean
sync:api-types. Not verified in full: everytheme-howsuite (60 files) passes on the head; the whole directory andsync:api-typeswere 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.
|
/approve-spec 3fc5435 |
There was a problem hiding this comment.
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)offersset … 'url(a.png)'"as you wrote it" and dropsurl(b.png)with no "not used" line, becauseasTyped(packages/cli/api/theme-edit/_how-question.mjs:32809-32812) compares the placeholder text with the typed ask; comparingwithUrls(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 onmainand pass on the head and on the head merged ontomain. - 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.pngwrote a gradient, and the header ask wrotetransparent. - 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 onmain. - 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-29938and 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 onmainand 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 andsync:api-typeswere 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 thanmain; 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.
|
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. |
- #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
|
Landed on main in #13412. |
User impact
astryx experimental theme editor howrewrote a file named inurl()while reading the question:url(hero.jpg)becameurl(hero jpg), capitals were lowercased, camelCase split, path words corrected or translated (gradients→gradient,btn→button), and a name such asblack-and-white.jpgsplit the ask. So "cards background-image: url(hero.jpg)" wrote nothing, and "header background url(/img/bg.webp) no-repeat" wrotetransparent.Behavior
Each
url(...)(in any case,URL(...)too) is set aside asurl(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 uppercaseURL(with and without a colon, aplaceholder@2xname, a follow-up ask after a question, camelCase, a path word the speller would correct, a short word the translator would expand,andin a file name, a path word that names a part, aurl()withno-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-typesis 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)