Repository navigation
chore: land 3 reviewed pull requests together (batch 71) - #12964
josephfarina wants to merge 8 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 063d91d |
There was a problem hiding this comment.
Changes requested for one false sentence in the description. The code, tests and changesets check out.
- The description says every test page the stack adds imports Core's stylesheet, but the new keep-class-names page and the 400-button alias page in
packages/cli/api/render/render.interactive.test.mjs(lines 1248 and 1273) and the new page inapps/docsite/src/__tests__/landing-template-previews.test.ts(line 165) import only Core's Button, so please reword it (for example "imports Core's stylesheet or a Core component") or add the stylesheet import to those pages.
Two test notes do not block: packages/cli/api/render/render.test.mjs:1217 still finds the page script with lastIndexOf('<script>'), which on a module page lands on a string inside the bundle, and the pageDom() header promises a strict mode that JSDOM does not enforce. Exported pages look identical before and after, with scripts blocked and running, while a 400-card page shrinks by about 42% and a photo page by one copy of its image.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: three reviewed pull requests merge onto current main as separate merges, in stack order. Verified: each merge is a clean merge of that member's head.
- Claim: the three form a stack, each built on the one below, with the preflight pass line on every layer. Verified.
- Claim: the script reads a first-paint image the code names as a whole string, so the file holds it one time fewer. Verified by the tests and a photo page that drops by one copy of its image.
- Claim: aliases apply only to classes the kept Core or official package stylesheets name, and page classes and attribute-selected classes keep their names. Verified in the code and tests.
- Claim: the experimental render function gains a keep-class-names option that reverse refuses. Verified.
- Claim: the page's script is a module script. Verified, with the changeset's exception for sloppy CommonJS and current-script readers.
- Claim: every test page the stack adds imports Core's stylesheet. False: three pages import only Core's Button.
- Claim: no records change beyond the owner decisions and the spec approvals at each layer and this head. Verified.
- Claim: the writing rubric does not apply because no record changes. Verified.
- Claim: each member closes with a note when this merges. A later step, not checkable at this head.
- Changeset (one copy fewer): an image shown through src, srcset or poster and named whole is read from the first paint, an https image is held once, and the first paint is unchanged with scripts blocked. Verified by tests, sizes and identical frames; the quoted megabyte figures are the author's page.
- Changeset (class aliases): repeated package class lists become one short class once they add up to 16 KB, page classes keep their names, the look is unchanged with scripts blocked, the script draws with the real classes, reverse is exact, and restyling callers can keep the names. Verified; the 10,000-row grid figure is the author's.
- Changeset (module script): the script is a module when it runs the same in strict mode, and sloppy CommonJS or current-script pages keep a classic script. Verified; the phone timing is the author's measurement.
- File
.changeset/render-class-aliases.md: clear. - File
.changeset/render-image-once-markup.md: clear. - File
.changeset/render-module-script.md: clear. - File
apps/docsite/scripts/generate-landing-template-previews.mjs: clear. - File
apps/docsite/src/__tests__/landing-template-previews.test.ts: its new page imports only Core's Button (the description claim). - File
packages/cli/api/render/_adapter.mjs: clear. - File
packages/cli/api/render/render.doc.mjs: clear. - File
packages/cli/api/render/render.interactive.test.mjs: two new pages import only Core's Button (the description claim). - File
packages/cli/api/render/render.mjs: clear. - File
packages/cli/api/render/render.notes.test.mjs: clear. - File
packages/cli/api/render/render.test.mjs: non-blocking (line 1217 no longer finds the page's script tag). - File
packages/cli/api/render/render.type.mjs: clear. - File
packages/cli/foundation/doc-compiler/doc-loads.test.mjs: clear. - File
packages/cli/foundation/render/class-alias.mjs: clear. - File
packages/cli/foundation/render/class-alias.test.mjs: clear. - File
packages/cli/foundation/render/client-bundle.mjs: clear. - File
packages/cli/foundation/render/html-reader.mjs: clear. - File
packages/cli/foundation/render/page-worker.mjs: clear. - File
packages/cli/foundation/render/remote-images.test.mjs: clear. - File
packages/cli/foundation/render/render-page.mjs: clear. - File
packages/cli/foundation/render/render.test.mjs: clear. - File
packages/cli/test-utils/page-dom.mjs: non-blocking (its strict-mode promise does not hold under JSDOM).
| * runs them. JSDOM runs classic scripts but not module scripts, and a | ||
| * rendered page's script is an inline module: this runs each inline module | ||
| * once the document is parsed (readyState interactive, before | ||
| * DOMContentLoaded), in strict mode, with no `this` at its top |
There was a problem hiding this comment.
Non-blocking: under JSDOM this wrapper does not enforce strict mode. A module that runs undeclaredName = 1 finishes with no error event and the name lands on window. So a test using pageDom() cannot catch a sloppy module that gets a module script; the header could say that.
|
/approve-spec f242b86 |
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
The one blocking point from the last review is fixed: the description now says every test page the stack adds imports Core's stylesheet or a Core component, and all 32 pages do. The code is unchanged since that review, and the changed render tests pass on this head. Two test notes still do not block: packages/cli/api/render/render.test.mjs:1217 finds the page script with lastIndexOf('<script>'), which on a module page lands on a string inside the bundle, and the pageDom() header in packages/cli/test-utils/page-dom.mjs promises a strict mode that JSDOM does not enforce for an undeclared write.
Claims and files checked
Review mode: incremental; reason: none
- Claim: three reviewed pull requests merge onto main as separate merges, in stack order. Verified: each merge commit's parent is that member's head, and the head still merges cleanly into the newest main.
- Claim: the three form a stack, each built on the one below, with the pass line on every layer. Verified from the member pull requests and their commits.
- Claim: the bullet titles are the member titles. Verified.
- Claim: the script reads a first-paint image the code names as a whole string, so the file holds it one time fewer. Verified by the tests and a photo page that drops by one copy of its image.
- Claim: aliases apply only to classes the kept Core or official package stylesheets name, and page classes and attribute-selected classes keep their names. Verified in the code and tests.
- Claim: the experimental render function gains a keep-class-names option that reverse refuses. Verified.
- Claim: the page's script is a module script. Verified, with the changeset's exception for sloppy CommonJS and current-script readers.
- Claim: every test page the stack adds imports Core's stylesheet or a Core component. Verified: 29 of the 32 pages import the stylesheet and 3 import Core's Button.
- Claim: no records change beyond the owner decisions and the spec approvals at each layer and this head. Verified.
- Claim: the writing rubric does not apply because no record changes. Verified.
- Claim: each member closes with a note when this merges. A later step, not checkable at this head.
- Changeset (one copy fewer): an image shown through src, srcset or poster and named whole is read from the first paint, an https image is held once, and the first paint is unchanged with scripts blocked. Verified by tests, sizes and identical frames; the quoted megabyte figures are the author's page.
- Changeset (class aliases): repeated package class lists become one short class once they add up to 16 KB, page classes keep their names, the look is unchanged with scripts blocked, the script draws with the real classes, reverse is exact, and restyling callers can keep the names. Verified; the 10,000-row grid figure is the author's.
- Changeset (module script): the script is a module when it runs the same in strict mode, and sloppy CommonJS or current-script pages keep a classic script. Verified; the phone timing is the author's measurement.
- File
.changeset/render-class-aliases.md: clear. - File
.changeset/render-image-once-markup.md: clear. - File
.changeset/render-module-script.md: clear. - File
apps/docsite/scripts/generate-landing-template-previews.mjs: clear. - File
apps/docsite/src/__tests__/landing-template-previews.test.ts: clear. - File
packages/cli/api/render/_adapter.mjs: clear. - File
packages/cli/api/render/render.doc.mjs: clear. - File
packages/cli/api/render/render.interactive.test.mjs: clear. - File
packages/cli/api/render/render.mjs: clear. - File
packages/cli/api/render/render.notes.test.mjs: clear. - File
packages/cli/api/render/render.test.mjs: non-blocking (line 1217 no longer finds the page's script tag). - File
packages/cli/api/render/render.type.mjs: clear. - File
packages/cli/foundation/doc-compiler/doc-loads.test.mjs: clear. - File
packages/cli/foundation/render/class-alias.mjs: clear. - File
packages/cli/foundation/render/class-alias.test.mjs: clear. - File
packages/cli/foundation/render/client-bundle.mjs: clear. - File
packages/cli/foundation/render/html-reader.mjs: clear. - File
packages/cli/foundation/render/page-worker.mjs: clear. - File
packages/cli/foundation/render/remote-images.test.mjs: clear. - File
packages/cli/foundation/render/render-page.mjs: clear. - File
packages/cli/foundation/render/render.test.mjs: clear. - File
packages/cli/test-utils/page-dom.mjs: non-blocking (its strict-mode promise does not hold for an undeclared write under JSDOM).
f242b86 to
0801b09
Compare
|
/approve-spec 0801b09 |
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
This head rebuilds the batch on current main with the same changes as before, and nothing blocks. Each change is covered by the engineering owner's decisions and the /approve-spec at this head, and the render tests, the render browser cases and the template round trips pass here. One small test cleanup is worth doing, but it does not block:
packages/cli/api/render/render.test.mjs:1217slices fromlastIndexOf('<script>'), which now lands inside React DOM's"<script><\/script>"string rather than at the page's<script type="module">tag, so that check skips the start of the script; slicing from'-->\n<script', asscriptOfinrender.interactive.test.mjsdoes, would fix it.
Claims and files checked
Review mode: full; reason: rebase
- Claim: three reviewed pull requests merged onto current main, each as its own merge, in stack order: verified from the merge commits.
- Claim: the three members form a stack, each built on the one before: verified from the commit parents and the members' Stack line.
- Claim: each member keeps its description and pass line: verified on all three (the pass line names the member's head before this rebuild).
- Claim: the script reads an image shown through src, srcset or poster from the first paint, one copy fewer: verified (
render-page.mjs, interactive and remote-image tests, a photo page with one data URI). - Claim: aliases only for Core and official package classes, never for page classes or classes an attribute selector can match: verified (
class-alias.mjs,class-alias.test.mjs). - Claim:
render()gains experimentalkeepClassNames, refused withreverse: verified (render.mjs:33,:59, interactive test). - Claim: the page's script is a module script: verified, with the changeset's classic-script exceptions.
- Claim: every test page the stack adds imports Core's stylesheet or a Core component: verified over all 22 added page sources.
- Claim: no records beyond the owner decisions and the spec approvals at each layer's head and this head: verified.
- Changesets (aliases, first-paint images, module script): verified; the MB and timing figures are the author's measurements.
- Files clear:
.changeset/render-class-aliases.md,.changeset/render-image-once-markup.md,.changeset/render-module-script.md,apps/docsite/scripts/generate-landing-template-previews.mjs,apps/docsite/src/__tests__/landing-template-previews.test.ts,packages/cli/api/render/_adapter.mjs,packages/cli/api/render/render.doc.mjs,packages/cli/api/render/render.interactive.test.mjs,packages/cli/api/render/render.mjs,packages/cli/api/render/render.notes.test.mjs,packages/cli/api/render/render.type.mjs,packages/cli/foundation/doc-compiler/doc-loads.test.mjs,packages/cli/foundation/render/class-alias.mjs,packages/cli/foundation/render/class-alias.test.mjs,packages/cli/foundation/render/client-bundle.mjs,packages/cli/foundation/render/html-reader.mjs,packages/cli/foundation/render/page-worker.mjs,packages/cli/foundation/render/remote-images.test.mjs,packages/cli/foundation/render/render-page.mjs,packages/cli/foundation/render/render.test.mjs. - Files with a non-blocking note:
packages/cli/api/render/render.test.mjs(line 1217, above);packages/cli/test-utils/page-dom.mjs(its header says it runs module scripts in strict mode, but under JSDOM an undeclared write still does not throw).
PR Analysis Report🔎 Preview ·
|
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| + | cli |
./api/experimental · Types · type RenderOptions |
keepClassNames?: boolean | undefined |
import type {RenderOptions} from '@astryxdesign/cli/api/experimental'; const x: RenderOptions = {keepClassNames: …} |
Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
…m the first paint A file carried each image its first paint shows twice: as a data: URI in the markup and again in the page's script. The markup now numbers each value it carries (data-astryx-carried, written once per img, source, input or video element after its last attribute), and the script reads those values from the first paint before the page mounts. A local path the script holds as a whole string becomes that read; an https address stays as the page wrote it, and the image sinks read its data from the first paint instead of holding a second copy. Only elements a browser builds carry anything the script reads. The HTML scanner reads raw text, comments, CDATA, tag names, self-closing tags, and svg and MathML content as the HTML tokenizer and tree builder do; noscript, template and select content marks nothing; and the first markup shape a serializer never writes (a mis-nested end tag, CDATA, a bogus comment, a comment holding --!>, a non-void self-closing tag, plaintext, frameset, or a stray tag in a select) stops the marks for the rest of the text, so every later image keeps its own copy. [skip ci]
…tryx's StyleX classes by one alias A page that repeats an element repeats its StyleX class list each time, and those lists are most of a large page's markup. Each repeated list of the StyleX classes Astryx's packages write becomes one short alias class in the first paint (the page's own classes keep their names), and every rule that names one of its classes also names the alias in the same place, so the alias matches exactly where the classes match. Only the first paint changes; the page's script draws its own elements with the classes StyleX wrote, and the page comes back exactly. [skip ci]
0801b09 to
fd10096
Compare
|
/approve-spec fd10096 |
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
This head rebuilds the batch on a newer main, and the only new lines fit it to main's one-colour-mode themes; nothing blocks. Each change is covered by the engineering owner's decisions and the /approve-spec at this head, and the render tests, the render browser cases (including main's colour-mode cases) and the template round trips pass here. One small test cleanup is worth doing, but it does not block:
packages/cli/api/render/render.test.mjs:1406slices fromlastIndexOf('<script>'), which now lands inside React DOM's"<script><\/script>"string rather than at the page's<script type="module">tag, so that check skips the start of the script; slicing from'-->\n<script', asscriptOfinrender.interactive.test.mjsdoes, would fix it.
Claims and files checked
Review mode: full; reason: rebase
- Claim: three reviewed pull requests merged onto current main, each as its own merge, in stack order: verified from the merge commits.
- Claim: the three members form a stack, each built on the one before: verified from the commit parents and the members' Stack line.
- Claim: each member keeps its description and pass line: verified on all three (the pass line names an older head of the top member).
- Claim: the script reads an image shown through src, srcset or poster from the first paint, one copy fewer: verified (
render-page.mjs, interactive and remote-image tests, a photo page with one data URI). - Claim: aliases only for Core and official package classes, never for page classes or classes an attribute selector can match: verified (
class-alias.mjs,class-alias.test.mjs). - Claim:
render()gains experimentalkeepClassNames, refused withreverse: verified (render.mjs:33,:58, interactive test). - Claim: the page's script is a module script: verified, with the changeset's classic-script exceptions.
- Claim: every test page the stack adds imports Core's stylesheet or a Core component: verified over all 22 added page sources.
- Claim: no records beyond the owner decisions and the spec approvals at each layer's head and this head: verified.
- Changesets (aliases, first-paint images, module script): verified; the MB and timing figures are the author's measurements.
- Files clear:
.changeset/render-class-aliases.md,.changeset/render-image-once-markup.md,.changeset/render-module-script.md,apps/docsite/scripts/generate-landing-template-previews.mjs,apps/docsite/src/__tests__/landing-template-previews.test.ts,packages/cli/api/render/_adapter.mjs,packages/cli/api/render/render.doc.mjs,packages/cli/api/render/render.interactive.test.mjs,packages/cli/api/render/render.mjs,packages/cli/api/render/render.notes.test.mjs,packages/cli/api/render/render.type.mjs,packages/cli/foundation/doc-compiler/doc-loads.test.mjs,packages/cli/foundation/render/class-alias.mjs,packages/cli/foundation/render/class-alias.test.mjs,packages/cli/foundation/render/client-bundle.mjs,packages/cli/foundation/render/html-reader.mjs,packages/cli/foundation/render/page-worker.mjs,packages/cli/foundation/render/remote-images.test.mjs,packages/cli/foundation/render/render-page.mjs(its style line now fitsmain's colour-mode code),packages/cli/foundation/render/render.test.mjs. - Files with a non-blocking note:
packages/cli/api/render/render.test.mjs(line 1406, above);packages/cli/test-utils/page-dom.mjs(its header says it runs module scripts in strict mode, but under JSDOM an undeclared write still does not throw).
|
/approve-spec 86e947e |
A classic script at the end of the body runs as soon as the parser reaches it. On a page small enough to arrive at once, that is before the browser first paints, so the first paint waited for the script. A module script runs once the document is parsed, so the browser paints the markup first. A module script runs in strict mode, so the script is one only when it runs the same there: a module parse accepts it, and every file in it that is not an ES module asks for strict mode itself. A page that bundles a CommonJS package written for sloppy mode keeps a classic script. The tests run a page's module script with a JSDOM helper in test-utils (JSDOM runs only classic scripts); the docsite's landing previews strip either script. [skip ci]
86e947e to
89e9241
Compare
|
/approve-spec 89e9241 |
Merges three reviewed pull requests onto current main, each as its own
--no-ffmerge, in this order. #12345 → #12752 → #12761 form a stack, each layer built on the one before it. Each member keeps its own description, tests and review history; the stack's pass line is on every layer.Scope
Tests: a copy of the main-red fix #13001 (a
lab__MediaPlayerswizzle sample), so this batch's test shards run green on today's main.Components: CLI experimental export. The exported file's script reads an image shown through
src,srcsetorposterfrom the first paint when the page's code names it as a whole string, so the file holds such an image one time fewer (#12345). The first paint names each repeated list of Astryx's StyleX classes by one short alias, only for classes that the kept CSS of Core or@astryxdesign/*stylesheets names; a page's own classes and any class an attribute selector onclasscan match keep their names;render()gains the experimentalkeepClassNamesoption, refused withreverse(#12752). The page's script is a module script (#12761). Every test page the stack adds imports Core's stylesheet or a Core component.Records
None beyond the owner decisions recorded on #12345 and #12752, and the
/approve-specat each layer's head and at this head.Writing rubric results
No record changes, so R1–R7 do not apply.
When this merges, each pull request above is closed with a note that names this one.