Repository navigation
experimental theme set: a theme made one-mode says where the page color shows, once - #12730
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
a8c4ee2 to
017602a
Compare
2c8dd6f to
bb997fd
Compare
017602a to
f14e326
Compare
There was a problem hiding this comment.
Changes requested. Five problems need fixing, and the new page-color notes also need an engineering owner's decision.
set <theme> background-image <gradient> --on layout-content(or abackgroundimage value) printsset <theme> --color-background-body <gradient>as the page line, and that printed command fails withERR_THEME_BAD_VALUE; print the page line only for a color value.- The changeset says an embedded app gets no page note, but the main-panel note (
_edit.mjs:7128) and the--on layoutrefusal (_check.mjs:5653) still append it there; gate both on the same check or narrow the wording. embeddedInHostPagetreats any app without a@astryxdesign/core/reset.cssimport as embedded, so an app that owns its page and loads onlyastryx.cssloses the page note on its firstset --color-background-body, and the guide says only that an embedded area adds no body rule; keep that note or detect embedding from a signal that means it, and correct the description.- Following the editor's own
how 'page background …'answer, its--on layout-contentline now tells the agent to run the--color-background-bodyline it already ran and repeats the page note; skip both when the theme already sets that page color. - The rule for which parts draw the page is now computed in
pageFrameParts(_edit.mjs), inline in_check.mjs, and in the existingpageReaders(_how-question.mjs) with two different predicates; move it into one shared helper that all three call.
No current record decides what experimental theme editor set says about the page color, so approval also needs an engineering owner to settle the one-mode note, the main-panel note, the frame refusal's first line and the embedded-app silence for this head by commenting /approve-spec <full head SHA>; the author may do so as an engineering owner.
Claims and files checked
Review mode: carry-forward; reason: none
- Claim: a one-mode switch gives the page note once: verified (new test;
_edit.mjs:6334-6344). - Claim: a main-panel fill says it covers that panel and names the page line: verified for color values; false for image values, whose printed line fails.
- Claim: a shell-frame fill is refused with the page line first: verified (new test; the line runs).
- Claim: an embedded app gets no page note: false on the main-panel and frame paths.
- Claim: the editor already gave the note when a page color is set: verified (base
_edit.mjs). - Claim: page-frame parts come from the part data, not a list: verified (
pageFramePartsgiveslayoutandlayout-contenton the neutral base). - Claim: an app with no Core reset is embedded, as the guide says: false; the guide says only that an embedded area adds no body rule.
- Claim: the new test covers the one-mode, panel, frame and embedded cases: verified (4 of 4 pass; 3 fail without the change).
- Claim: the node suite passes apart from inherited failures, and the type gate and changeset check are clean: not rerun; nine related test files (35 tests) pass.
- Claim: theme-build runs showed unpainted pages and page fills on the wrong part: a measurement outside the repository, not checkable here.
- File
.changeset/experimental-theme-page-note-modes-frames.md: finding (embedded claim). - File
packages/cli/api/theme-edit/_check.mjs: finding (embedded gap, copied page-part rule). - File
packages/cli/api/theme-edit/_edit.mjs: finding (image page line, embedded gap, repeated note, copied rule). - File
packages/cli/api/theme-edit/_project.mjs: finding (embedding inferred from the reset import). - File
packages/cli/api/theme-edit/theme-page-note-frames-and-modes.test.mjs: clear.
9b76340 to
55b7d01
Compare
55b7d01 to
e53c061
Compare
f14e326 to
ce0ffbd
Compare
There was a problem hiding this comment.
Changes requested. Seven problems need fixing, and the new page-color notes also need an engineering owner's decision.
set <theme> background-image <gradient> --on layout-content(or abackgroundimage value) printsset <theme> --color-background-body <gradient>as the page line, and that printed command fails withERR_THEME_BAD_VALUE; print the page line only for a color value.- The changeset says an embedded app gets no page note, but the main-panel note (
_edit.mjs:7128) and the--on layoutrefusal (_check.mjs:5653) still append it there; gate both on the same check or narrow the wording. embeddedInHostPagetreats any app without a@astryxdesign/core/reset.cssstring as embedded, so an app that owns its page and loads onlyastryx.css, or links Core from a versioned CDN URL, loses the page note on its firstset --color-background-body, and the guide says only that an embedded area adds no body rule; keep that note or detect embedding from a signal that means it, and correct the description.- Following the editor's own
how 'page background …'answer, its--on layout-contentline now tells the agent to run the--color-background-bodyline it already ran and repeats the page note; skip both when the theme already sets that page color. - The rule for which parts draw the page is now computed in
pageFrameParts(_edit.mjs), inline in_check.mjs, and in the existingpageReaders(_how-question.mjs) with two different predicates; move it into one shared helper that all three call. - Miss:
embeddedInHostPagecopies the project scan that doctor'scoreStylesheetLoad(api/doctor/doctor.mjs) already does with parsed imports, and the copy already misses versioned CDN links and counts line comments; extend doctor's scan to take the stylesheet and call it from both. - Miss: with
--state, the--on layoutrefusal still says "set --color-background-body (the first line)" but prints no such line, so the first line it shows sets the frame's surface instead; build the page line without the state and condition, or drop that sentence when either is set.
No current record decides what experimental theme editor set says about the page color, so approval also needs an engineering owner to settle the one-mode note, the main-panel note, the frame refusal's first line and the embedded-app silence for this head by commenting /approve-spec <full head SHA>; the author may do so as an engineering owner.
Claims and files checked
Review mode: full; reason: rebase
- Claim: making a theme one-mode gives the page note once, and again after going back to both modes: verified (new test;
_edit.mjs:6331-6344). - Claim: a fill on the main panel says it covers that panel, not the page, and names the page color line: verified for color values; false for image values, whose printed line fails.
- Claim: a fill on the shell frame is refused with the page color line first: verified for plain and
--modefills (the line runs); false with--state, where the message names a line that is not printed. - Claim: an embedded app gets no page note: false on the main-panel and frame paths.
- Claim: the editor already gave the note when a page color is set: verified (the base gates it only on the first page color).
- Claim: a dark-only theme in a light OS shows light text on the browser's white when nothing paints the page: consistent with the existing one-mode note; no rendered check needed.
- Claim: a fill on the main panel or the shell frame covers only that panel: verified from the part data (
layout-contentdraws the surface; the app shell paints the page). - Claim: page-frame parts come from the part data, not a list: verified (
layoutandlayout-contenton the neutral base). - Claim: an app with no Core reset is embedded and gets no page note, as the guide says: false; the guide says only that an embedded area adds no body rule.
- Claim: the new test covers the one-mode, panel, frame and embedded cases: verified (4 of 4 pass; 3 fail without the change).
- Claim: the node suite passes apart from inherited failures, and the type gate and changeset check are clean: not rerun; the new test file and nine related theme-edit test files (39 tests) pass.
- Claim: theme builds showed unpainted pages and page fills on the wrong part: measurements outside the repository, not checkable here.
- File
.changeset/experimental-theme-page-note-modes-frames.md: finding (embedded claim). - File
packages/cli/api/theme-edit/_check.mjs: finding (embedded gap, copied page-part rule,--statepage line). - File
packages/cli/api/theme-edit/_edit.mjs: finding (image page line, embedded gap, repeated note, copied rule). - File
packages/cli/api/theme-edit/_project.mjs: finding (embedding inferred from the reset string; copy of doctor's scan). - File
packages/cli/api/theme-edit/theme-page-note-frames-and-modes.test.mjs: clear.
7d518b8 to
0712faa
Compare
dfd50b0 to
b4cfbe8
Compare
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Changes requested. Seven problems need fixing, and the new page-color notes also need an engineering owner's decision.
set <theme> background-image <gradient> --on layout-content(or abackgroundimage value) printsset <theme> --color-background-body <gradient>as the page line, and that printed command fails withERR_THEME_BAD_VALUE; print the page line only for a color value.- The changeset says an embedded app gets no page note, but the main-panel note (
_edit.mjs:7187) and the--on layoutrefusal (_check.mjs:5827) still append it there; gate both on the same check or narrow the wording. embeddedInHostPagetreats any app without a@astryxdesign/core/reset.cssstring as embedded, so an app that owns its page and loads onlyastryx.css, or links Core from a versioned CDN URL, loses the page note on its firstset --color-background-body, and the guide says only that an embedded area adds no body rule; keep that note or detect embedding from a signal that means it, and correct the description.- Following the editor's own
how 'page background …'answer, its--on layout-contentline now tells the agent to run the--color-background-bodyline it already ran and repeats the page note; skip both when the theme already sets that page color. - The rule for which parts draw the page is now computed in
pageFrameParts(_edit.mjs), inline in_check.mjs, and in the existingpageReaders(_how-question.mjs) with two different predicates; move it into one shared helper that all three call. - Miss:
embeddedInHostPagecopies the project scan that doctor'scoreStylesheetLoad(api/doctor/doctor.mjs) already does with parsed imports, and the copy already misses versioned CDN links and counts line comments; extend doctor's scan to take the stylesheet and call it from both. - Miss: the
--on layoutrefusal always says "set --color-background-body (the first line)", but with--stateor an imagebackgroundvalue it prints no such line, so the first line shown sets the frame's surface on hover or there is none at all; build the page line without the state and condition and only for a color value, or drop that sentence otherwise.
No current record decides what experimental theme editor set says about the page color, so approval also needs an engineering owner to settle the one-mode note, the main-panel note, the frame refusal's first line and the embedded-app silence by commenting /approve-spec <full head SHA> on the pull request; the author may do so as an engineering owner. Also worth fixing: after a one-mode switch gives the page note, the first set --color-background-body repeats it word for word.
Claims and files checked
Review mode: full; reason: rebase
- Claim: making a theme one-mode gives the page note once, and again after going back to both modes: verified (new test;
_edit.mjs:6370-6383). - Claim: a fill on the main panel says it covers that panel, not the page, and names the page color line: verified for color values; false for image values, whose printed line fails.
- Claim: a fill on the shell frame is refused with the page color line first: verified for plain and
--modefills (the line runs); false with--stateor an imagebackgroundvalue, where the message names a line that is not printed. - Claim: an embedded app gets no page note: false on the main-panel and frame paths.
- Claim: the editor already gave the note when a page color is set: verified (the base gates it only on the first page color).
- Claim: a dark-only theme in a light OS shows light text on the browser's white when nothing paints the page: consistent with the existing one-mode note; no rendered check needed.
- Claim: a fill on the main panel or the shell frame covers only that panel: verified from the part data (
layout-contentdraws the surface; the app shell paints the page). - Claim: page-frame parts come from the part data, not a list: verified (
layoutandlayout-contenton the neutral base). - Claim: an app with no Core reset is embedded and gets no page note, as the guide says: false; the guide says only that an embedded area adds no body rule.
- Claim: the new test covers the one-mode, panel, frame and embedded cases: verified (4 of 4 pass; 3 fail without the change).
- Claim: the node suite passes apart from inherited failures: not rerun in full; the new test file and 20 related theme-edit test files pass.
- Claim: the type gate is clean: partly checked; the strict CLI typecheck reports no error in the changed files (its two errors are templates that need a built theme package).
- Claim: the changeset check passes: verified.
- Claim: theme builds showed unpainted pages and page fills on the wrong part: measurements outside the repository, not checkable here.
- File
.changeset/experimental-theme-page-note-modes-frames.md: finding (embedded claim). - File
packages/cli/api/theme-edit/_check.mjs: finding (embedded gap, copied page-part rule, page line under--stateor an image value). - File
packages/cli/api/theme-edit/_edit.mjs: finding (image page line, embedded gap, repeated note, copied rule). - File
packages/cli/api/theme-edit/_project.mjs: finding (embedding inferred from the reset string; copy of doctor's scan). - File
packages/cli/api/theme-edit/theme-page-note-frames-and-modes.test.mjs: clear.
There was a problem hiding this comment.
Waiting on an engineering owner's decision. No blocking problems were found.
No current spec decides what astryx experimental theme editor set says about the page color, so the new page note on set <theme> mode light-only|dark-only needs an engineering owner to approve or amend that direction by commenting /approve-spec <full head SHA> on the pull request; the author may do so as an engineering owner. Also worth fixing: after the switch gives the page note, the first set <theme> --color-background-body repeats it word for word, because that note still counts as unsaid there.
Claims and files checked
Review mode: full; reason: history
- Claim: making a theme light-only or dark-only from both modes gives the page note when it sets no page color: verified (new test;
_edit.mjs:6369-6381). - Claim: going back to both modes and then to one mode again gives it again, and switching between the two one-mode values does not: verified (new test).
- Claim: a theme that already sets its page color gets no note: verified (new test; also for a page color set for one mode).
- Claim: the note comes once: verified per switch; the first page color set afterwards repeats it.
- Claim: the editor already gave the note when a page color is set and said nothing on a mode switch: verified (base code; the new test's first case fails on the base).
- Claim: a dark-only theme in a light OS shows its text on the browser's page when nothing paints it: consistent with the existing one-mode note; no rendered check is needed for a CLI text change.
- Claim: theme builds showed unpainted pages: measurements outside the repository, not checkable here.
- Claim: the first test fails on main: verified.
- Claim: preflight passes: not rerun; CI did not run on this draft head, and the new test, the related theme-editor tests and the changeset check pass locally.
- File
.changeset/experimental-theme-page-note-one-mode.md: clear. - File
packages/cli/api/theme-edit/_edit.mjs: non-blocking note (repeated page note; page-color check written twice). - File
packages/cli/api/theme-edit/theme-page-note-one-mode.test.mjs: clear.
| !data.settings.some( | ||
| x => x.thing === '--color-background-body' && !x.on, | ||
| ) | ||
| ? [pageColorNote(data.mode)] |
There was a problem hiding this comment.
Non-blocking: after this note, the first set <theme> --color-background-body gives the same note again, word for word, since hadPageColor (:6136-6138) is still false at :7167-7172, whose comment says the note is said once for the theme. Skip that later note for a theme this switch already told, or keep the note on the first page color only. This check is also the one hadPageColor computes in the same function; using it keeps both notes on one rule.
|
Covers the theme-editor detail this pull request records (the owner's ruling): |
|
/approve-spec 332bcae |
|
Landed on main in #13226. |
User impact
When an agent makes a theme one-mode with the editor (
set <theme> mode dark-onlyorlight-only), the theme draws its page for that mode only. In an app with nothing painting the page, a dark-only theme viewed in a light OS shows its light text on the browser's white page. The editor already says where the page color shows when a page color is set; it said nothing here.Where it came from
Theme builds measured page by page: in several runs a dark-only theme made by the editor showed an unpainted page in a light OS.
The general rule: an editor action that changes what the page shows says where the page color shows and how to paint it.
Behavior
set <theme> mode dark-only(orlight-only) gives the page note once, when the theme has set no page color yet, as setting one does. Going back to both modes and to one mode again says it again; switching between the two one-mode values does not.Testing
theme-page-note-one-mode.test.mjs: the note once, again after both modes, and none for a theme with a page color. The first test fails on main.preflight: pass 332bcae (review deferred to batch: subagent cap)
replay: worse 0 at 332bcae