Skip to content

feat(cli): page templates ai-chat to kanban-board import icons by meaning - #12754

Closed
josephfarina wants to merge 1 commit into
josephfarina/template-icons-new-meaningsfrom
josephfarina/template-icons-migrate-1
Closed

josephfarina wants to merge 1 commit into
josephfarina/template-icons-new-meaningsfrom
josephfarina/template-icons-migrate-1

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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-chat through kanban-board, import their icons by meaning from @astryxdesign/template-icons instead of from Heroicons or Lucide. Copies draw the same icons as before.

  • Each icon import becomes <Meaning>Icon from 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 their icons declarations: the import names the meaning.
  • packages/cli/scripts/migrate-template-icons.mjs does 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.
  • The bundled-template icon test also checks placeholder imports: a name that is not a definition, a path that is not a variant, a meaning the table does not draw in that variant, or an icons declaration left beside placeholders fails with a fix line.
  • Icon sets' template meaning counts read placeholder imports, so this move does not change them.
  • The canvas-editor and form-wizard icon tests read the placeholder imports.
  • AST-084 FR21 describes the checks and the script.

Testing

  • vitest run --project node on 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 files

  • The 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.

@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 19, 2026 8:28pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 19, 2026
@astracat-bot

astracat-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 19, 2026, 8:44 PM UTC

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-icons import 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 typecheck fails with TS2339 at packages/cli/scripts/migrate-template-icons.mjs:268, :269 and :307, because found is narrowed to null; cast the value iconsProperty returns.
  • 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 on main, because they now import an unpublished package.
  • The description needs a ## Writing rubric results section 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:knowledge passes: verified.
  • Changeset (same icons in copies with and without a set; counts read placeholders): verified for astryx template copies.

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.mjs descriptors: 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.

Automated review (maintainer link)

Comment thread docs/specs/AST-084-icon-sets/spec.md Resolved
@josephfarina
josephfarina force-pushed the josephfarina/template-icons-new-meanings branch from 20567e8 to fdfc229 Compare November 19, 2026 03:25
@josephfarina
josephfarina force-pushed the josephfarina/template-icons-migrate-1 branch from 753d10e to b0b468b Compare November 19, 2026 03:25

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-icons import 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 typecheck fails with TS2339 at packages/cli/scripts/migrate-template-icons.mjs:268, :269 and :307, because found is narrowed to null; cast the value iconsProperty returns.
  • 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 on main, because they now import an unpublished package.
  • The description needs a ## Writing rubric results section 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:knowledge passes: verified.
  • Changeset (same icons in copies with and without a set; counts read placeholders): verified for astryx template copies.

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.mjs descriptors: 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.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/template-icons-new-meanings branch from fdfc229 to 6d0b64c Compare November 19, 2026 04:47
@josephfarina
josephfarina force-pushed the josephfarina/template-icons-migrate-1 branch from b0b468b to 53c9c8f Compare November 19, 2026 04:47
@josephfarina
josephfarina force-pushed the josephfarina/template-icons-new-meanings branch from 6d0b64c to ece53d2 Compare November 19, 2026 05:09
@josephfarina
josephfarina force-pushed the josephfarina/template-icons-migrate-1 branch from 53c9c8f to cc94fd6 Compare November 19, 2026 05:09
@josephfarina
josephfarina force-pushed the josephfarina/template-icons-new-meanings branch from ece53d2 to 5ca2b96 Compare November 19, 2026 05:25
@josephfarina
josephfarina force-pushed the josephfarina/template-icons-migrate-1 branch from cc94fd6 to b83519e Compare November 19, 2026 05:26

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_SET set, rewriteTemplatePreview returns these 25 sources unchanged because their descriptors no longer declare icons, 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:strict fails with TS2339 at packages/cli/scripts/migrate-template-icons.mjs:268, :269 and :307, which a cast of iconsProperty's return value fixes.
  • Fifteen templates lose the template rubric's self-contained-imports points by importing @astryxdesign/template-icons, which lowers each below its main score unless the owner decision above changes the rubric.
  • The description needs ## Writing rubric results for 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 template output; 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 icons with 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 template copies.
  • 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.tsx and 25 template.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/template icon and show tests — clear.
  • Files: packages/cli/package.json, pnpm-lock.yaml — clear.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/template-icons-new-meanings branch from 5ca2b96 to 887274e Compare November 19, 2026 08:32
