Repository navigation
fix(cli): the Order Detail template's discount uses a minus sign held to its amount - #12694
josephfarina wants to merge 119 commits into
Conversation
…irection (#7723) * fix(richtext): a block reads the way its own text reads spec:AST-061 FR6 gives a prose block the direction of its own text on every surface. Core Markdown already follows it. RichText still took the provider's direction for every block, so a Hebrew paragraph in an English document flushed left and its caret moved opposite to the arrow key, and an English list item in a Hebrew document did the mirror. BlockDirectionPlugin writes each prose container's own direction onto it, at any depth, from the shared first-strong classifier. A container -- a list, a table and its parts, a fenced code block -- takes its parent's direction instead, and gives up a dir that arrives with pasted HTML or an older stored document. A fenced code block adds unicode-bidi: plaintext, so each line reads its own way: a Hebrew comment reads right-to-left while const x = 1; keeps its semicolon at the end. That is the one place the surfaces differ, and core Markdown wants the same treatment. Only text a reader reads decides a direction. A decorator shows no prose of its own and getTextContent gives its alternative text, so an English caption would have turned a Hebrew item left-to-right; core Markdown skips the same nodes. Writing the direction, not deriving it in CSS, is what separates a block with no direction of its own from one that is strongly left-to-right: under dir=auto, digits, an image and an empty block all resolve left-to-right exactly like English, and a CSS rule cannot tell them apart. An empty paragraph keeps its caret on a right-to-left document's start edge because the plugin writes nothing onto it. A list reserves marker room on both inline sides. An outside marker is drawn beyond its item's own start edge, so room on one side left the marker of an item that reads against its list outside the field, and flattened a nesting step to nothing where a wrapper read against the items inside it. The direction write rides in the keystroke's own update, through a TextNode transform that walks every prose ancestor. An update listener sweeps a whole-state replacement, which runs no transforms, and is tagged history-merge so undo does not bounce off it. The shared classifier gains the four Arabic marks whose script is Common -- the semicolon, the letter mark, the question mark and tatweel, all Bidi_Class AL -- and loses the Rumi, Indic Siyaq and Ottoman Siyaq numerals, which are AN inside ranges the strong set covers. JavaScript exposes no Bidi_Class escape, so the sets approximate it from script and category and name the characters where the two disagree. The parity spec now states one rule for both surfaces, and reads only document blocks: a toolbar dialog's heading is chrome and follows the provider. The right-to-left resize test puts its image in a right-to-left block, since the document's own last block is English and reads that way. 1895 unit tests pass, eslint reports no errors, tsc is clean on both packages, and the richtext Chromium suite is 108 passed. The one failure, a selected image resizes by its handle, fails the same way on main. * fix(richtext): hold the list inset on the item, not the list CI caught a parity regression from the previous revision. Reserving marker room on both inline sides of every list cost one inset of measure on the end side at every level, so a long RichTextView item wrapped onto a second line where core Markdown kept it on one, and ListMarkers.a11y failed on line counts at 1440px and 390px. The inset goes back on the item, where an earlier revision had it. An outside marker is drawn beyond its item's own start edge, so an inset held by the item is always on the side the marker uses, whichever way that item reads, and it costs the same measure either way: a list whose items agree with it wraps exactly where core Markdown wraps. Measured in a built Storybook, this keeps what the both-sides inset was for. A nested list whose wrapper agrees with the items inside it still steps 24 / 48 / 72, because a wrapper takes its direction from the first text under it and so normally agrees with its own first item. No marker escapes the field at 390px in either direction. One narrower case stays open: a sibling that disagrees with the nested list holding it starts one inset short, because the wrapper spent its inset on the other side. Only room on both sides of that wrapper can fix it, and that is what cost the measure, so it needs a rule that fires only for a wrapper that disagrees with its items -- a change that moves core Markdown too, since its lists are inset the same way. ListMarkers.a11y keeps its two right-to-left fixme guards, with the reason they actually have now. Both surfaces give a block its own direction, so the old reason is spent; they still differ because Markdown pads the list on its start side while RichText insets each item, which is one inset apart exactly where an item reads against its list. One of the four guarded cases passes with the guard removed; three do not. 1079 unit tests pass, ListMarkers is 17 passed and 4 skipped, and the richtext Chromium suite is 109 passed with the image-resize failure that reproduces on main. * fix(richtext): a nesting holder follows the item it hangs from Review findings on the green head. The Siyaq numerals are not weak. I put the Indic and Ottoman Siyaq blocks in the weak set beside Rumi on the strength of their names; they are Bidi_Class AL, and only Rumi is AN. Checked against the browser's own implementation of the algorithm, which is what dir=auto runs: a Siyaq numeral resolves right-to-left where a Rumi numeral falls through to the next strong character. Both blocks come back out, the test that pinned the wrong answer is corrected, and so is the changeset line. This was mine, and it shipped in the shared classifier core Markdown already uses. Lexical puts a nested list in an item of its own after the item it hangs from. That holder was read as prose, so it took the direction of the list inside it, which is whichever language the first nested item happens to use. Two things followed: an item reading the other way lost its nesting step, because the holder had spent its inset on the far side, and a neutral item -- digits, an image -- followed that first item rather than the document. A holder is not a block a reader sees. It belongs to the item above it, and FR5 anchors a nested list on its parent item's text start, so it takes that item's direction. Measured at 390px, an English sibling under a Hebrew-first nested list moves from 24 to 48px, a neutral item from the Hebrew item's edge to the parent item's, and an agreeing nested list still steps 24 / 48 / 72. One wording note for the record, not a code change: FR6 says a block with no strong character takes the provider's direction, and a neutral item here takes its parent item's. The two agree unless the parent item reads against the provider. Writing the provider's direction onto the block instead would store a value its own text does not carry and freeze it for a reader who opens the document the other way round, so the inherited value is kept and the parity test says so. FR6 verification, in both document directions: a nested list whose items read both ways with a neutral one among them, and a fenced code line's own direction with the caret walking it the way the arrow points. A fence keeps its lines in one text run separated by newlines, so the line geometry is read from character ranges rather than nodes. The two jsdom tests that drove a holder directly described the old rule and used a holder with no item above it, which no document produces. They now use the shapes that do, and a new one pins what the ancestor walk is for: a quote two levels above the text that changed is settled in the keystroke's own update, where a transform on the nearest block alone leaves it reading left-to-right. 885 unit tests pass, tsc and eslint are clean, and the richtext and List Chromium suites are 130 passed with the image-resize failure that reproduces on main. blockNesting.test.tsx fails on main too. * chore(richtext): drop the baseline entry and tag the core export Three review fixes. The comment at $ownDirection cited FR5 for the rule it follows, which is a claim id in source and what the provenance baseline exists to catch. Regenerating the baseline had added an entry for the new file, which switches the rule off for it rather than satisfying it. The sentence now states the rule in its own words, the generated entry is gone, and the baseline is byte-identical to main again: this change does not touch it. A new export is a compatible capability, so it needs its own [feat] entry rather than riding the [fix] one, which never named it. The changeset says what firstStrongDirection answers and that both surfaces now share it. * chore: credit the contributor on the core changeset check:changesets requires a contributor handle on its own line, which the new [feat] entry was missing. * fix(core): the supplementary ranges swept up weak characters too astracat found Hanifi Rohingya digits read as strongly right-to-left. Rather than add one block, I swept both supplementary ranges in STRONG_RTL against the browser's own implementation of the algorithm, code point by code point, asking dir=auto what it makes of each one followed by a letter. That found eight disagreements, not one. The ranges are drawn around whole planes, so besides those scripts' letters they swallow their digits and punctuation: the Phoenician word separator, Avestan punctuation, the Hanifi Rohingya, Garay and Yezidi digits, a Garay mark, and the Arabic mathematical operators. The Rumi range also ran one code point past the block's end, onto a code point the browser reads as strong. All are Bidi_Class AN, EN, ET or ON, so none of them decides a direction, and they join the set the scan passes over. The set is no longer only numbers, so it is renamed. Re-running the sweep over all 2,816 code points in the two ranges now reports no disagreement with the browser. The test names each block with the class that put it there. Restores the table-cell test from the review of 4 November, which asked for leading Hebrew marks, combining-only content and Roman numerals in both document directions through import and the editing path. It was in the pre-rebase branch and I did not carry it over in the respin. 1918 unit tests pass, and the richtext and List Chromium suites are 132 passed. The image-resize and deep-nesting failures reproduce on main. * fix(core): a digit decides a direction when its bidi class says so The new changeset claimed firstStrongDirection follows Unicode rules P2 and P3. It approximates them, and astracat's example shows where the approximation was wrong rather than merely incomplete: ०१ שלום answered rtl where P2 gives ltr, because a Devanagari digit is Bidi_Class L and the classifier read every digit as neutral. Sweeping all 770 decimal digits in the first two planes against the browser, with two probes per code point to tell strong L from strong R from weak, found 320 of them misread across 32 scripts -- Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam, Sinhala, Thai, Lao and the rest. Their digits are L, so a line that opens with them reads left to right. Decimal digits join the strong left-to-right set, and the digits that are not L are named in the weak set that is read before it: the European and fullwidth ones are EN, the Arabic-Indic ones AN, and the mathematical, segmented and Nag Mundari ones EN. NKo's and Adlam's stay R through their own script escapes. Re-running the sweep reports no disagreement on any of the 770. The changeset now says the function approximates P2 and P3 from script and category, and names what it does not do: isolates. 22,028 unit tests pass. Two failures, blockNesting and postinstall, reproduce on main. * chore: drop a changeset clause the next commit disproved The [feat] entry still said firstStrongDirection reads a Bidi_Class L digit as neutral. That was true when the sentence was written and the commit after it made those digits strong, so the entry described the behaviour it had just removed. The isolates clause stands. * docs: say what the classifier approximates, and what changed in Markdown Two wording notes from review, both non-blocking. The JSDoc on the newly public firstStrongDirection still claimed to follow rules P2 and P3. It approximates them from script and category, and it does not skip isolated runs, which is what the changeset already said; the two now agree. The [fix] changeset named only the Arabic marks and the Rumi numerals. Reading a Bidi_Class L digit as strong changes Markdown output as well: a line opening with Devanagari digits before Hebrew now reads left-to-right where it read right-to-left. The entry says so and names the scripts. * spec(AST-061): name the files that carry the direction rule The rebase onto main moved RichText's plugins into src/internal/, which made BlockDirectionPlugin an internal module that RichTextEditor and RichTextView import from outside its folder with no current record naming it. AST-061 already decides the rule the module implements, so it claims the four files that carry it through a path-applicability block: the shared classifier, core Markdown's resolver, the plugin and its test, and the RichText editor theme. Its Current-state impact now says what the plugin is for and why core's Markdown/blockDirection.ts does not cover it. Markdown renders from a syntax tree and can resolve a block's direction as it renders. The RichText surfaces render from Lexical's stored editor state, so the direction is written onto the node inside the update that changed the text: that is what puts it in the keystroke's own undo step, and what makes a reopened document read the way it was written. A render-time resolver does neither. A module record would be the narrower home, but each one here declares a parent_component that must resolve to an active component record, and neither RichTextEditor nor RichTextView has one. The test file's header named its pre-rebase filename. * fix(richtext): the owner's two calls on direction Cindy decided both open questions on the pull request. firstStrongDirection stays internal. It is no longer exported from @astryxdesign/core/i18n; RichText reaches it through a new internal entry point, @astryxdesign/core/internal/first-strong-direction, beside the other internal entries, so the two surfaces still share one classifier and nothing outside Astryx gains API. The [feat] changeset that announced the public export is gone with it. no-core-internal-import reserved those subpaths for Core and Lab, so it now covers RichText too, which is an Astryx package shipped from this repository. This widens a shared rule, so it is called out for an owner rather than buried. A block with no strongly directional text takes the document's direction, as FR6 says and as Markdown already resolves one, instead of the direction of the list or item holding it. The nested list still anchors on its parent item's line, which the holder rule already does. The mechanism stores nothing: the plugin puts the document's direction on the editor root as a custom property, and a block with no written direction reads that property. A custom property arrives unchanged through a container whose own direction differs, where inherit handed the block that container's direction. Nothing about a block's own text is written unless its text decided it, so reopening a document under the other provider direction still reads correctly. Lexical leaves a top-level block at dir=auto and writes no attribute below it, so the rule covers both spellings. List items now take the block class that carries it; they took only their own layout styles before, which is why a nested item followed its container. 958 unit tests pass and the parity suite is 46 passed. * fix(richtext): keep its own copy of the first-strong classifier Cindy corrected her earlier instruction: Core's internal entry points are reserved for Core and Lab by architecture:public-component-api, and widening no-core-internal-import to RichText changes that rule, which is a separate owner decision. So RichText keeps its own copy of the classifier in packages/richtext/src/internal, with the same tests, and both copies carry a SYNC comment naming the other. The Core internal entry point and both lint-file edits are reverted: packages/core/package.json, eslint.config.js and the rule are byte-identical to main again, which also clears the sync-exports check that was failing on the generated exports map. AST-061 said both surfaces read the direction with the classifier in core's i18n entry point, which is no longer true for RichText, and its path-applicability block did not list the new file. Both corrected. Comment drift: the holder item takes its direction from the item it hangs from, not from the text under it, and three Arabic AL characters are written into the strong set, not four. The changeset now names Badge, Token and InputGroupText, which read the same strong set to decide whether their own text is right-to-left, so the digit correction reaches them too. 1329 unit tests pass, tsc and eslint are clean on both packages, and check:knowledge, check-changesets, sync-exports and the provenance baseline all pass. * fix(richtext): the document's direction comes from CSS, not an Effect design:bidirectionality DR9 rules out script where CSS can express the same thing, and an Effect was writing the document's direction onto the editor root after render. The surface root now sets a private custom property from a :dir() rule, as CodeBlock's root does, and a block whose own text decided nothing reads that property. A custom property still arrives unchanged through a list or table that reads the other way, which is what the property is for. The Effect, the useDirection() read, the root listener and the exported DOCUMENT_DIRECTION_VAR name are all gone; the plugin registers its transforms and nothing else. main gained component:CodeBlock FR16 while this branch sat, and it puts each fence line's code in its own dir=auto element. Core Markdown therefore meets FR6's per-line rule, where the theme comment, the plugin comment, a unit-test comment and the description all still said it reorders a whole block. Each now says both surfaces reach the rule, by different means. The changeset said Badge, Token and InputGroupText follow a label that opens with any of the listed characters. They read the strong set to ask whether the label holds a right-to-left character anywhere, so only the three Arabic marks change them, wherever those sit. Description: the plugin uses RichText's own copy of the classifier, not a shared one; the Markdown-visible change lists every character the sweep found, not only the first few; the real-editor test removes a paragraph from a quote; twelve commits; and the R7 line cites the gap form this edit leaves rather than the line it removes. Also the weak-set comment in both classifier copies, which said the set holds the right-to-left scripts' characters while it also holds the ASCII, fullwidth and mathematical digits. 968 unit tests pass and the parity suite is 46 passed with no Effect in the plugin. * chore(richtext): drop the variable the CSS rewrite left behind DOCUMENT_DIRECTION_VAR named --astryx-richtext-document-direction and described an Effect writing it on the editor root. Both went when the surface root started setting --_richtext-document-direction from a :dir() rule, and nothing imported the constant afterwards. Both classifier comments said the sets name the characters where script and category disagree with Bidi_Class. They name the ones this surface has needed; others still disagree, as they did before this change, so the comments say that instead of claiming the sets are complete. * fix(richtext): the root gives up a stored direction too The sweep cleared an arriving dir from lists, tables and code blocks but walked from the root's children, so the root itself was never visited. Lexical writes a stored root direction onto the editable element and every container under it inherits, so a value saved in a right-to-left document laid its tables and code frames out that way in an English one, with the copy button over the code, and kept the stale value when saved again. The root is a container: it carries no text of its own, so it gives the direction up and the surface decides. It joins the swept set, and $isSettled answers for it directly, since $wantedDirection already returns null for anything that is not a prose block. The container test's fixture already carried a root direction, so the case was there and unasserted; it now checks the root as well as the list. Both assertions compare against the stored rtl rather than null, because Lexical spells "no direction of its own" differently on a node it rendered than on one it did not, and the direction the containers take is what the test is about. The inset comment on ol repeated ul's seven lines; it points at ul now. 968 unit tests pass and the richtext Chromium suite is 116 passed, with the image-resize failure that reproduces on main. * fix(richtext): settle the direction before the browser paints The plugin registered its transforms in an ordinary effect, which React runs after the browser has painted, so the first frame showed a block in the document's direction and the write moved it. It registers in a layout effect now, which React runs after Lexical has written the document into the DOM and before paint, and settles the document already in the editor in that same frame: registering only arms the transforms, and a document loaded with the editor has run none of them. This does not make the rule expressible in CSS, which is what DR9 asks first. Under dir=auto the HTML Standard resolves a block with no strongly directional character to ltr, not to the surrounding direction, so no selector separates a block of English from a block of digits: both are :dir(ltr). unicode-bidi: plaintext resolves the same way, and lays a neutral line out left in a right-to-left page while leaving the computed direction saying rtl, which is why the parity tests pass over it. The one direction the platform cannot express is therefore the only one still written from script, and it is now written before anything is shown. Also: the SYNC line named two files that do not mirror this plugin; they mount it and set the custom property. And editorTheme.ts had a stray blank line. 968 unit tests pass, the parity suite is 46 passed, tsc and eslint are clean, and the provenance baseline is untouched. * Merge remote-tracking branch 'origin/main' into l0/pw-7723 * test(richtext): first-paint direction in an rtl page, and no onChange from a seeded mount A real-browser case records each seeded block's computed direction on the first frame that holds it, in a right-to-left page: an English paragraph reads ltr and a digit-only paragraph rtl. Unit cases check that mounting with a seeded document, or mounting the plugin on a document already shown, fires no onChange. The AST-061 FR6 verification row names the gap left for server-rendered documents without stored directions. Co-authored-by: potatowagon <[email protected]> * Merge remote-tracking branch 'origin/main' into l0/pw-7723 * docs(AST-061): drop the FR6 server-render gap line Neither RichTextEditor nor RichTextView renders a block on the server: both render an empty editable, and the client settles each block's direction before the first paint. The gap line described a state that does not occur. Co-authored-by: potatowagon <[email protected]> Co-authored-by: Cindy Zhang <[email protected]>
…#12382) [feat] MobileNav's painted drawer panel carries its own theme target, `mobile-nav-drawer`, with the resolved `side`, so a theme can give the panel a surface and text colors without painting the full-screen overlay behind it. The default look does not change.
…allGuidance) (#12218) [feat] An integration can say how its apps add a dependency: `installGuidance` in its manifest, one line where `{packages}` stands for the packages to add. Where the CLI prints a step that adds packages the app lacks (template readiness, `init`'s theme step, `doctor`'s fixes, theme hints and errors, `theme eject`, the theme editor's notes, and `discover`'s add commands), it prints that line instead of the package manager's command; the `template` and `theme eject` receipts carry it as `installGuidance` beside `installCommand`. Steps that move Astryx's own packages to another release, or add `@astryxdesign/cli` at the project's Core release, keep the package manager's command. Without guidance, doctor's Core and peer-dependency fixes, `theme build`'s no-Core message and `render`'s missing-package suggestion now print the project's package manager in place of a fixed `npm install`. Two different lines cancel out, and a new `install-guidance` doctor check warns. An invalid line is ignored with an `invalid_install_guidance` warning.
…rt (#12319) [experimental] `astryx experimental render` refuses a page that imports a name its module does not export, as a build refuses it, with `ERR_RENDER_COMPILE`: "The page does not compile (src/page.tsx, line 3): @astryxdesign/core has no export Chart". It checks named imports in the page's own modules from those modules (not from a CommonJS one, which a bundler reads by interop), from Astryx packages and from StyleX variables modules (`.stylex`), and an element drawn as `<Name.Member>` whose export has no such member. It counts only names the page uses as values, so a type imported without `type` is fine, and a file the page reads as text (`?raw`) is not checked. The script's build names the file and the module the same way. An import of a package subpath the package does not export (`@astryxdesign/core/Chart`) is refused the same way: "@astryxdesign/core has no export ./Chart". Before, the render named what the missing import broke, not the import: `ERR_RENDER_FAILED` with "Element type is invalid" for a missing component, `ERR_RENDER_FAILED` with "… is not a function" for a missing function the page calls as it loads, `ERR_RENDER_SCRIPT` for a name only the script uses, and a missing `.stylex` value rendered without its style and with no error.
…om a frozen one (#11927) * test(AlertDialog): the busy-thread motion proof tells a slow alert from a frozen one The proof counted an alert frame as still when its region's mean luma changed by 0.05 or less. Near the fade curve's luma stationary point a moving alert changes it by less than that in one frame (0.043 and 0.049 in two traced misses), so about one run in 200 failed under load with the alert still moving. The cast is lossless, so a frozen alert repeats its luma exactly. The cut is now 0.005: in 400 busy runs the smallest step on a frame the control moved was 0.039 for the entrance and 0.075 for the exit. The judge moves to its own module with unit tests: a frozen alert misses every frame, a slow alert misses none, and one repeated frame counts as a one-frame stall. * Merge main into test/alertdialog-busy-judge A clean merge onto current main; no conflicts.
…roves every target (#12449) * ci: the swizzle proof runs on main; a pull request runs it with the ci:run-swizzle label Main's Node legs already prove the targets each validated main commit affects, and the release re-check proves every target before a cut. A pull request now proves no target unless it carries ci:run-swizzle (run-labels), for a change to the swizzle tooling; the label adds all eight legs to its admission. Room plans the Node legs alone, so the pull-request peak drops from 21 to 19 and the full-width widen by 6. spec:AST-110/DEC-3. * ci: every release-check proves every swizzle target, in Chromium; the release-check requires it release-swizzle-proof runs the full swizzle proof of the cut commit (SWIZZLE_PROOF_ALL and SWIZZLE_PROOF_BROWSER) in eight legs on the release-check dispatch, and release-check fails unless every leg passed. The dispatch peak rises from 39 to 47 for those legs. spec:AST-110/DEC-3. * Merge remote-tracking branch 'origin/main' into ci/swizzle-proof-on-main * docs(specs): AST-110 FR7 and AST-030 FR12 describe the ci:run-swizzle opt-in and the release check's full swizzle proof * docs(specs): AST-030 FR13 and the AST-110 FR7 failure cell let a ci:run-swizzle run prove copies
…rop and the fix in development (#12386) [fix] In development, `Selector` and `MultiSelector` without an `options` array (for example with `<option>` children) throw an error that names the prop and shows the fix, instead of "options is not iterable". Production output is unchanged.
…e imports (#12532) [fix] The stored docs routes, and so the build id, are the same on every machine that packs the same files. How the machine's Node resolves module imports no longer changes which folders the stored routes list.
…12424) [fix] `ChatToolCalls` inside a `ChatMessage` now truncates a long target with an ellipsis on a narrow screen, instead of running past the message column.
…12495) * ci: review-signal reads the files and the diff of the event's head The files and the diff now come from a compare of the event's base and head SHAs, so the status and its diff always describe the event's head. A pull request of more than 300 files reads its file list, then confirms its head is the event's; its diff is never classified. * Merge remote-tracking branch 'origin/main' into ci/review-signal-event-head * test(ci): review-signal's harness feeds one file list to the compare and the list, and the size guard's case reaches the guard
…s and digits renders in its usual time again (#12533) [experimental] `astryx experimental render`: a page whose script holds a long run of letters and digits, such as a large string, renders in its usual time again. The pass that finds the script's reads of images from the embedded source started a match at every character of such a run, so a page with a 1 MB string took minutes.
…it that answers the same word (#12336) [fix] `astryx search` reads a docs namespace page at the reader's grain. A word the page's text shares with a doc beneath it, which that doc answers at least as strongly, is that doc's evidence, so a namespace page that sums up its guides no longer ranks above the components, templates, hooks and guides it summarizes. Words only the page carries, and its name, title, description and declared keywords, still match it. `build` is unchanged. @josephfarina
…in development (#12394) [fix] In development, `Citation` throws an error that names the `source` prop and shows the fix, instead of a TypeError from inside the component. Production output is unchanged. [fix] In development, `Selector` and `MultiSelector` without an `options` array (for example with `<option>` children) throw an error that names the prop and shows the fix, instead of "options is not iterable". Production output is unchanged.
[fix] A long-running CLI process reads a family doc or a theme or icon descriptor again when npm replaces it with a file of the same size and modification time, and reads the theme part data cache again when it is rewritten in place with the same size and modification time.
The stock, scatter and heatmap sample data now come from a small seeded pseudo-random generator instead of Math.random, so Dot/Scatter, both Candlestick stories and the WebGL scatter and heatmap stories draw the same geometry on every load. WebGL/Streaming starts from 60 seeded samples with a fixed window and still streams live by default. Pause, Step and Reset give a fixed frame for captures. No story id changes.
…he same data (#12547) The Continuous X story drew bar() on a numeric x. A bar draws only on a band scale, so the plot showed vertical grid lines and no data. It now draws a line with dots at the data's x values on the linear scale, over the vertical grid lines at the d3 ticks. A new Categorical X story draws bars from the same rows, keyed by label, so its vertical grid lines sit on the band centers. Read together, the two stories show that a categorical grid falls on every data point and a continuous grid falls on the d3 ticks, which need not match the data points. The rows are requests per minute in the 24 hours after a launch. Categorical X disables its controls: it shows one fixed state, and the tick count has no effect on a band scale. The Continuous X export name, and so its story id, does not change.
…12413) [fix] The `dashboard-scorecard` and `dashboard-progress` templates draw their trend lines as straight segments between the measured points, so a line no longer bends between measured points.
…line that would install in the wrong place (#12429) [experimental] `astryx experimental render`: when a page imports packages that are not installed, the suggested install line now follows the page's own package, and no line is offered where running it would install in the wrong place. The page's package decides the package manager. When its lockfiles disagree, the message names them and suggests no install, where it suggested `npm install`. For a page in another package than the folder you run from, the message names that package and the line to run there, since the line run here would add the packages to this folder's package. In a folder that no `package.json` holds, the message says to install them in the project that uses the page, and suggests no install, since an install there would make the folder a project.
…ut of its fixture runs (#12578) test(ci): the watchdog self-test keeps every VITEST_SHARD_ variable out of its fixture runs A Node leg sets VITEST_SHARD_TIMES_FILE for its own files; a fixture run that inherited it wrote its entry into that leg's times file. A new case proves the leg's file stays as it was.
) [fix] `astryx theme build` no longer sets the page root's color scheme. A built theme stylesheet used to declare `:root { color-scheme: light dark; }`, so a site that loads it without `reset.css`, and sets no scheme of its own, followed the reader's device: for a dark-mode reader its native controls, links and page canvas turned dark around its own light content. A theme now follows the page's scheme; it still pins it where the page or the Theme provider forces a mode (`html[data-theme="light"|"dark"]`), and a `--family` build drops the same rule from each theme's scope. Apps whose page scheme comes only from `reset.css` see no change, while an app that sets its own `color-scheme` on `html` (in its own CSS layer, as the Tailwind setup does) now keeps it. To follow the device with theme CSS alone, add reset.css or `html { color-scheme: light dark }`.
…12588) [fix] A Dialog's and a Drawer's header row now contains its title, close button and end content. A theme that paints the header row (a title bar) no longer sees the title spill above and below it. Every slot stays where it was, so a theme that leaves the row unpainted draws the same pixels.
* fix(cli): the swipe codemod defines each swipe once The deprecations codemod wrote createSwipe(...) inline on each row, with positional ids, so every render built a new swipe. It now defines each swipe once: at module scope, or in useMemo in the enclosing component or hook when a handler reads its props or state. A useState or useReducer setter and a ref stay out of the dependencies. Each new id is named after the action's label, then its handler. On a ListItem, a handler that reads the row's own itemKey value takes itemKey from onActivate instead, so one swipe serves every row. A conditional value keeps its condition on the row, and each of its objects is defined once. A spread of a local constant object with no swipe props gets no TODO. Where the codemod cannot define a swipe once, createSwipe stays on the row with a TODO. * fix(sandbox): the swipe actions cases page defines each swipe once The page built a new swipe for every row on every render. Each case now builds two swipes once, in useMemo: unread rows offer Read and read rows offer Unread. Each handler reads its row from the itemKey that every row now passes, and the row's click shares the same read toggle. * fix(core): the swipe's deps, record rows and test note The shared drag lists the committed options ref that its begin check reads; the ref is stable, so a root keeps one drag. The row-actions record's modality split says what FR4 says: a trackpad's horizontal scroll swipes a row, and a mouse drag or a mouse wheel's notches don't. The record's builder-impact example gives its action the id that every swipe action needs. The pinch-zoom spec's comment says a finger's swipe begins at the 8 px claim. * fix(cli): the swipe codemod proves the spread a map callback takes A row that spreads what an array literal's map callback takes, such as Item's States story, got the codemod's TODO, though every element gives it an object literal with no swipe props. The codemod now proves that case, for the callback's parameter or one place in its array pattern, and keeps the TODO when any element might carry a swipe prop. * fix(cli): the swipe codemod moves only what keeps its meaning The swipe codemod defines a swipe only where every value outside a handler stays the same. At module scope that is a literal, a JSX element, an import or a module const. In useMemo it also takes the owner's locals, as dependencies, and calls or property reads on them. Any other call, construction, property read or global stays at render, with createSwipe on the row and a TODO. Only a function declared or assigned under a capitalized or use name, directly or through memo or forwardRef, gets useMemo; a map or useCallback callback does not. A handler reads itemKey from onActivate only where it compares the row's key with === or !==, since itemKey can be undefined, and a typed fixture checks that output with tsc. An Item row's TODO says an Item passes no itemKey. An arrow component with an expression body defines every swipe in the one block it makes. * docs(AST-057): the codemod row says which itemKey reads move DEP-0017's codemod row said a ListItem handler gets the row's itemKey from onActivate. The codemod does that only for a handler that compares the key with === or !==; any other read keeps its closure. The row now says so. * fix(cli): the swipe codemod respects hoisting, render callbacks and lets When a row sits in a hoisted function declaration, its swipe's definition goes right after the last statement that declares a binding it reads when it runs, so a call above the declaration finds it. At module scope a handler's reads do not count, since a handler reads them when its action fires; useMemo reads its dependencies at once. Where code above that point can still reach the function, createSwipe stays on the row with a TODO. Such a row reuses a definition only if that definition already sits that early. Only an entry's onActivate counts as a handler: any other callback in the options runs at render and is checked like any value, and a ref's current or a setter call there stays at render. Rows share one definition only when every local their options read is a const, a parameter, or a function or class declaration. * fix(cli): the swipe codemod keeps rows whose locals are reassigned A local that the options read and that something writes after its declaration can hold another value at each row, or by the time the row renders, where a definition keeps one. That covers an assignment, an update, a for…in or for…of target, and a second declaration. Then createSwipe stays on the row with a TODO: a let reassigned above a hoisted function, a let reassigned in a loop before each row, and a parameter reassigned between two rows. Every local a definition reads now keeps one value, so rows with the same options always share one. * fix(cli): the swipe codemod keeps rows whose locals change through A local that the options read at render can change after its declaration without being assigned: something sets, updates or deletes a property read from it, or calls a method read from it. Code can also change it under another name, once it is passed to a call, named again by another binding, stored in an object or array, or returned. A hook's dependency list only compares its values, so it does not count. A value stored in a row's own options is that row's, so a shared handler still gets one definition. A definition would keep its value from before the change, so createSwipe stays on the row with a TODO. A handler reads its bindings when its action fires, so writing through or handing on a local that only a handler reads does not count. * fix(cli): the swipe codemod follows a choice to a local written through A write through a conditional, a logical expression or a sequence can reach a local the options read at render, as in `(isAlt ? labels : other).remove = 'Remove'`. The codemod now climbs those choices before it tests for a member write, a delete or a method call, as it already does for handing on. So createSwipe stays on the row with a TODO. * Merge main * fix(cli): the swipe codemod shares ids across a condition's branches A conditional swipeActions whose branches label the same place differently became two swipes with different ids. A row closes an open panel when its swipe's ids change, while deprecated entries with no id all keyed as ''. So the migrated row closed when the condition flipped, where it stayed open and relabelled before, and no TODO said so. Where both branches have as many entries on each side, and no place has ids that differ, each place whose entries have no id now gets one id in both: the labels' when they give the same one, else the handlers', else the side and place, with a TODO that asks for one id across the branches. Where a side has more entries in one branch, the key changed before too, and each branch keeps its own ids. Item's tests open a row through such a condition, with the deprecated props and with the codemod's output, and flip it: the row stays open and relabels. With the output's ids before this change, it closes. * fix(cli): the swipe codemod keys a condition's swipes as the props did One entry with no id and an empty side key alike, as '' in idsKeyOf. So a deprecated condition with one entry against none on a side kept an open row open when it flipped. The codemod stopped sharing ids when a side's counts differed, so the migrated row closed, with no TODO. The codemod now builds each branch's deprecated key as idsKeyOf does, and plans the ids before it writes any. A condition migrates only when its two swipes key alike exactly where the deprecated props did: own ids where the keys differ, shared ids where they match. Otherwise the props stay, with a TODO. That covers one entry against none on a side, and an id in one branch that the other takes from its label. A table test covers every condition with up to two entries a side, each with an id or none. On the previous head it fails for the 32 shapes whose props now stay. An Item test opens a row through the reported shape and flips it: with the props, it stays open, and with the previous output, it closes. * fix(cli): the swipe codemod decides a condition's ids where none is set The codemod compared a condition's two deprecated keys as text, so an id that is not a string literal compared by its source. READ_ID against 'read' read as apart, each branch kept its own ids, and an open row closed on a flip where the deprecated props kept it open. An id a branch sets stays as written, so a place where both branches set one keys as before, whatever the values. Now only the places with no id decide. Where the keys could match, those places share one id. Where an entry with no id faces a string literal, it takes a free id, so the keys stay apart. Where it faces no entry, '' or an id that is not a string literal, the props stay with a TODO. The table test adds an imported id that the codemod cannot read. It checks every value those ids may take, and runs the codemod again on every output. An Item test flips the reported shape. * fix(cli): the swipe codemod migrates a condition only when it can prove An entry that spreads a shared action can carry an id the codemod does not see, and the id it wrote went before the spread. So a condition with such an entry could key its two swipes otherwise than the deprecated props, and no TODO said so. A condition now migrates only when every entry in both branches is a plain object literal whose id is a string literal or absent: no spread, computed key, method or accessor, and one id at most. Then every id is known, so the codemod computes both keys before and after, exactly as idsKeyOf does, and migrates only when they compare alike. That check is the only gate. Any other condition keeps its props, with a TODO. An id that is a name, which the last change shared, now keeps its props too. The table test adds entries with a name id, a spread and a computed key. On the previous head it fails for 2,947 of its 5,920 conditions. * Merge main
…ce more (#12488) * ci: a hung checkout in PR CI stops after five minutes and is tried once more Every shallow ci.yml checkout with the 8-minute bound now has a 5-minute first try (4 in a 10-minute job), a second try that runs only when the first did not succeed, and a step that stops the job with 'checkout failed twice'. The first try's condition carries over. Short jobs and full-history checkouts keep one try. * Merge remote-tracking branch 'origin/main' into ci/checkout-retry * Merge remote-tracking branch 'origin/main' into ci/checkout-retry # Conflicts: # .github/workflows/ci.yml
… sort data (#12493) [docs] The useTableSortable doc now says in its first sentence that the plugin adds the header sort controls but does not reorder the rows, and shows two ways to sort the data: from the sort state yourself, or with useTableSortableState. It also says a column needs `sortable` to get a control, and gives the correct default of `allowUnsortedState` (`true`). No API or behavior changes.
…12548) The Default story of Charts/Chrome/Tooltip now has a play function. It hovers the April column through the chart's pointer layer and checks that a pointer at that point reaches the layer before and after the tooltip opens. It checks that the grouped tooltip opens with the April heading and the Revenue, Costs and Trend values of the pinned April fixture row. It then leaves the plot and checks that the tooltip closes. The story is added to the story play guard targets, so a broken assertion fails the story play guard in CI instead of passing silently.
…e browser does not show as written (#12400) [feat] `astryx theme build` warns about a component setting of a theme's page rules that the browser does not show as written, for each setting a key of the theme's own file (or a local theme it extends) writes, also through a call, a const or a spread; settings a helper function builds or a module the theme imports writes, its onDark and onLight surfaces and its adaptation rules are not read. It names one a later shorthand resets (a `border` after the block's own `borderTopColor`, or a second key that builds the same rule), one a more specific rule of the theme it extends beats on a variant, and one whose order against such a rule (or the theme's own variant of it) decides what shows where both hold. A rule for a runtime state alone (`:hover`, `selected`) is the look of that state and never counts. Each warning names the setting's line, the rule that wins and the change that makes it show, and the receipt lists them in `settingIssues`. The output is the same as before.
…s mobile layout) (#12477) [feat] Component docs: `playground.mobile` holds the props of a second render at a phone viewport, merged over `defaults`, for a component whose layout changes at phone width; the theme editor's part census renders it too. AppShell declares its mobile layout there (the menu button in the top bar, the open drawer); its playground defaults are unchanged.
…trims one subfolder per write, so it stays small and no run reads all of it (#12385) [fix] The per-user cache of transpiled TypeScript stays small and fast however many folders load the same files. Copies now live in `astryx/transpiled`, named for each file's text and settings, so the same file in many folders shares one copy, unless its text contains `meta`. Each new copy trims only its own subfolder, so no run reads the whole cache. Before, a machine that ran many projects or tests in fresh folders could fill the old single folder with hundreds of thousands of copies, and the next theme command spent minutes reading it. Project `doctor` now names that old folder and the command that removes it.
…2536) The blog index, a post page, and the landing page's blog section load each cover as the file a post names: PNG and JPEG files up to 3840 pixels wide and 1.4 MB each. The blog index downloads 4,706 KiB of covers. The three components that render a cover now ask the image optimizer for it, through the existing optimizedImageUrl helper, 1920 pixels wide. Each place has a layout where the cover is 650 to 975 CSS pixels wide, so a smaller width is soft on a 2x screen there. One width also lets a card and its article share one download. The rule for which formats the optimizer converts moves from the template image loader to that helper, so the loader and the covers share it. A cover in another format, such as the animated GIF, keeps its own file, and so does a URL on another host or a path with a query string. Page metadata keeps the cover file's own URL for the social card.
* perf(docsite): avatars load at the size the page shows them The community page's contributor wall loaded each GitHub avatar as the person uploaded it: up to 460 pixels on a side for a 48-pixel tile, and 557 KB for the twelve. A blog byline loaded 128-pixel files for avatars that it shows at 20 or 36 pixels. Both now ask GitHub for the size they show, at two device pixels for each CSS pixel. The wall also gives the browser a file for a 1x screen through `srcset`. The site prefetches the community page from every page that links to it, so the wall's avatars were also a background download on most first visits. * fix(docsite): the avatar helper parses a URL without URL.canParse The blog byline also renders in the browser, inside the blog index and the landing page's blog section. Chrome and Edge before version 120 have no `URL.canParse`, so the helper threw there. It now parses with `new URL` in a `try`. The byline test reads the Avatar size scale while the file loads, so no test waits for the module.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision for this head; no code defect blocks it.
- No current record settles the Order Detail discount's minus sign and no-break space (
packages/cli/assets/templates/pages/detail-page/page.tsx:468) or a stacked MetadataListItem label breaking a word longer than its column (packages/core/src/MetadataList/MetadataListItem.tsx:121-123), and the earlier/approve-specnames a head from before the rebase onto #12472, so an engineering owner records the decision by commenting/approve-spec <full head SHA>on this pull request (the author may, as an engineering owner).
With #12472's value rule on this branch, every invoice amount now stays on one line at 320 to 390 px, and at 150% text on 360 and 390 px screens, which fixes the earlier blocker. Non-blocking: the 'Paid by customer' row still overprints at 200% text on a 360 px phone, as it does on main, and two new comments in MetadataListItem.tsx run past the 25-word sentence limit (rewrites inline). The required test, build and docsite-test checks have not run on this head because CI was full, so they need a re-run.
Claims and files checked
Review mode: full; reason: rebase
- Claim (CLI release note): the discount uses a true minus sign held to its amount, not an en dash and a space a narrow row can break between. Verified in the source and in renders at 320 and 360 px.
- Claim (Core release note): a value no longer breaks an ordinary word or number in a tight row, and a word longer than its line still wraps. Verified: an amount beside a long description goes from 2 lines to 1 at 320 px, and long URLs wrap as before in four layouts.
- Claim: the template wrote an en dash, a plain space and the amount. Verified on
main. - Claim: on a phone the row can break between the dash and the number. Verified at 360 px.
- Claim: with this change the discount reads as a minus sign held by a no-break space. Verified.
- Claim: digit breaks come from the value rule, which #12472 fixes in Core, and this template carries no workaround. Verified; this branch carries that rule.
- Claim: without #12472 the unbreakable discount would split inside its number at 360 px. Verified.
- Claim: with #12472 the discount and every other amount stay on one line at 320 to 390 px. Verified for all six amounts.
- Claim: with #12472, no amount spans more than one line with or without this change. True for the numbers; without this change the en dash still wraps alone, which is this change's reason.
- Claim: on
mainamounts break inside their digits at 360 and 320 px in every official theme. Verified at 320 px; at 360 px only the dash separated with the fallback font, and theme fonts were not available. - Claim: at 1280 px only the minus glyph differs. Verified on the invoice card.
- Claim: the restoration is one template line. Verified for this pull request's own commit.
- Claim: no new public API is hidden under the fix. Verified: the built surfaces show no change.
- Claim: public text holds no internal context. Verified.
- Claim: the template tests pass (4) and the template docs typecheck. Verified.
- File
.changeset/cli-order-detail-discount-minus.md: clear. - File
.changeset/metadata-value-keeps-words.md: clear. - File
apps/storybook/stories/MetadataListReflowA11y.stories.tsx: clear. - File
packages/cli/assets/templates/pages/detail-page/page.tsx: the discount's sign and spacing await the owner decision. - File
packages/core/src/MetadataList/MetadataList.test.tsx: clear. - File
packages/core/src/MetadataList/MetadataListItem.tsx: the stacked label's word breaking awaits the owner decision; two non-blocking comment rewrites. - File
packages/core/src/MetadataList/__tests__/MetadataListReflow.a11y.chromium.spec.ts: clear.
…plans past ten minutes on a stale time (#12703) ci: record the Chromium interaction times from a full run, so no leg plans past ten minutes on a stale time
…n (draft) (#11112) * docs(spec): AST-113 Popover anchoring, dismissal veto, focus region and focus return (draft) * docs(spec): AST-113 isModal decides containment; one focus return rule for every layer * docs(spec): AST-116 record notes: read-at-open anchor, INV7 outside presses, named supersessions, accessibility requirements * docs(spec): AST-116 review fixes: ref and null anchors, non-modal Tab order, hidden modal surface, focus-return eligibility, named compatibility changes * docs(spec): AST-116 applies its current-state impact to Popover, Dialog, DropdownMenu, layer-runtime and overlay-dismissal * docs(spec): AST-116 puts anchor, anchorOutOfViewBehavior and onOutsidePress on usePopover only (DEC-8) * docs(spec): AST-116 drops the rectangle anchor (FR4, DEC-2) and keeps one record * docs(spec): AST-116 approved (authority current) * docs(spec): AST-116 record consistency: modal-only containment, sheet and focus-return changes named and classified, decided text kept with amendments * docs(spec): AST-116 gaps for FR15/FR16, focus-return changes named, anchor wording across layer-runtime, Escape on or inside the anchor or trigger * docs(spec): AST-116 FR17 condition in Dialog and DropdownMenu, FR15 gap names the dismissal stack, anchor wording in layer sizing * docs(spec): AST-116 AR4 covers dialog popovers * docs(spec): overlay-dismissal FR2 gap; AST-116 anchors generate a box; Dialog AR2 shares the FR4 gap * docs(spec): gap label names FR3; Popover DEC-8/DEC-9 qualified in DEC-5 * docs(spec): Dialog FR4 says focus return never moves focus to the body; overlay-dismissal matrix scopes the Popover-inside-Dialog rows * docs(spec): AST-116 FR2 says a shape passed as an anchor warns in development * docs(spec): AST-116 FR24 and DEC-9 keep the three composition inputs in usePopover over INV10's allowance; INV10 names the exception * docs(spec): AST-116 names the anchor with anchorRef, moves a popover on a repeated show(), and parks the outside-press veto; AST-059 FR5 hides a layer whose anchor is out of view unless a person is using it * docs(spec): AST-059 FR5 covers Escape while hidden, an anchor with no box and a removed anchor, with a manual screen-reader row; AST-116 AR1 follows * docs(spec): AST-116 FR19 hands the focus return only to a child that takes focus; the record's phase is accepted * docs(spec): AST-116's FR1 and FR23 verification row names Popover.test.tsx for Popover's own anchorRef * docs(spec): the out-of-view hide rule leaves this pull request; AST-116 keeps anchorRef, the same-press move, modality and focus return
…12481) * fix(ChatComposerDrawer): round the drawer with the composer corner The drawer read --radius-chat for its top corners and for the tuck under the composer body, while the body reads the composer's copy of the token. A theme that set chat-composer borderRadius moved the body, the status bar and the buttons, and left the drawer at --radius-chat. The drawer now reads the composer's copy, with --radius-chat as the fallback outside a composer. * chore(lint): refresh the comment-provenance baseline ChatComposerDrawer no longer cites an issue in a comment. --------- Co-authored-by: Kenton Daniel Quatman <[email protected]>
…s only new and far-off entries (#11910) * ci: the Node record refresh takes each leg's slowdown out and rewrites only new and far-off entries The refresh regenerated the record with the plain recorder, so every file a run reached took that run's raw time, a slow runner raised every entry and a fast one lowered them. Now each leg's times are divided by that leg's own slowdown (the drift check's leg factor, never below 1); a file the record lacks takes its time, and a recorded file takes it only when it is 1.5 times off its entry, either way, and at least 5 s away. * ci: regenerate fails on a log with no Node leg time, and counts only what the merge changed As the recorder does, a log with no Node leg time exits 1 and leaves the record as it was, so a refresh that is due never ends green without one. The printed count compares the merged record with the old one, so a swizzle-proof slice the merge keeps at its largest time is not counted. * Merge main into ci/node-record-normalized-legs
- #12252 docs(cli): agent docs name the prop names that differ from other libraries Author: Joey Farina <[email protected]> - #12154 fix(core): a numeric typography weight builds through an extended base's adaptation rules Author: Joey <[email protected]> - #12092 fix(cli): theme build reads the Core it builds with for variant declarations, and names the build command alone Author: Joey Farina <[email protected]> - #12316 fix(core): a shorthand never follows its own longhand in one style merge Author: josephfarina <[email protected]> - #12357 fix(core): a Table stays the scroll region when a host scrolls every table's parent Author: Joey Farina <[email protected]> - #12349 fix(core): end a mouse drag a sandboxed frame never saw released Author: josephfarina <[email protected]> - #12425 fix(cli): use a stored doc parse only with the zod release that made it Author: Joey <[email protected]> - #12396 fix(AppShell): with the standard width points, a server-rendered shell hides its inline side nav on a phone before its script runs Author: Joey <[email protected]> - #12438 fix(charts): end dots draw whole and a thinned axis keeps its last label Author: Joey Farina <[email protected]> - #12448 fix(cli): upgrade outside a project names the project, not --from Author: Joey Farina <[email protected]> - #12459 fix(templates): the dashboard scorecard fits a phone screen Author: Joey Farina <[email protected]> - #12428 fix(core): Field labels draw in a bolder face than their description Author: Joey Farina <[email protected]> - #12435 fix(theme-matcha): dark menus, popovers and muted fills take the theme's deep gray neutral Author: Joey <[email protected]> - #12432 fix(templates): dashboard chart labels show whole instead of clipped by the chart edge Author: Joey Farina <[email protected]> - #12441 fix(cli): mark icon-set generated calls pure so apps drop unused icons Author: Joey Farina <[email protected]> - #12472 fix(MetadataListItem): a value breaks only a word longer than its line Author: Joey <[email protected]>
…a change (#12755) * chore: pnpm preflight runs the pre-review report and CI's checks for a change * chore: pnpm preflight --quick checks the changed packages, files and tests alone * chore: preflight checks committed work, plans the Lab lane's typecheck and Prettier, names the CI checks it leaves out, and reuses review:pre's changed files * chore: preflight formats only the files CI's step checks, and says CI can run more than it does
… to its amount The discount reads U+2212 and a no-break space before the amount, not an en dash and a space a narrow row could break between. Amounts breaking inside their digits is Core's MetadataListItem value rule, fixed for every MetadataList in a separate change; this template carries no workaround for it. [skip ci]
184b906 to
16ef728
Compare
|
/approve-spec 16ef728 |
There was a problem hiding this comment.
Approved pending CI: the Order Detail template's discount now keeps its minus sign beside the amount on narrow screens, and an engineering owner recorded the decision on the sign and spacing for this head.
CI has not run on this head: the commit message ends with [skip ci], so the CI and Lint workflows never started, and the required checks still have to run on this head, or on the commit pushed again without [skip ci], before it can merge. GitHub's file list shows 841 files because the pull request's recorded base is the former #12472 branch head; against main the change is the one template line and its changeset.
Claims and files checked
Review mode: full; reason: rebase
- Changeset: the template writes the discount with a true minus sign held to its amount instead of an en dash and a breakable space. Verified (
page.tsx:468;astryx template detail-pageprints the line intact). - Description:
mainwrites an en dash, a plain space and the amount. Verified (page.tsx:468onmain). - Description: on a phone the row can break between the dash and the number. Verified: with the browser's fallback font the dash sits alone above
$15.00at every width from 280 to 390 px. - Description: with the change the discount reads a minus sign, a no-break space and the amount. Verified.
- Description: amounts splitting inside their digits is a separate Core cause fixed by #12472, which is on
main, and the template carries no workaround for it. Verified. - Description: every amount stays on one line at 320 to 390 px. Verified on this head from 280 to 414 px.
- Description: on
mainno amount spans two lines, with or without this change. Unverified: the theme's web font did not load, and with the fallback fontmainwraps the discount at 280 to 390 px. - Description: at 1280 px only the discount's sign glyph changes. Verified (24 frame pixels).
- Description: the smallest restoration is one line. Verified, plus the changeset.
- Testing: the template node tests pass (4). Verified; the one test file covers a hooks block, not this page.
- Testing: the template typechecks with the template-docs project. Verified; that project checks the template doc files, not
page.tsx. .changeset/cli-order-detail-discount-minus.md: clear.packages/cli/assets/templates/pages/detail-page/page.tsx: clear; Prettier and ESLint pass, and the template grades A on the template rubric.
- #12694 fix(cli): the Order Detail template's discount uses a minus sign held to its amount Author: @josephfarina - #12114 fix(templates): reset, reply, send and go-into icons mirror in right-to-left pages Author: @josephfarina - #12143 refactor(templates): example blocks lay out with HStack and VStack instead of flex wrappers Author: @josephfarina - #12158 fix(core): ChatComposer keeps its send action inside the composer on a narrow screen Author: @josephfarina - #12242 fix(cli): the npm commands the CLI runs for itself use npm's own noproxy setting Author: @josephfarina - #12283 fix(core): dark secondary text meets 4.5:1 on the neutral fill over the page and cards Author: @josephfarina - #12290 fix(Markdown): keep bulleted and numbered lists inside their column Author: @josephfarina - #12372 [fix] Heading: a missing level renders an h2 and warns, instead of crashing Author: @josephfarina - #12447 spec(AST-057): the swipe codemod's paths match it in any lifecycle folder Author: @josephfarina - #12475 fix(templates): on a phone the settings search moves under the title Author: @josephfarina - #12530 fix(cli): the contact-form template fits a phone; its section fills the width up to 800px Author: @josephfarina
|
Landed in #12812. |
User impact
The Order Detail template writes its discount as an en dash, a plain space and the amount (
– $15.00). An en dash is not a minus sign, and on a phone the row can break between the dash and the number, leaving the sign alone on one line. With this change the discount reads− $15.00: a true minus sign held to its amount by a no-break space.Amounts that broke inside their digits on a phone (
$0.0over0,– $15.0over0) are a separate cause: MetadataListItem's value rule let a row squeeze a value into breaking an ordinary number. #12472 fixes that in Core for every MetadataList value, so this template carries no workaround for it. #12472 (MetadataList values keep ordinary words whole) is on main now, so the discount, and every other amount, stays on one line at 320 to 390 px.Problem and solution fit
The discount's
Textreads− {fmt(DISCOUNT)}(U+2212, then a no-break space).Expected behavior and authority
Smallest restoration
packages/cli/assets/templates/pages/detail-page/page.tsx: one line, the discount's sign and space.Evidence
Scope
Templates: Order Detail
Testing
CI=1 pnpm vitest run --project node packages/cli/assets/templates(4 passed)tsconfig.template-docs.json).