Repository navigation
feat(cli): page templates ai-chat to kanban-board import icons by meaning - #12754
josephfarina wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Copied templates keep every icon, but approval waits on an engineering owner's decision about the placeholder model, and five fixes are needed either way.
Owner decision. AST-084 FR21-FR23 (template icon placeholders, copies filling them, meaning fallbacks) are not on main yet: they come from #12741, #12747 and #12748, this pull request adds FR21 requirements, and main's FR9/FR10 still require every imported template icon to be declared in icons. An engineering owner, the author included, records approval of FR21-FR23 as written here by commenting /approve-spec <full head SHA> on this pull request, and that decision should also say whether the template rubric's self-contained-imports item admits @astryxdesign/template-icons.
Required fixes:
- The docsite ShadCN registry builds its page items from the authored template source, so the private
@astryxdesign/template-iconsimport makes it skip all 25 pages (apps/docsite/scripts/generate-shadcn-registry.mjs:101-114,:758-778) and the preview's route-lock check fails; fill placeholders there before reading dependencies and content, with a registry test. - The docsite template registry gives the playground and code view the unfilled source (
apps/docsite/scripts/generate-data.mjs:1789), and the playground scope has no@astryxdesign/template-icons, so these templates render without icons there; fill placeholders in that displayed source. pnpm -F @astryxdesign/cli typecheckfails with TS2339 atpackages/cli/scripts/migrate-template-icons.mjs:268,:269and:307, becausefoundis narrowed tonull; cast the valueiconsPropertyreturns.- Under the template rubric's ratchet, 15 templates (
ai-chat,ai-chat-landing,centered-hero,checkout-wizard,contact-form,course-detail,detail-page,documentation-design,editor,file-explorer,form-wizard-inline,form-wizard-vertical,gallery-hero,ide,incident-console) lose the 2 self-contained-imports points they have onmain, because they now import an unpublished package. - The description needs a
## Writing rubric resultssection for the AST-084 change.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- The 25 pages from ai-chat to kanban-board import icons from the placeholder package and no library: verified (import scan of all 25 pages).
- Copies draw the same icons: verified (each placeholder resolves to the library icon the base imported; the code below the imports changes only by those names; the copy output imports aliased Heroicons).
- Imports keep their look, and uses take the meaning name unless aliased: verified.
- Descriptors drop
icons: verified (25 of 25). - The script moves templates by declared meaning, stops on a mismatch, and gives identical results on reruns: verified (rerun from the base reproduces the head exactly; a rerun on the head changes nothing; the stop test passes).
- The declarations test checks placeholder names, looks, drawn meanings and leftover
icons: verified (code and tests pass). - Template meaning counts do not change: verified (per-template meaning sets equal).
- The icon tests read placeholder imports, and the dev dependency lets the typecheck resolve them: verified (tests pass; no unresolved placeholder import).
- AST-084 FR21 describes the checks and the script: verified.
- The listed tests pass: verified for the placeholder, migration, declarations and template suites.
pnpm check:knowledgepasses: verified.- Changeset (same icons in copies with and without a set; counts read placeholders): verified for
astryx templatecopies.
Files:
packages/cli/scripts/migrate-template-icons.mjs: typecheck errors.docs/specs/AST-084-icon-sets/spec.md: owner decision; writing rubric results missing.- 15 page templates listed above: rubric ratchet.
packages/cli/assets/templates/pages/canvas-editor/page.tsx: detached comments (note).- The other 9 page templates (
dashboard,dashboard-alert-rail,dashboard-cohort-funnel,dashboard-comparison,dashboard-composition,dashboard-progress,dashboard-scorecard,documentation-technical,kanban-board): clear for this change. - 25
template.doc.mjsdescriptors: clear. packages/cli/scripts/migrate-template-icons.test.mjs,packages/cli/foundation/discovery/template-placeholders.mjs,template-placeholders.test.mjs,template-icon-meanings.mjs,packages/cli/test/template-icon-declarations.test.mjs: clear.packages/cli/api/template/canvas-editor-corner-icons.test.mjs,canvas-editor-flip-icons.test.mjs,form-wizard-vertical-review-icon.test.mjs,show/show.test.mjs: clear.packages/cli/package.json,pnpm-lock.yaml,.changeset/template-icons-migrate-1.md: clear.
20567e8 to
fdfc229
Compare
753d10e to
b0b468b
Compare
There was a problem hiding this comment.
Copied templates keep every icon, but approval waits on an engineering owner's decision about the placeholder model, and five fixes are needed either way.
Owner decision. AST-084 FR21-FR23 (template icon placeholders, copies filling them, meaning fallbacks) are not on main yet: they come from #12741, #12747 and #12748, this pull request adds FR21 requirements, and main's FR9/FR10 still require every imported template icon to be declared in icons. An engineering owner, the author included, records approval of FR21-FR23 as written here by commenting /approve-spec <full head SHA> on this pull request, and that decision should also say whether the template rubric's self-contained-imports item admits @astryxdesign/template-icons.
Required fixes:
- The docsite ShadCN registry builds its page items from the authored template source, so the private
@astryxdesign/template-iconsimport makes it skip all 25 pages (apps/docsite/scripts/generate-shadcn-registry.mjs:101-114,:758-778) and the preview's route-lock check fails; fill placeholders there before reading dependencies and content, with a registry test. - The docsite template registry gives the playground and code view the unfilled source (
apps/docsite/scripts/generate-data.mjs:1789), and the playground scope has no@astryxdesign/template-icons, so these templates render without icons there; fill placeholders in that displayed source. pnpm -F @astryxdesign/cli typecheckfails with TS2339 atpackages/cli/scripts/migrate-template-icons.mjs:268,:269and:307, becausefoundis narrowed tonull; cast the valueiconsPropertyreturns.- Under the template rubric's ratchet, 15 templates (
ai-chat,ai-chat-landing,centered-hero,checkout-wizard,contact-form,course-detail,detail-page,documentation-design,editor,file-explorer,form-wizard-inline,form-wizard-vertical,gallery-hero,ide,incident-console) lose the 2 self-contained-imports points they have onmain, because they now import an unpublished package. - The description needs a
## Writing rubric resultssection for the AST-084 change.
Claims and files checked
Review mode: carry-forward; reason: none
Claims:
- The 25 pages from ai-chat to kanban-board import icons from the placeholder package and no library: verified (import scan of all 25 pages).
- Copies draw the same icons: verified (each placeholder resolves to the library icon the base imported; the code below the imports changes only by those names; the copy output imports aliased Heroicons).
- Imports keep their look, and uses take the meaning name unless aliased: verified.
- Descriptors drop
icons: verified (25 of 25). - The script moves templates by declared meaning, stops on a mismatch, and gives identical results on reruns: verified (rerun from the base reproduces the head exactly; a rerun on the head changes nothing; the stop test passes).
- The declarations test checks placeholder names, looks, drawn meanings and leftover
icons: verified (code and tests pass). - Template meaning counts do not change: verified (per-template meaning sets equal).
- The icon tests read placeholder imports, and the dev dependency lets the typecheck resolve them: verified (tests pass; no unresolved placeholder import).
- AST-084 FR21 describes the checks and the script: verified.
- The listed tests pass: verified for the placeholder, migration, declarations and template suites.
pnpm check:knowledgepasses: verified.- Changeset (same icons in copies with and without a set; counts read placeholders): verified for
astryx templatecopies.
Files:
packages/cli/scripts/migrate-template-icons.mjs: typecheck errors.docs/specs/AST-084-icon-sets/spec.md: owner decision; writing rubric results missing.- 15 page templates listed above: rubric ratchet.
packages/cli/assets/templates/pages/canvas-editor/page.tsx: detached comments (note).- The other 9 page templates (
dashboard,dashboard-alert-rail,dashboard-cohort-funnel,dashboard-comparison,dashboard-composition,dashboard-progress,dashboard-scorecard,documentation-technical,kanban-board): clear for this change. - 25
template.doc.mjsdescriptors: clear. packages/cli/scripts/migrate-template-icons.test.mjs,packages/cli/foundation/discovery/template-placeholders.mjs,template-placeholders.test.mjs,template-icon-meanings.mjs,packages/cli/test/template-icon-declarations.test.mjs: clear.packages/cli/api/template/canvas-editor-corner-icons.test.mjs,canvas-editor-flip-icons.test.mjs,form-wizard-vertical-review-icon.test.mjs,show/show.test.mjs: clear.packages/cli/package.json,pnpm-lock.yaml,.changeset/template-icons-migrate-1.md: clear.
fdfc229 to
6d0b64c
Compare
b0b468b to
53c9c8f
Compare
6d0b64c to
ece53d2
Compare
53c9c8f to
cc94fd6
Compare
ece53d2 to
5ca2b96
Compare
cc94fd6 to
b83519e
Compare
There was a problem hiding this comment.
Copied templates keep every icon, but approval waits on an engineering owner's decision about the icon placeholder model, and six findings below need action as well.
Owner decision. AST-084 FR21-FR23 (template icon placeholders, copies filling them, meaning fallbacks) are not on main yet: they come from #12741, #12747 and #12748, this pull request adds FR21 requirements, and main's FR9 still requires each imported icon to be declared in the descriptor's icons. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. The same decision settles whether the template rubric's self-contained-imports list names @astryxdesign/template-icons.
Required fixes
- The docsite ShadCN registry builds none of the 25 pages, because their source imports an unpublished package, so a canary docsite build fails its route-lock check: fill placeholders before the registry reads dependencies and content (
apps/docsite/scripts/generate-shadcn-registry.mjs:101-114,:758-778). - The docsite playground, code view and MCP source hand out the unfilled source, so every icon in these templates renders blank in the playground: fill placeholders at
apps/docsite/scripts/generate-data.mjs:1789. - Miss: with
DOCSITE_ICON_SETset,rewriteTemplatePreviewreturns these 25 sources unchanged because their descriptors no longer declareicons, so the previews keep Heroicons instead of the chosen set, against AST-084 FR20 (apps/docsite/scripts/template-icon-loader.mjs:122-123). pnpm -F @astryxdesign/cli typecheck:strictfails with TS2339 atpackages/cli/scripts/migrate-template-icons.mjs:268,:269and:307, which a cast oficonsProperty's return value fixes.- Fifteen templates lose the template rubric's self-contained-imports points by importing
@astryxdesign/template-icons, which lowers each below itsmainscore unless the owner decision above changes the rubric. - The description needs
## Writing rubric resultsfor the AST-084 change.
Claims and files checked
Review mode: full; reason: rebase
- Claim: the 25 pages from ai-chat to kanban-board import icons by meaning from the placeholder package — verified (diff; the script reproduces the head templates from the base).
- Claim: copies draw the same icons as before — verified (
astryx templateoutput; the show tests). - Claim: each import keeps its variant, and uses take the placeholder's name unless aliased — verified (the script and its tests).
- Claim: descriptors lose their
icons— verified (25 descriptor diffs). - Claim: the script stops when the table draws a meaning with another icon — verified (
migrate-template-icons.mjs:187-196, its test). - Claim: the script formats only files it changes, and a second run changes nothing — verified (rerun moved 0 templates); three clean runs were checked as one clean run plus a rerun.
- Claim: the declarations test checks placeholder names, paths, variants and leftover
iconswith fix lines — verified (placeholder tests; the declarations test passes). - Claim: icon sets' template meaning counts read placeholder imports and do not change — verified (each template's meanings equal its old declared meanings).
- Claim: the canvas-editor and form-wizard icon tests read placeholder imports — verified (diff; tests pass).
- Claim: the CLI dev dependency lets the template typecheck resolve the package — verified (no unresolved-module error for it).
- Claim: AST-084 FR21 describes the checks and the script — verified (
spec.md:805-813). - Claim: the listed test suites pass and the knowledge check passes — verified (all suites passed here; the knowledge check passes).
- Changeset: copies draw the same icons with and without an icon set, and meaning counts read placeholder imports — verified for
astryx templatecopies. - Files:
docs/specs/AST-084-icon-sets/spec.md— owner decision and writing rubric results;.changeset/template-icons-migrate-1.md— clear. - Files: the 25
page.tsxand 25template.doc.mjs— rubric ratchet on 15 templates and the docsite registry, playground and preview-loader findings; otherwise consistent with the table and the descriptors. - Files:
packages/cli/scripts/migrate-template-icons.mjs— strict typecheck; its test — clear. - Files:
template-placeholders.mjs, its test,template-icon-meanings.mjs,template-icon-declarations.test.mjs— clear. - Files: the four
packages/cli/api/templateicon and show tests — clear. - Files:
packages/cli/package.json,pnpm-lock.yaml— clear.
5ca2b96 to
887274e
Compare
b83519e to
7e0d5e2
Compare
There was a problem hiding this comment.
Copied templates keep every icon and the earlier strict-typecheck errors are fixed, but approval waits on an engineering owner's decision about the icon placeholder model, and five findings below need action as well.
Owner decision. AST-084 FR21-FR23 (template icon placeholders, copies filling them, meaning fallbacks) are not on main yet: they come from #12741, #12747 and #12748, this pull request adds FR21 requirements, and main's FR9 still requires each imported icon to be declared in the descriptor's icons. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. The same decision settles whether the template rubric's self-contained-imports list names @astryxdesign/template-icons.
Required fixes
- The docsite's ShadCN registry skips all 25 pages because their source imports an unpublished package, so the canary docsite data build stops at its route-lock check: fill placeholders before the registry reads dependencies and content (
apps/docsite/scripts/generate-shadcn-registry.mjs:101-114,:758-783). - The docsite playground, code view and MCP source hand out the unfilled source, so every icon in these templates renders blank in the playground: fill placeholders at
apps/docsite/scripts/generate-data.mjs:1789. - Miss: with
DOCSITE_ICON_SETset,rewriteTemplatePreviewreturns these 25 sources unchanged because their descriptors no longer declareicons, so the previews keep Heroicons instead of the chosen set, against AST-084 FR20 (apps/docsite/scripts/template-icon-loader.mjs:122-123). - Fifteen templates lose the template rubric's self-contained-imports points by importing
@astryxdesign/template-icons, which lowers each below itsmainscore unless the owner decision above changes the rubric. - The description needs
## Writing rubric resultsfor the AST-084 change.
Claims and files checked
Review mode: full; reason: rebase
- Claim: the 25 pages from ai-chat to kanban-board import icons by meaning from the placeholder package — verified (diff; the script reproduces the head templates from the base).
- Claim: copies draw the same icons as before — verified (
astryx templateoutput; the show tests). - Claim: each import keeps its variant, and uses take the placeholder's name unless aliased — verified (the script and its tests).
- Claim: descriptors lose their
icons— verified (25 descriptor diffs). - Claim: the script stops when the table draws a meaning with another icon — verified (
migrate-template-icons.mjs:190-199, its test). - Claim: the script formats only files it changes, and a second run changes nothing — verified (a clean run reproduces the head; a rerun moves 0 templates).
- Claim: the declarations test checks placeholder names, paths, variants and leftover
iconswith fix lines — verified (placeholder tests; the declarations test passes). - Claim: icon sets' template meaning counts read placeholder imports and do not change — verified (each template's meanings equal its old declared meanings, 25 of 25).
- Claim: the canvas-editor and form-wizard icon tests read placeholder imports — verified (diff; tests pass).
- Claim: the CLI dev dependency lets the template typecheck resolve the package — verified (both CLI typechecks show no unresolved import of it).
- Claim: AST-084 FR21 describes the checks and the script — verified (
spec.md:808-816). - Claim: the listed test suites pass and the knowledge check passes — verified (all suites passed here; the knowledge check passes); the check on another head names no commit and was not repeated.
- Changeset: copies draw the same icons with and without an icon set, and meaning counts read placeholder imports — verified for
astryx templatecopies. - Files:
docs/specs/AST-084-icon-sets/spec.md— owner decision and writing rubric results;.changeset/template-icons-migrate-1.md— clear. - Files: the 25
page.tsxand 25template.doc.mjs— rubric ratchet on 15 templates and the docsite registry, playground and preview-loader findings; otherwise consistent with the table and the descriptors. - Files:
packages/cli/scripts/migrate-template-icons.mjsand its test — clear (the typecheck errors are fixed). - Files:
template-placeholders.mjs, its test,template-icon-meanings.mjs,template-icon-declarations.test.mjs— clear. - Files: the four
packages/cli/api/templateicon and show tests — clear. - Files:
packages/cli/package.json,pnpm-lock.yaml— clear.
887274e to
1ccc209
Compare
7e0d5e2 to
5cd0f3e
Compare
There was a problem hiding this comment.
Copied templates keep every icon, but approval waits on an engineering owner's decision about the icon placeholder model, and five findings below need action as well.
Owner decision. AST-084 FR21-FR23 (template icon placeholders, copies filling them, meaning fallbacks) are not on main yet: they come from #12741, #12747 and #12748, this pull request adds FR21 requirements, and main's FR9 still requires each imported icon to be declared in the descriptor's icons. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. The same decision settles whether the template rubric's self-contained-imports list names @astryxdesign/template-icons.
Required fixes
- The docsite's ShadCN registry skips all 25 pages because their source imports an unpublished package, so the canary docsite data build stops at its route-lock check: fill placeholders before the registry reads dependencies and content (
apps/docsite/scripts/generate-shadcn-registry.mjs:101-114,:757-786). - The docsite playground, code view and MCP source hand out the unfilled source, so every icon in these templates renders blank in the playground: fill placeholders at
apps/docsite/scripts/generate-data.mjs:1789. - Miss: with
DOCSITE_ICON_SETset,rewriteTemplatePreviewreturns these 25 sources unchanged because their descriptors no longer declareicons, so the previews keep Heroicons instead of the chosen set, against AST-084 FR20 (apps/docsite/scripts/template-icon-loader.mjs:122-123). - Fifteen templates lose the template rubric's self-contained-imports points by importing
@astryxdesign/template-icons, which lowers each below itsmainscore unless the owner decision above changes the rubric. - The description needs
## Writing rubric resultsfor the AST-084 change.
Claims and files checked
Review mode: full; reason: rebase
- Claim: the 25 pages from ai-chat to kanban-board import icons by meaning from the placeholder package — verified (diff; the script reproduces the head templates from the base).
- Claim: copies draw the same icons as before — verified (
astryx templateoutput; the show tests). - Claim: each import keeps its variant, and uses take the placeholder's name unless aliased — verified (the script and its tests).
- Claim: descriptors lose their
icons— verified (25 descriptor diffs). - Claim: the script stops when the table draws a meaning with another icon — verified (
migrate-template-icons.mjs:190-199, its test). - Claim: the script formats only files it changes, and a second run changes nothing — verified (a clean run reproduces the head; a rerun moves 0 templates).
- Claim: the declarations test checks placeholder names, paths, variants and leftover
iconswith fix lines — verified (placeholder tests; the declarations test passes). - Claim: icon sets' template meaning counts read placeholder imports and do not change — verified (each template's meanings equal its old declared meanings, 25 of 25).
- Claim: the canvas-editor and form-wizard icon tests read placeholder imports — verified (diff; tests pass).
- Claim: AST-084 FR21 describes the checks and the script — verified (
spec.md:809-817). - Claim: the listed test suites, the knowledge check and Prettier pass — verified (all suites passed here, with no locale failures; the knowledge check and Prettier pass); the check on another head names no commit and was not repeated.
- Changeset: copies draw the same icons with and without an icon set, and meaning counts read placeholder imports — verified for
astryx templatecopies. - Files:
docs/specs/AST-084-icon-sets/spec.md— owner decision and writing rubric results;.changeset/template-icons-migrate-1.md— clear. - Files: the 25
page.tsxand 25template.doc.mjs— rubric ratchet on 15 templates and the docsite registry, playground and preview-loader findings; otherwise consistent with the table and the descriptors. - Files:
packages/cli/scripts/migrate-template-icons.mjsand its test — clear. - Files:
template-placeholders.mjs, its test,template-icon-meanings.mjs,template-icon-declarations.test.mjs— clear. - Files: the four
packages/cli/api/templateicon and show tests — clear.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet (its commit skips CI), so the required checks still have to pass before merge.
The template icon placeholders in AST-084 now carry an engineering owner's approval for this head, and copies of all 25 moved templates import exactly the Heroicons and Lucide icons they imported before, so nothing blocks. The two earlier blockers are fixed: the migration script uses the shared placeholder helpers, and the owner's decision settles how the template rubric grades a placeholder import.
Optional follow-ups:
- AST-084 FR9 and FR10 still say every icon a bundled template imports is declared in
icons; naming placeholder imports there would keep the record consistent with FR21. - The doc comment on
rewriteTemplatePreviewstill says a template withouticonsis returned unchanged, and the canvas-editor import comments no longer sit beside the names they explain. - A few new lines in
template-placeholders.mjsand its test are not Prettier-formatted.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- 25 page templates import icons by meaning and copies draw the same icons: verified, the filled copy of each of the 25 pages imports the same library icons as before.
- Each import becomes the meaning name in the variant its old path drew, and uses keep an alias the import had: verified (migration reproduction;
course-detailkeepsStarIconSolid). - The descriptors lose their
icons: verified, all 25. - The script reads declared meanings and stops when the table draws another icon: verified (
migrate-template-icons.mjs:180-188and its test). - The script formats only the files it changes and a second run changes nothing: verified (rerun moves nothing).
- Runs from clean trees give identical files: verified, two clean runs both reproduce the head byte for byte.
- The declarations test checks placeholder imports and prints a fix line: verified (
template-placeholders.mjs:388onward and its tests). - Template meaning counts read placeholder imports and do not change: verified, 192 definitions with the same counts.
- The canvas-editor and form-wizard icon tests read the placeholder imports: verified.
- FR21 describes the checks and the script: verified (
spec.md:853-863). - The listed CLI suites pass apart from two ICU-dependent examples: verified, all pass here, those two included.
- The same results on another head: not checked, no commit is named.
- The knowledge check and Prettier on the changed files: the knowledge check passes; Prettier holds for every file type the repository formats, and two changed
.mjsfiles differ. - The docs site's code view, playground, MCP source, ShadCN registry and the theme editor's sheet use the filled source, and icon-set previews map placeholder imports: verified from code and the sandbox registry build.
- The rubric row grades a placeholder import as the import a copy writes: verified (
template-grading-rubric.doc.mjs:414). - The writing rubric results match the FR21 and FR22 text: verified.
- The changeset says the same as the description: verified.
Files:
.changeset/template-icons-migrate-1.md: clear.apps/docsite/scripts/generate-data.mjs,generate-landing-template-previews.mjs,generate-shadcn-registry.mjs: clear.apps/docsite/scripts/template-icon-loader.mjs: stale doc comment (optional).apps/docsite/src/__tests__/playground-scope.test.ts: clear.docs/specs/AST-084-icon-sets/spec.md: FR9 and FR10 wording (optional).packages/cli/api/template/canvas-editor-corner-icons.test.mjs,canvas-editor-flip-icons.test.mjs,form-wizard-vertical-review-icon.test.mjs: clear.packages/cli/api/template/show/show.mjs,show.test.mjs: clear.packages/cli/api/theme-edit/_parts.mjs,_preview.mjs: clear.packages/cli/assets/docs/tree/template-grading-rubric.doc.mjs: clear.page.tsxandtemplate.doc.mjsunderpackages/cli/assets/templates/pages/for ai-chat, ai-chat-landing, canvas-editor, centered-hero, checkout-wizard, contact-form, course-detail, dashboard, dashboard-alert-rail, dashboard-cohort-funnel, dashboard-comparison, dashboard-composition, dashboard-progress, dashboard-scorecard, detail-page, documentation-design, documentation-technical, editor, file-explorer, form-wizard-inline, form-wizard-vertical, gallery-hero, ide, incident-console, kanban-board: clear, apart from the detached comments incanvas-editor/page.tsx(optional); rubric scores equal theirmainscores.packages/cli/foundation/discovery/template-icon-meanings.mjs: clear.packages/cli/foundation/discovery/template-placeholders.mjs,template-placeholders.test.mjs: clear; formatting (optional).packages/cli/foundation/doc-compiler/doc-loads.test.mjs: clear.packages/cli/scripts/migrate-template-icons.mjs,migrate-template-icons.test.mjs: clear.packages/cli/test/template-icon-declarations.test.mjs: clear.scripts/sync-templates.js: clear.
| bundled-template declarations test fails on a placeholder import whose name | ||
| is not a definition, whose path is not a variant, or whose meaning the table | ||
| does not draw in that variant; on a type-only or side-effect placeholder | ||
| import, which a copy cannot fill; and on an `icons` declaration |
There was a problem hiding this comment.
Optional: with this sentence a bundled template that imports placeholders must not declare icons, but FR9 ("declares, in icons, the definition each imported icon draws") and the end of FR10 ("Every icon a bundled Core template imports is declared") still read as if every template icon is declared. Something like "every library icon a bundled Core template imports is declared; a placeholder import (FR21) names its meaning instead" would keep the record consistent.
| // Aliased: a bare `File` would shadow the DOM type the image picker reads. | ||
| // The angle mark for the Rotation field. Not `Angle`: that landed in | ||
| // lucide after the version this repo pins, and a template has to build | ||
| // against the icon set the consumer actually gets. |
There was a problem hiding this comment.
Optional: these notes sat beside File as FileIcon and TriangleRight; above this import they describe an alias it no longer has and an icon it no longer names (FileIcon, AngleIcon). Dropping them, or moving the angle reason to where the table chooses the icon, would avoid confusing the next reader.
| return whole; | ||
| } | ||
| drawnModule = drawn.module; | ||
| filled.push(drawn.export === local ? local : `${drawn.export} as ${local}`); |
There was a problem hiding this comment.
Optional: Prettier wraps this line and drops the space before ) at line 242; the new test's tsx helper is reflowed too. CI only checks .ts, .tsx and .md formatting, so pnpm exec prettier --write on the two files is the fix.
adb5c7f to
b4da748
Compare
84b17fe to
71f83af
Compare
|
/approve-spec 71f83af |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet (its commit skips CI), so the required checks still have to pass before merge.
The template icon placeholders in AST-084, including the reworded FR6 template count, carry an engineering owner's approval for this head, and copies of all 25 moved templates import exactly the Heroicons and Lucide icons they imported before, with the same meanings, so nothing blocks.
Optional follow-ups:
- AST-084 FR9 and FR10 still say every icon a bundled template imports is declared in
icons; naming placeholder imports there would keep the record consistent with FR21. - The doc comment on
rewriteTemplatePreviewstill says a template withouticonsis returned unchanged, and thecanvas-editorimport comments no longer sit beside the names they explain. - A few new lines in
template-placeholders.mjsand its test are not Prettier-formatted.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- 25 page templates import icons by meaning and copies draw the same icons: verified, the filled copy of each of the 25 pages imports the same library icons as before.
- Each import becomes the meaning name in the variant its old path drew, and uses keep an alias the import had: verified (a clean migration run reproduces the head;
course-detailkeepsStarIconSolid). - The descriptors lose their
icons: verified, all 25. - The script reads declared meanings and stops when the table draws another icon: verified (
migrate-template-icons.mjs:180-188and its test). - The script formats only the files it changes and a second run changes nothing: verified (formatting at
:310and:326; a rerun moves nothing). - Runs from clean trees give identical files: verified for one clean run, which reproduces the head byte for byte; three runs were not repeated.
- The declarations test checks placeholder imports and prints a fix line: verified (
template-placeholders.mjs:388onward and its tests). - Template meaning counts read placeholder imports and do not change: verified, each page's placeholder meanings equal its old declared meanings.
- The canvas-editor and form-wizard icon tests read the placeholder imports: verified, they pass.
- FR21 describes the checks and the script: verified (
spec.md:855-864). - The listed CLI suites pass apart from two ICU-dependent examples: verified, all pass here, those two included.
- The same results on another head: not checked, no commit is named.
- The knowledge check and Prettier on the changed files: the knowledge check passes; Prettier holds for every file type the repository formats, and two changed
.mjsfiles differ. - The docs site's code view, playground, MCP source, ShadCN registry and the theme editor's sheet use the filled source, and icon-set previews map placeholder imports: verified, the generated registries and sandbox source hold no placeholder import, and the preview loader maps them in code.
- The rubric row grades a placeholder import as the import a copy writes: verified (
template-grading-rubric.doc.mjs:414). - The writing rubric results match the FR6, FR21 and FR22 text: verified.
- The changeset says the same as the description: verified.
Files:
.changeset/template-icons-migrate-1.md: clear.apps/docsite/scripts/generate-data.mjs,generate-landing-template-previews.mjs,generate-shadcn-registry.mjs: clear.apps/docsite/scripts/template-icon-loader.mjs: stale doc comment (optional).apps/docsite/src/__tests__/data-extraction.test.ts,playground-scope.test.ts: clear.docs/specs/AST-084-icon-sets/spec.md: FR9 and FR10 wording (optional).packages/cli/api/template/canvas-editor-corner-icons.test.mjs,canvas-editor-flip-icons.test.mjs,form-wizard-vertical-review-icon.test.mjs: clear.packages/cli/api/template/show/show.mjs,show.test.mjs: clear.packages/cli/api/theme-edit/_parts.mjs,_preview.mjs: clear.packages/cli/assets/docs/tree/template-grading-rubric.doc.mjs: clear.page.tsxandtemplate.doc.mjsunderpackages/cli/assets/templates/pages/for ai-chat, ai-chat-landing, canvas-editor, centered-hero, checkout-wizard, contact-form, course-detail, dashboard, dashboard-alert-rail, dashboard-cohort-funnel, dashboard-comparison, dashboard-composition, dashboard-progress, dashboard-scorecard, detail-page, documentation-design, documentation-technical, editor, file-explorer, form-wizard-inline, form-wizard-vertical, gallery-hero, ide, incident-console, kanban-board: clear, apart from the detached comments incanvas-editor/page.tsx(optional); rubric scores equal theirmainscores.packages/cli/foundation/discovery/template-icon-meanings.mjs: clear.packages/cli/foundation/discovery/template-placeholders.mjs,template-placeholders.test.mjs: clear; formatting (optional).packages/cli/foundation/doc-compiler/doc-loads.test.mjs: clear.packages/cli/scripts/migrate-template-icons.mjs,migrate-template-icons.test.mjs: clear.packages/cli/test/template-icon-declarations.test.mjs: clear.scripts/sync-templates.js: clear.
b4da748 to
4aa8826
Compare
71f83af to
27a3781
Compare
|
/approve-spec 27a3781 |
4aa8826 to
b86c47b
Compare
27a3781 to
7ac2f55
Compare
|
/approve-spec 7ac2f55 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet (its commit skips CI), so the required checks still have to pass before merge.
The template icon placeholders in AST-084, including this pull request's FR6, FR21 and FR22 wording, carry an engineering owner's approval for this head, and copies of all 25 moved templates import exactly the Heroicons and Lucide icons they imported before, with the same meanings, so nothing blocks.
Optional follow-ups:
- AST-084 FR9 and FR10 still say every icon a bundled template imports is declared in
icons; naming placeholder imports there would keep the record consistent with FR21. - The doc comment on
rewriteTemplatePreviewstill says a template withouticonsis returned unchanged, and thecanvas-editorimport comments no longer sit beside the names they explain. - A few new lines in
template-placeholders.mjsand its test are not Prettier-formatted.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- 25 page templates import icons by meaning and copies draw the same icons: verified, the filled copy of each of the 25 pages imports the same library icons as before.
- Each import becomes the meaning name in the variant its old path drew, and uses keep an alias the import had: verified (a clean migration run reproduces the head;
course-detailkeepsStarIconSolid). - The descriptors lose their
icons: verified, all 25. - The script reads declared meanings and stops when the table draws another icon: verified (
migrate-template-icons.mjs:180-188and its test). - The script formats only the files it changes and a second run changes nothing: verified (formatting at
:310and:326; a rerun moves nothing). - Runs from clean trees give identical files: verified for one clean run, which reproduces the head byte for byte; three runs were not repeated.
- The declarations test checks placeholder imports and prints a fix line: verified (
template-placeholders.mjs:388onward and its tests). - Template meaning counts read placeholder imports and do not change: verified, each page's placeholder meanings equal its old declared meanings.
- The canvas-editor and form-wizard icon tests read the placeholder imports: verified, they pass.
- FR21 describes the checks and the script: verified (
spec.md:863-873). - The listed CLI suites pass apart from two ICU-dependent examples: verified, they pass here, those two included.
- The same results on another head: not checked, no commit is named.
- The knowledge check and Prettier on the changed files: the knowledge check passes; Prettier holds for every file type the repository formats, and two changed
.mjsfiles differ. - The docs site's code view, playground, MCP source, ShadCN registry and the theme editor's sheet use the filled source, and icon-set previews map placeholder imports: verified, the generated registries and sandbox source hold no placeholder import, and the preview loader maps them in code.
- The rubric row grades a placeholder import as the import a copy writes: verified (
template-grading-rubric.doc.mjs:414). - The writing rubric results match the FR6, FR21 and FR22 text: verified.
- The changeset says the same as the description: verified.
Files:
.changeset/template-icons-migrate-1.md: clear.apps/docsite/scripts/generate-data.mjs,generate-landing-template-previews.mjs,generate-shadcn-registry.mjs: clear.apps/docsite/scripts/template-icon-loader.mjs: stale doc comment (optional).apps/docsite/src/__tests__/data-extraction.test.ts,playground-scope.test.ts: clear.docs/specs/AST-084-icon-sets/spec.md: FR9 and FR10 wording (optional).packages/cli/api/template/canvas-editor-corner-icons.test.mjs,canvas-editor-flip-icons.test.mjs,form-wizard-vertical-review-icon.test.mjs: clear.packages/cli/api/template/show/show.mjs,show.test.mjs: clear.packages/cli/api/theme-edit/_parts.mjs,_preview.mjs: clear.packages/cli/assets/docs/tree/template-grading-rubric.doc.mjs: clear.page.tsxandtemplate.doc.mjsunderpackages/cli/assets/templates/pages/for ai-chat, ai-chat-landing, canvas-editor, centered-hero, checkout-wizard, contact-form, course-detail, dashboard, dashboard-alert-rail, dashboard-cohort-funnel, dashboard-comparison, dashboard-composition, dashboard-progress, dashboard-scorecard, detail-page, documentation-design, documentation-technical, editor, file-explorer, form-wizard-inline, form-wizard-vertical, gallery-hero, ide, incident-console, kanban-board: clear, apart from the detached comments incanvas-editor/page.tsx(optional); rubric scores equal theirmainscores.packages/cli/foundation/discovery/template-icon-meanings.mjs: clear.packages/cli/foundation/discovery/template-placeholders.mjs,template-placeholders.test.mjs: clear; formatting (optional).packages/cli/foundation/doc-compiler/doc-loads.test.mjs: clear.packages/cli/scripts/migrate-template-icons.mjs,migrate-template-icons.test.mjs: clear.packages/cli/test/template-icon-declarations.test.mjs: clear.scripts/sync-templates.js: clear.
- #12741 feat(cli): template icon table and the template-icons placeholder package Author: @josephfarina - #12747 feat(cli): template copies write icon placeholders as the library icon that draws them Author: @josephfarina - #12748 feat(cli): twenty-one refined icon meanings that fall back to the meaning templates used before Author: @josephfarina - #12754 feat(cli): page templates ai-chat to kanban-board import icons by meaning Author: @josephfarina - #12756 feat(cli): page templates library to work-item-detail import icons by meaning Author: @josephfarina - #12759 feat(cli): block templates AlertDialog to MultiSelector import icons by meaning Author: @josephfarina - #12762 feat(cli): block templates NavHeadingMenu to VStack import icons by meaning Author: @josephfarina - #12767 feat(cli): bundled templates pick each icon by meaning Author: @josephfarina - #13001 test(cli): the swizzle proof renders Lab's MediaPlayer with its required label Author: @josephfarina
|
Landed in #12965. |
Stack: #12741 → #12747 → #12748 → #12754 → #12756 → #12759 → #12762 → #12767 (lands as one; each PR's own change is its top commit)
What it changes
The first batch of the template icon move (experimental): 25 page templates,
ai-chatthroughkanban-board, import their icons by meaning from@astryxdesign/template-iconsinstead of from Heroicons or Lucide. Copies draw the same icons as before.<Meaning>Iconfrom the placeholder package, in the variant its old path drew (/24/solid,/lucide, …), and each use takes the placeholder's name unless the import aliased it. The descriptors lose theiriconsdeclarations: the import names the meaning.packages/cli/scripts/migrate-template-icons.mjsdoes the move. It reads each icon's declared meaning and stops when the template icon table draws that meaning with another icon, so no picture changes. It formats only the files it changes, and a second run changes nothing. Three runs from clean trees give identical files.iconsdeclaration left beside placeholders fails with a fix line.Testing
vitest run --project nodeon packages/cli/api/template, scripts, foundation/discovery and the template icon declarations test. All pass except two locale examples that need a Node with full ICU data (they fail the same way on the base).Checked on the drain head as well: same results, apart from one block that came with another PR and has an undeclared icon (reported).
pnpm check:knowledge, Prettier on the changed filesThe docs site's code view, playground, MCP source and ShadCN registry, and the theme editor's preview sheet, read each template through the same placeholder fill a copy applies; with
DOCSITE_ICON_SET, the preview maps placeholder imports by their meanings. The template rubric's self-contained-imports row says placeholder imports count as the library imports a copy writes.Writing rubric results
R1 narration: none; the added FR21 sentences state what the system does, in the present tense.
R2 research: none in the record.
R3 evidence: verification cells name tests, not changes.
R4 rejected alternatives: none.
R5 change references: none.
R6 open questions: none.
R7 project status: none.