Repository navigation
set: a text size token a part never reads goes into the one its held parts read - #13243
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.
Waiting on an engineering owner's decision, and one problem needs fixing.
set <theme> --text-body-size 13px --on markdown-paragraphnow exits 0 and writes only--text-code-size: 13pxon the paragraph, so the paragraph's prose keeps its size (it inherits the Markdown root's--text-body-size) while inline code changes and the note says the paragraph's text reads--text-code-size; refuse a part whose own text inherits its size, as the changeset says such a part is, and add that case to the test.
No current spec decides what astryx experimental theme editor set does with a text size token a part never reads, so approval also needs an engineering owner to settle the redirect, including whether it applies to every text size role (at this head --text-supporting-size 11px --on chat-message sets the whole message body to 11px), by commenting /approve-spec <full head SHA> on the pull request; the author may do so as an engineering owner. Also worth fixing: the exit-code 1 text and both descriptions do not say that a line with --state, a part with an inner text element, or a value naming that token is still refused.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim (changeset):
settakes a text size token said for a part that reads none when its held parts read one size token, writing the value into that token on the part: verified (_check.mjs:7707-7724; new test row, which fails on the base). - Claim (changeset): the setting is saved as typed and the build writes only that token: verified (the test checks the saved name and the tab list's declarations;
_settings.mjs:7699). - Claim (changeset): a part with text pieces of its own, a group, a state, or a value naming that token is refused as before: verified for a state, a value naming the token and a part with an inner text element (
_settings.mjs:15092-15100; top nav heading row), and a group is never redirected (the check takes one part only); false for a part whose own text inherits its size (the Markdown paragraph). - Claim (description): the tab list line was refused and offered the label size token instead: verified (base run; the new row fails on the base with that refusal).
- Claim (description): the result is
--text-label-size: 13pxon the tab list with no body size line: verified (test assertions; head run). - Claim (description): the top nav heading line is refused as before: verified (test row; base and head runs).
- Claim (description): the refusal now also returns the size tokens the held parts read: verified (
_compiler.mjs:585-586). - Claim (description): one helper serves the check and the build, so the refusal and the accept never differ: verified for the neutral catalog (the build's family-role filtering differs from the check, but no family-role member qualifies).
- Claim (description): when the part draws no text of its own there is only one size the line can mean: false for the Markdown paragraph, whose prose is its own text; whether other text roles should be redirected is the owner decision above.
- Claim (description):
undofinds the setting: verified from the code (the saved name is the typed token); not run. - Claim (description): the set docs, including the exit-code line, say where such a token goes: verified, with the exceptions missing (non-blocking).
- Claim (description): the whole theme-edit test directory passes: not rerun in full; the changed test file and 12 related editor test files pass on the head merged into main.
- Claim (description): no new public API and no internal context in public text: verified.
- File
.changeset/experimental-theme-text-size-held-parts.md: finding (the refused-as-before sentence is false for the Markdown paragraph). - File
packages/cli/api/theme-edit/_check.mjs: clear (calls the shared helper for one part only). - File
packages/cli/api/theme-edit/_compiler.mjs: clear (adds the held list to the existing refusal). - File
packages/cli/api/theme-edit/_settings.mjs: finding (the own-text test misses inherited text). - File
packages/cli/api/theme-edit/theme-set-takes-text-a-part-reads.test.mjs: finding (no row for a part whose own text inherits its size). - File
packages/cli/api/theme-edit/themeEditSet.doc.mjs: non-blocking (the still-refused cases are not named). - File
packages/cli/clients/cli/commands/experimental-theme-editor-set.doc.mjs: non-blocking (same, and the exit-code 1 text).
| { | ||
| code: 1, | ||
| when: 'an unknown option, a refused change (an unknown part, variant, state, token or thing; a value of the wrong type; --mode on something that has no mode; a token the part never reads for that; corners on a part that shows no edge), a theme that does not exist, or a build failure, or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED); nothing is written', | ||
| when: 'an unknown option, a refused change (an unknown part, variant, state, token or thing; a value of the wrong type; --mode on something that has no mode; a token the part never reads for that, unless it is a text size token and the parts it holds read one; corners on a part that shows no edge), a theme that does not exist, or a build failure, or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED); nothing is written', |
There was a problem hiding this comment.
Non-blocking: a line with --state, a part with an inner text element, and a value naming the held token still exit 1, but this text (and both descriptions) reads as if every text size token whose part's held parts read one is taken. Naming those three exceptions keeps agents from expecting exit 0.
There was a problem hiding this comment.
Waiting on an engineering owner's decision; the earlier problem is fixed.
set <theme> --text-body-size 13px --on markdown-paragraph is refused again, and the new test row covers it. No current spec decides what astryx experimental theme editor set does with a text size token a part never reads, so approval needs an engineering owner to settle the redirect, including whether it crosses text roles (at this head --text-supporting-size 11px --on chat-message sets the whole message body to 11px, and --text-body-size 13px --on overlay sets the label size of the overlay's buttons), by commenting /approve-spec <full head SHA> on the pull request; the author may do so as an engineering owner. Also worth fixing: the exit-code 1 text and both descriptions do not name the cases still refused (a --state, a part with text of its own, a value naming that token), and undo with the token the note names (--text-label-size --on tab-list) answers that the theme does not set it, since only the typed name undoes the setting.
Claims and files checked
Review mode: incremental; reason: none
- Claim (changeset):
settakes a text size token said for a part that reads none when its held parts read one size token, writing the value into that token on the part: verified (_check.mjs:7707-7724; the tab list test row fails on the base). - Claim (changeset): the setting is saved as typed and the build writes only that token: verified (the test checks the saved name and the tab list's declarations;
_settings.mjs:7699). - Claim (changeset): a part that draws text of its own, a group, a state, or a value naming that token is refused as before: verified (Markdown paragraph and top nav heading rows;
_settings.mjs:15089-15107; the check redirects one part only). - Claim (description): the tab list line was refused and offered the label size token instead: verified (the test row fails on the base with that refusal).
- Claim (description): the result is the label size on the tab list with no body size line: verified (test assertions; a run at this head).
- Claim (description): the top nav heading and Markdown paragraph lines are refused as before: verified (test rows; runs at this head).
- Claim (description): the refusal now also returns the size tokens the held parts read: verified (
_compiler.mjs:586). - Claim (description): one helper serves the check and the build, so the refusal and the accept never differ: verified (
_check.mjs:7711,_settings.mjs:7684). - Claim (description): when the part draws no text of its own and its held parts read one size token, only one size can be meant: the condition is implemented as stated; whether that holds across text roles is the owner decision above.
- Claim (description):
undofinds the setting: verified for the typed name; the name the note gives is refused (non-blocking). - Claim (description): the set docs, including the exit-code line, say where such a token goes: verified, with the still-refused cases unnamed (non-blocking).
- Claim (description): the whole theme-edit test directory passes: not rerun in full; the changed test file and six related editor test files pass on the head merged into main.
- Claim (description): no new public API and no internal context in public text: verified.
- File
.changeset/experimental-theme-text-size-held-parts.md: clear. - File
packages/cli/api/theme-edit/_check.mjs: clear. - File
packages/cli/api/theme-edit/_compiler.mjs: clear. - File
packages/cli/api/theme-edit/_settings.mjs: clear (the own-text test now refuses the Markdown paragraph); non-blocking note on undo by the written name. - File
packages/cli/api/theme-edit/theme-set-takes-text-a-part-reads.test.mjs: clear. - File
packages/cli/api/theme-edit/themeEditSet.doc.mjs: non-blocking (the still-refused cases are not named). - File
packages/cli/clients/cli/commands/experimental-theme-editor-set.doc.mjs: non-blocking (the same, and the exit-code 1 text).
|
Covers the theme-editor reading this pull request records (the owner's ruling): a text size set on a part that reads no size token, whose held parts read exactly one, is saved as typed and built into that token; a part with no such single token is refused. |
|
/approve-spec 2e08db6 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
An engineering owner approved the set redirect as built with /approve-spec on this head, and the earlier Markdown paragraph problem stays fixed. Two non-blocking points are worth a follow-up: the exit-code 1 text and both descriptions do not name the cases still refused (a --state, a part with text of its own, a value naming that token), and undo with the token the note names (--text-label-size --on tab-list) answers that the theme does not set it, since only the typed name undoes the setting.
Claims and files checked
Review mode: same-head; reason: none
- Changeset:
settakes a text size token said for a part that reads none, where its held parts read one size token, and writes the value into that token on the part: verified (_check.mjs:7707-7724,_settings.mjs:7674-7700; the tab list test row). - Changeset: the setting is saved as typed and the build writes only that token: verified (the test checks the saved name and the tab list's declarations;
_settings.mjs:7699). - Changeset: a part that draws text of its own, a group, a state, or a value naming that token is refused as before: verified (Markdown paragraph and top nav heading test rows;
_settings.mjs:15089-15107; the check and the build redirect one part only, and every group in the neutral catalog has two or more members). - Description: the tab list line was refused, offering the label size token instead: verified (the base version of the test asserts that refusal and its first line).
- Description: when nothing on or inside the part reads the token, the part draws no text of its own and its held parts read exactly one size token, the value goes into that token with a note; any other case is refused: verified as implemented; a catalog probe finds every held part of the 25 taken parts reading the same one size token.
- Description: the expected behavior is the refusal's own first suggestion: verified (
_compiler.mjs:549-563puts the held token's line first when the part reads none); the direction is settled by an engineering owner's approval on this head, not by a record. - Description: the refusal now also returns the size tokens the held parts read: verified (
_compiler.mjs:586). - Description: one helper serves the check and the build, so the refusal and the accept never differ: verified (
_check.mjs:7711,_settings.mjs:7684). - Description: the setting is saved as typed, so
undofinds it: verified for the typed name; the name the note gives is refused (non-blocking). - Description: the set docs, including the exit-code line, say where such a token goes: verified, with the still-refused cases unnamed (non-blocking).
- Description: the result is the label size on the tab list with no body size line: verified (test assertions at this head).
- Description: the top nav heading and Markdown paragraph lines are refused as before: verified (test rows pass at this head).
- Description: the tab list row fails before the change and checks the note and the saved name: verified (the base code has no redirect and its own test asserts the refusal; the head row asserts the note and the saved name).
- Description: one behavior is changed, with no new public API, default or interaction model under the fix label: verified (no export, option or exit code changes; the accepted inputs change, as approved).
- Description: public text contains no internal context: verified (title, body, branch, commit messages and added lines).
- Description: the whole theme-edit test directory passes: verified (547 files, 5,857 tests pass at the head; 4 skipped).
- Description: the replay and preflight lines are the author's own tool results and state nothing about the code beyond the checks above.
- File
.changeset/experimental-theme-text-size-held-parts.md: clear. - File
packages/cli/api/theme-edit/_check.mjs: clear. - File
packages/cli/api/theme-edit/_compiler.mjs: clear. - File
packages/cli/api/theme-edit/_settings.mjs: clear; non-blocking note on undo by the written name. - File
packages/cli/api/theme-edit/theme-set-takes-text-a-part-reads.test.mjs: clear. - File
packages/cli/api/theme-edit/themeEditSet.doc.mjs: non-blocking (the still-refused cases are not named). - File
packages/cli/clients/cli/commands/experimental-theme-editor-set.doc.mjs: non-blocking (the same, and the exit-code 1 text).
… token its held parts read
…t never reads refused
2e08db6 to
7f6d3bd
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
The set redirect builds the rule an engineering owner stated on this pull request (a text size said on a part that reads none goes into the one size token its held parts read), and the earlier Markdown paragraph problem stays fixed. Three non-blocking points are worth a follow-up:
- The exit-code 1 text and both descriptions do not name the cases still refused (a
--state, a part with an inner element that reads a font token, a value naming the held token), so help reads as if every such line exits 0. undowith the token the note names (--text-label-size --on tab-list) answers that the theme does not set it, since only the typed name undoes the setting; naming the undo line in the note would close the gap.- Regression:
heldSizeTokenForrepeatsnamesToken's check in the same module instead of calling it.
Claims and files checked
Review mode: full; reason: rebase
- Changeset:
settakes a text size token on a part that reads none when its held parts read one size token, and writes the value into that token on the part: verified (_check.mjs:7957-7970,_settings.mjs:8675-8701; the tab list test row; a live run). - Changeset: the setting is saved as typed and the build writes only that token: verified (the test checks the saved name and the tab list's declarations;
_settings.mjs:8700). - Changeset: a part that draws text pieces of its own, a group, a state, or a value naming that token is refused as before: verified (Markdown paragraph and top nav heading rows; live runs with
--stateand with a value naming the held token; every group has two or more members, and the redirect needs exactly one part). - Changeset: an experimental patch release note for the CLI: verified (its header and
[experimental]tag). - Description: the tab list line was refused, offering the label size token instead: verified (the head test's tab list row fails on the base with that refusal).
- Description: when nothing on or in the part reads the token, the part draws no text of its own and its held parts read exactly one size token, the value goes there with a note, and other cases are refused: verified as implemented (25 parts take it, each held part reading one size token).
- Description: the expected behavior is the refusal's own first suggestion: verified (
_compiler.mjs:516-563puts the held token's line first when the part reads none); the direction rests on the owner's ruling, not a record. - Description: the refusal now also returns the held parts' tokens: verified (
_compiler.mjs:586). - Description: one helper serves the check and the build, so the refusal and the accept never differ: verified (
_check.mjs:7958,_settings.mjs:8685; no part where the two calls differ). - Description: the setting is saved as typed so
undofinds it: verified for the typed name;undoby the written name is refused (non-blocking). - Description: the set docs, including the exit-code line, say where such a token goes: verified (
experimental-theme-editor-set.doc.mjs:15,:135;themeEditSet.doc.mjs:16); they do not name the remaining refusals (non-blocking). - Description: after the change the tab list rule holds the label size and no body size line: verified (the test; a live run).
- Description: the top nav heading and Markdown paragraph lines are refused as before: verified (both rows pass on the base and the head).
- Description: the regression test fails before the change and checks the note and the saved name: verified (red-first run).
- Description: the whole theme-edit test directory passes: verified (558 files pass and 1 is skipped at the head).
- Description: no new public API, default, or interaction model is hidden under the fix: verified (no export reaches the new internals; the behavior change is the owner-ruled redirect).
.changeset/experimental-theme-text-size-held-parts.md: clear.packages/cli/api/theme-edit/_check.mjs: clear.packages/cli/api/theme-edit/_compiler.mjs: clear.packages/cli/api/theme-edit/_settings.mjs: non-blocking (repeatsnamesToken).packages/cli/api/theme-edit/theme-set-takes-text-a-part-reads.test.mjs: clear.packages/cli/api/theme-edit/themeEditSet.doc.mjs: non-blocking (does not name the remaining refusals).packages/cli/clients/cli/commands/experimental-theme-editor-set.doc.mjs: non-blocking (exit-code 1 text).
| ) | ||
| ) | ||
| return null; | ||
| return new RegExp(`var\\(\\s*${held[0]}\\s*[,)]`).test(String(value)) |
There was a problem hiding this comment.
Non-blocking: namesToken(value, held[0]) (line 16393, same module) answers this same question and is what the main-text redirect calls for it. Calling it keeps the two checks from drifting:
return namesToken(value, held[0]) ? null : held[0];| ); | ||
| if (held) { | ||
| results[0][1] = null; | ||
| const said = `${results[0][0]} never reads ${thing}: its text reads ${held}, so the value goes into ${held} on ${results[0][0]}`; |
There was a problem hiding this comment.
Non-blocking: after this note, undo t --text-label-size --on tab-list answers ERR_THEME_NOT_SET ("The theme does not set --text-label-size on tab-list") while the built theme sets it; only undo t --text-body-size --on tab-list removes it. Naming the undo line in this note, or the typed setting in that refusal, closes the gap.
|
/approve-spec 7f6d3bd |
- #13284 experimental theme: the newer-recipe release note agrees with the kept-palette one - #13159 fix(cli): experimental theme editor - rounder corners never make the chat corners less round - #13243 set: a text size token a part never reads goes into the one its held parts read - #13299 experimental theme: text in a see-through region is measured over the region as drawn - #12772 experimental theme how: a label that names the spacing or corners setting reads its value as that setting's; sans after a kind of typeface is the typeface - #12773 experimental theme how: a contradiction holds back only its own pair; a decimal is one value; a color for the whole theme takes its role - #13309 perf(cli): theme how makes its every-word check's patterns once per lexicon - #13224 fix(cli): experimental theme editor - a group height narrowed off one control stays a control height show lists
|
Landed on main in #13377. |
User impact
set <theme> --text-body-size 13px --on tab-listwas refused: the tab list reads no text size of its own, and its tabs read--text-label-size. The refusal offered--text-label-sizeinstead, so the person had to retype the line to size the tab labels.Problem and solution fit
When the token said is read by nothing on or inside the part, and the part draws no text of its own while the parts it holds read exactly one size token, there is only one size the line can mean. The fix writes the value into that token, on the part, and says so; any other case is refused as before.
Expected behavior and authority
The refusal's own first suggestion: the token the held parts read, on the part.
Smallest restoration
checkTokenOn's refusal now also returns the size tokens the held parts read (the list its own suggestion already named). One helper in_settings.mjs,heldSizeTokenFor, reads that list: set's token check and the build both accept only when that refusal fired and names exactly one text size token, so the refusal and the accept never differ. The setting is saved as typed, soundofinds it; the build writes only the held parts' token. A part that draws text of its own (any element inside it sets a text property: a paragraph whose inline code is held), a group, a state, or a value naming that token is refused as before. The set docs, including the exit-code line, say where such a token goes.Evidence
.astryx-tab-list { --text-label-size: 13px; }, no--text-body-sizeline.--text-body-size 12px --on top-nav-headingand--text-body-size 13px --on markdown-paragraphare refused as before.Scope
Components: cli/api/theme-edit (set)
Testing
vitest run packages/cli/api/theme-edit(the whole theme-edit directory) passes.preflight: pass 7f6d3bd
replay: worse 0 at 7f6d3bd