@josephfarina
josephfarina force-pushed the josephfarina/template-icons-migrate-1 branch from b83519e to 7e0d5e2 Compare November 19, 2026 08:32

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_SET set, rewriteTemplatePreview returns these 25 sources unchanged because their descriptors no longer declare icons, 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 its main score unless the owner decision above changes the rubric.
  • The description needs ## Writing rubric results for 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 template output; 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 icons with 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 template copies.
  • 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.tsx and 25 template.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 and 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/template icon and show tests — clear.
  • Files: packages/cli/package.json, pnpm-lock.yaml — clear.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/template-icons-new-meanings branch from 887274e to 1ccc209 Compare November 19, 2026 09:18
@josephfarina
josephfarina force-pushed the josephfarina/template-icons-migrate-1 branch from 7e0d5e2 to 5cd0f3e Compare November 19, 2026 09:18

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_SET set, rewriteTemplatePreview returns these 25 sources unchanged because their descriptors no longer declare icons, 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 its main score unless the owner decision above changes the rubric.
  • The description needs ## Writing rubric results for 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 template output; 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 icons with 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 template copies.
  • 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.tsx and 25 template.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 and 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/template icon and show tests — clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 rewriteTemplatePreview still says a template without icons is returned unchanged, and the canvas-editor import comments no longer sit beside the names they explain.
  • A few new lines in template-placeholders.mjs and 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-detail keeps StarIconSolid).
  • 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-188 and 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:388 onward 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 .mjs files 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.tsx and template.doc.mjs under packages/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 in canvas-editor/page.tsx (optional); rubric scores equal their main scores.
  • 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.

Automated review (maintainer link)

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +57 to +60
// 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@josephfarina
josephfarina force-pushed the josephfarina/template-icons-new-meanings branch from adb5c7f to b4da748 Compare November 19, 2026 18:14
@josephfarina
josephfarina force-pushed the josephfarina/template-icons-migrate-1 branch from 84b17fe to 71f83af Compare November 19, 2026 18:14
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 71f83af

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 rewriteTemplatePreview still says a template without icons is returned unchanged, and the canvas-editor import comments no longer sit beside the names they explain.
  • A few new lines in template-placeholders.mjs and 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-detail keeps StarIconSolid).
  • 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-188 and its test).
  • The script formats only the files it changes and a second run changes nothing: verified (formatting at :310 and :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:388 onward 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 .mjs files 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.tsx and template.doc.mjs under packages/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 in canvas-editor/page.tsx (optional); rubric scores equal their main scores.
  • 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.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/template-icons-new-meanings branch from b4da748 to 4aa8826 Compare November 19, 2026 19:34
@josephfarina
josephfarina force-pushed the josephfarina/template-icons-migrate-1 branch from 71f83af to 27a3781 Compare November 19, 2026 19:34
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 27a3781

@josephfarina
josephfarina force-pushed the josephfarina/template-icons-new-meanings branch from 4aa8826 to b86c47b Compare November 19, 2026 20:10
@josephfarina
josephfarina force-pushed the josephfarina/template-icons-migrate-1 branch from 27a3781 to 7ac2f55 Compare November 19, 2026 20:10
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 7ac2f55

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 rewriteTemplatePreview still says a template without icons is returned unchanged, and the canvas-editor import comments no longer sit beside the names they explain.
  • A few new lines in template-placeholders.mjs and 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-detail keeps StarIconSolid).
  • 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-188 and its test).
  • The script formats only the files it changes and a second run changes nothing: verified (formatting at :310 and :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:388 onward 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 .mjs files 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.tsx and template.doc.mjs under packages/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 in canvas-editor/page.tsx (optional); rubric scores equal their main scores.
  • 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.

Automated review (maintainer link)

josephfarina added a commit that referenced this pull request Nov 19, 2026
- #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
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12965.

@github-actions
github-actions Bot deleted the josephfarina/template-icons-migrate-1 branch November 20, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 7ac2f558 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant