Skip to content

fix(cli): experimental theme editor - "the page: …" is the page - #13176

Merged
josephfarina merged 1 commit into
feature/theme-editorfrom
hq13k/fu-page-gradient
Nov 21, 2026
Merged

josephfarina merged 1 commit into
feature/theme-editorfrom
hq13k/fu-page-gradient

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Someone asking the experimental theme editor for the page: a purple-to-pink gradient gets the page tinted with a flat color instead of the gradient they asked for. The same ask without "the" (page: a purple-to-pink gradient) works. This affects a gradient, or a color or tone said without the word "background", after "the page:"; a plain color with "background" ("the page: navy background") already worked.

Problem and solution fit

  1. Why does it happen? A reader treats a product word that ends a label before a colon ("live sports scores page: …") as the product, not the page part. It only checked that some word came before "page", and an article counts as a word.
  2. Why does it harm the task? The page loses its subject, so the gradient is read as a page color for the whole theme instead of a gradient on the app shell.
  3. Why does that matter? The answer writes something other than what was asked, with no note saying why.

The fix keeps the product-label reading, but not when the clause, as written, has only an article or determiner before the page word.

Expected behavior and authority

The editor reads "page: …" as the page. This makes "the page: …" read the same way; it is not a released behavior change, since the product-label rule has not shipped in a release yet.

Smallest restoration

One condition in the product-label rule: the written clause must not have only the, a, an, my, our, your, this or that directly before the page word and its colon. It reads the clause as written, because part words before the page word ("the notifications page:") are already taken out of the text the rule sees.

Evidence

  • Reproduction before the change: how "the page: a purple-to-pink gradient" writes --color-background-body tones per mode.
  • Result after the change: it writes background 'linear-gradient(#7c3aed, #db2777)' --on app-shell, as how "page: a purple-to-pink gradient" does.
  • Representative unchanged path: live sports scores page: high energy, dense, bold headings and the notifications page: rounder corners still read "page" as the product, and the dashboard page: rounder cards is unchanged.
  • Regression test or other mutation-sensitive proof: new cases in theme-how-page-reaches-frame.test.mjs: the article case fails before the change and passes after, and the notifications-page case keeps the product reading.

Known differences

  • Charcoal-style bold system font, blue-purple selection differs from main where main misreads the font name Charcoal as a color.

Scope

Components: CLI (experimental theme editor how)

  • 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

  • vitest run packages/cli/api/theme-edit/theme-how-page-reaches-frame.test.mjs (the new case fails without the change)
  • Full packages/cli/api/theme-edit directory

replay: worse 0 at cb69964

preflight: pass cb69964

A product word said as the last word of a label before its colon ("live
sports scores page: …") names the product, never the page part. After an
article alone, "the page: a purple-to-pink gradient", the label is the page
itself, so the page lost its subject and the gradient became a page tone.
A product word after only an article, as written, stays the part; a longer
label ("the notifications page: …") still names the product.
@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:17am 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, 3:53 AM UTC

@josephfarina

Copy link
Copy Markdown
Contributor Author

Covers the reading this pull request routes back to main's (the owner's ruling): "the", "a", "an", "my", "our", "your", "this" or "that" followed by "page" and a colon names the page itself, while a longer label before "page:" (such as "the notifications page:") names that product's page.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec cb69964

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · cb69964

⏳ Building… Until it's ready, Storybook · Sandbox open the branch's previous preview.

Current run: The current CI run concluded cancelled. Current analysis is unavailable.


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.

Approved pending CI: CI has not run on this head yet (its run was cancelled before the tests started), so it needs to run again before merge.

experimental theme editor how now reads "the page: …" as the page itself, matching "page: …": the new gradient case fails on current main and passes here, and longer labels such as "the notifications page: …" keep the product reading.

Non-blocking:

  • "the page: warmer" and "the page: cooler" used to write a theme-wide neutral and now get "No match", the same answer "page: warmer" already gets; a page-temperature reading would give them an answer again.
  • "for the page: …" and "set the page: …" still read "page" as a product label, because the guard only looks for the article at the start of the clause.
Claims and files checked

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

  • Claims:
    • Release note: "the page: a purple-to-pink gradient" puts the gradient on the app shell, as without the article. Verified: new test passes here and fails on main.
    • Release note: an article before "page:" names the page itself. Verified; the code also covers my, our, your, this and that.
    • Release note: a longer label ("live sports scores page: …", "the notifications page: …") still names the product. Verified: existing and new tests; same answer before and after.
    • Description: "the page: " gave a flat color while "page: " worked. Verified on current main.
    • Description: gradients, and colors or tones said without "background", were affected; "the page: navy background" already worked. Verified: navy background answers the same before and after.
    • Description: the cause is a guard that accepts any word, an article included, before "page". Verified in the question reader.
    • Description: the product-label rule has not shipped in a release. Verified: its release note is still pending.
    • Description: the guard reads the clause as written because part words before "page" are already removed from what the rule sees. Verified.
    • Description: before, the reproduction writes per-mode page tones; after, the app-shell gradient. Verified.
    • Description: the live sports scores, notifications and dashboard page asks are unchanged. Verified.
    • Description: the new article case fails before and passes after; the notifications case keeps the product reading. Verified.
    • Description: no new public API, visual representation, default or interaction model. Verified.
    • Description: the new test file and the full theme editor test directory pass. Verified: both pass on this head.
  • Files:
    • .changeset/experimental-theme-how-the-page-label.md: clear
    • packages/cli/api/theme-edit/_how-question.mjs: two non-blocking notes (above)
    • packages/cli/api/theme-edit/theme-how-page-reaches-frame.test.mjs: clear

Automated review (maintainer link)

// since part words before it, "the notifications page:", are
// already taken out of the rest.)
!new RegExp(
String.raw`(?:^|[,.;:!?])\s*(?:the|a|an|my|our|your|this|that)\s+${m[0].trim()}\s*:`,

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.

Non-blocking: this guard fires only when the article starts the clause or follows punctuation, so for the page: a purple-to-pink gradient and set the page: a purple-to-pink gradient still read "page" as a product label and write flat page tones, as on main. Fine if that is the intended scope; otherwise allow a leading verb or preposition here.

@josephfarina

Copy link
Copy Markdown
Contributor Author

Covers the reading this pull request routes back to main's (the owner's ruling): "the", "a", "an", "my", "our", "your", "this" or "that" followed by "page" and a colon names the page itself, while a longer label before "page:" (such as "the notifications page:") names that product's page.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec cb69964

@josephfarina
josephfarina changed the base branch from main to feature/theme-editor November 21, 2026 06:30
@josephfarina
josephfarina merged commit a09fdbb into feature/theme-editor Nov 21, 2026
19 of 70 checks passed
josephfarina added a commit that referenced this pull request Nov 21, 2026
- #13211 experimental theme editor how: the stripes' names match in their own forms and with the table named
- #13176 fix(cli): experimental theme editor - "the page: …" is the page
- #13208 fix(cli): experimental theme editor - a gentle dark mode is no page color
- #12730 experimental theme set: a theme made one-mode says where the page color shows, once
- #13222 fix(cli): experimental theme editor - "bold system type" names no part
- #13223 fix(cli): experimental theme editor - a name in capitals that no part has is no subject
- #12701 fix(cli): how writes the color of a bold run said for a part's text, and the top bar's links take their looks on its nav items
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed on main in #13226.

@github-actions
github-actions Bot deleted the hq13k/fu-page-gradient branch November 22, 2026 06:04

This branch was successfully deployed

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