Skip to content

fix(templates): give the dead controls in the tool templates a behavior - #12022

Merged
josephfarina merged 4 commits into
mainfrom
josephfarina/tools-working-controls
Nov 16, 2026
Merged

josephfarina merged 4 commits into
mainfrom
josephfarina/tools-working-controls

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

User need

Builders copy page templates and keep their controls. In the tool templates, several buttons and menu items did nothing when clicked, and some toasts said an action had happened when nothing had. A copied page then teaches a control that looks finished but isn't wired, or a confirmation that isn't true.

Problem and solution fit

The controls listed below did nothing when clicked. Each now either works or says what the real app would do:

  • canvas-editor: Undo, Redo, Add frame, Add text, Add image, the per-side padding and per-corner radius buttons, and flip horizontally or vertically.
  • file-explorer: the view-mode switch (the page shows the column view; picking another view says it would show), Group, Tags, More and Search.
  • ide: Go to Definition and Find References. Format Document is reworded.
  • kanban-board: Sort, Filter, Search, Add task, and Open in the card menu. Assign to me is reworded.
  • editor: Preview in the toolbar.

Each new handler shows a toast in the demo-toast pattern ("Demo: … would … here") and is marked "Demo only" in the source, next to the existing ones. Toasts that claimed an action had happened now say it would happen.

Current specification

The template demo-toast pattern: a control that stands in for a real action states the demo action and never implies a backend.

Public delta and caller burden

Template source only: added onClick handlers, reworded toast text, and xstyle={rtlStyles.mirror} on canvas-editor's Undo and Redo icons so they mirror in right-to-left layouts. No other layout or styling change, and no component, API or doc change.

Design and alternatives

  • Toasts, not new features. Controls that would need a real feature, such as undo history, inserting canvas objects, another file view or code navigation, stay demo toasts.
  • Out of scope: buttons drawn inside the page editor's canvas, which are the content being edited.
  • Not covered here: canvas-editor's main and Export menus and ide's Search files field, which stay listed for later.

Evidence

  • Clicked in Chromium: Undo, Add frame, Tags, the List view, Go to Definition, Add task, Sort and Preview each show their "Demo: …" toast, with no page errors.
  • A build replay over the full set of build ideas moves zero starts, zero alternatives and zero block lists.

Scope

Components: templates (canvas-editor, file-explorer, ide, kanban-board, editor)

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Testing

  • tsc on the five pages with the repo tsconfig; eslint and prettier on the changed files
  • Sandbox click-through in Chromium of the changed controls

@vercel

vercel Bot commented Nov 16, 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 16, 2026 11:40am UTC

Request Review

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

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 16, 2026, 11:47 AM 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.

Approval waits on an engineering owner's decision for this head, and two fixes are needed either way.

No current spec says what a page-template control should do when it has no real action, and this change adds demo toasts to 22 controls across the five tool templates. Approval needs an engineering owner to provide or identify the governing spec for demo toasts on template controls; an engineering owner records that decision by commenting /approve-spec 8ef8604b4f7dc52d623430875df6bafeb6318f83 on this pull request, and the author may do so as an engineering owner.

  • The title, changeset (.changeset/tools-working-controls.md:5) and description say every control in the five templates now works or says what it would do, but 27 items in canvas-editor's main and Export menus (canvas-editor/page.tsx:1803-1968 and :565) and ide's Search files field (ide/page.tsx:257-264) still do nothing, so wire them or narrow the claim to the controls this change wires.
  • canvas-editor's Undo and Redo arrows (canvas-editor/page.tsx:2278 and :2293), which this change wires, do not mirror under right-to-left, so add xstyle={rtlStyles.mirror} from @astryxdesign/core/utils as file-explorer/page.tsx:367 does.

Non-blocking: canvas-editor, kanban-board and ide keep template-rubric deductions this change does not cause, canvas-editor is long for one page layout at 2,933 lines, and file-explorer's doc still describes switchable list and grid views.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim (title): every tool template control now works or says what it would do. False: 24 canvas-editor main-menu items, its 3 Export items and ide's search field still do nothing (canvas-editor/page.tsx:1803-1968, :565; ide/page.tsx:257-264; File → Save checked in Chromium).
  • Claim (changeset): every toolbar button, menu item and view switch in the five templates works or shows a demo toast. False, same evidence.
  • Claim (changeset): toasts that claimed an action had happened now say it would. Verified: ide Format Document and kanban-board Assign to me; no other such toast remains in the five pages.
  • Claim (changeset and description): no layout, styling, component, API or doc change. Verified: the diff adds handlers, one import and one hook call; no public API rows.
  • Claim: the listed canvas-editor controls (Undo, Redo, Add frame, Add text, Add image, per-side padding, per-corner radius, both flips) show demo toasts. Verified at each handler; Undo checked in Chromium.
  • Claim: the file-explorer view switch, Group, Tags, More and Search show demo toasts, and the page keeps the column view. Verified; the List view checked in Chromium.
  • Claim: ide Go to Definition and Find References show demo toasts and Format Document is reworded. Verified; Go to Definition checked in Chromium.
  • Claim: kanban-board Sort, Filter, Search, Add task and Open show demo toasts and Assign to me is reworded. Verified; Add task checked in Chromium.
  • Claim: editor Preview shows a demo toast. Verified in code and in Chromium.
  • Claim: each new handler uses the "Demo: … would … here" wording and is marked as demo-only in the source. Verified; canvas-editor marks its shared helper once.
  • Claim: buttons inside the page editor's canvas stay out of scope. Verified: they render in the block preview only.
  • Claim: the description's Chromium click-through shows the toasts with no page errors. Verified for Undo, Add task, the List view, Go to Definition and Preview; no console or page errors.
  • Claim: a replay over the build ideas moves nothing. Not reproduced.
  • Claim: type, lint and format checks pass. Verified: prettier and eslint pass on the changed files; the pages typecheck against Core with no new error.
  • File .changeset/tools-working-controls.md: finding (the claim that every control works).
  • File packages/cli/assets/templates/pages/canvas-editor/page.tsx: findings (27 dead menu items; Undo and Redo do not mirror right to left); non-blocking rubric deductions and length.
  • File packages/cli/assets/templates/pages/editor/page.tsx: clear.
  • File packages/cli/assets/templates/pages/file-explorer/page.tsx: clear; non-blocking doc description note.
  • File packages/cli/assets/templates/pages/ide/page.tsx: finding (the search field ignores typing); non-blocking rubric deductions.
  • File packages/cli/assets/templates/pages/kanban-board/page.tsx: clear; non-blocking rubric deductions.

Automated review (maintainer link)

Comment thread .changeset/tools-working-controls.md Resolved
@josephfarina josephfarina changed the title fix(templates): make every tool template control work or say what it would do fix(templates): give the dead controls in the tool templates a behavior Nov 16, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec a6df107

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 9131aef

Storybook · Sandbox · built from this PR's head

Package size: @astryxdesign/cli 5.12 MB packed (+670 B); no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@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.

Approval waits on an engineering owner's decision for this head, and one fix is needed either way; the two earlier findings (the "every control" claim and the unmirrored Undo and Redo arrows) are fixed.

No current spec says what a page-template control should do when it has no real action, and this change adds demo toasts to 22 controls across the five tool templates. Approval needs an engineering owner to provide or identify the governing spec for demo toasts on template controls; an engineering owner records that decision by commenting /approve-spec a6df107944031bce5c93ed5c3d109d7244aaae4a on this pull request, and the author may do so as an engineering owner.

  • The changeset (.changeset/tools-working-controls.md:5) and the description say there are no layout or styling changes, but canvas-editor/page.tsx:2282 and :2301 now mirror the Undo and Redo icons on right-to-left pages, so say that in both (and change "either work or shows" to "either work or show").

Non-blocking: canvas-editor, kanban-board and ide keep template-rubric deductions this change does not cause, canvas-editor is long for one page layout at 2,942 lines, and file-explorer's doc still describes switchable list and grid views.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0)
  • Claim (title): the dead controls in the tool templates get a behavior. Verified for the controls the description lists; the menus and search field it excludes stay dead, as it says.
  • Claim (changeset): the toolbar buttons, menu items and view switch that did nothing now work or show a demo toast, and text fields, form inputs and some menus are not part of the change. Verified: the only remaining dead controls are canvas-editor's main and Export menus, ide's search field and the editor's canvas content.
  • Claim (changeset): toasts that claimed an action had happened now say it would. Verified: every toast in the five pages now uses the "would" wording.
  • Claim (changeset and description): no layout or styling changes. False: the Undo and Redo icons gain a right-to-left mirror (canvas-editor/page.tsx:2282, :2301; right-to-left capture changed, left-to-right identical).
  • Claim: the listed canvas-editor, file-explorer, ide, kanban-board and editor controls show demo toasts, and Format Document and Assign to me are reworded. Verified at each handler; Undo and Add task checked in Chromium at this head.
  • Claim: each new handler is marked as demo-only in the source. Verified; canvas-editor marks its shared helper once.
  • Claim: buttons inside the page editor's canvas, canvas-editor's main and Export menus and ide's search field are out of scope. Verified.
  • Claim: the Chromium click-through shows the toasts with no page errors. Verified for Undo and Add task at this head; no console, page or request errors.
  • Claim: a replay over the build ideas moves nothing. Not reproduced.
  • Claim: type, lint and format checks pass. Verified: prettier, eslint and a strict typecheck of the five pages pass.
  • File .changeset/tools-working-controls.md: finding (the no-styling-changes claim).
  • File packages/cli/assets/templates/pages/canvas-editor/page.tsx: clear (Undo and Redo now mirror); non-blocking rubric deductions and length.
  • File packages/cli/assets/templates/pages/editor/page.tsx: clear.
  • File packages/cli/assets/templates/pages/file-explorer/page.tsx: clear; non-blocking doc description note.
  • File packages/cli/assets/templates/pages/ide/page.tsx: clear; non-blocking rubric deductions.
  • File packages/cli/assets/templates/pages/kanban-board/page.tsx: clear; non-blocking rubric deductions.

Automated review (maintainer link)

Comment thread .changeset/tools-working-controls.md Resolved

@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.

Approval waits only on an engineering owner's decision for this head; the release-note fix asked for in the last review is in.

No current spec says what a page-template control should do when it has no real action, and this change adds demo toasts to 22 controls across the five tool templates, so approval needs an engineering owner to provide or identify the governing spec that settles whether such a control shows a "Demo: … would … here" toast. An engineering owner records that decision by commenting /approve-spec 115d170bdf8f50ffb821e6710843ddf683461ea7 on this pull request, and the author may do so as an engineering owner; the /approve-spec posted for the previous commit does not carry over to this one.

Non-blocking: canvas-editor, kanban-board and ide keep template-rubric deductions this change does not cause, canvas-editor is long for one page layout at 2,942 lines, and file-explorer's doc still describes switchable list and grid views.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0)
  • Claim (title): the dead controls in the tool templates get a behavior. Verified for the controls the description lists; the menus and search field it excludes stay dead, as it says.
  • Claim (changeset): the toolbar buttons, menu items and view switch that did nothing now work or show a demo toast. Verified: 22 handlers across the five pages.
  • Claim (changeset): toasts that claimed an action had happened now say it would. Verified: every toast in the five pages uses the "would" wording.
  • Claim (changeset): text fields, form inputs and some menus are not part of the change. Verified.
  • Claim (changeset and description): Undo and Redo now mirror in right-to-left layouts, with no other layout or styling change. Verified: the only styling change is the mirror on those two icons.
  • Claim (description): the listed canvas-editor, file-explorer, ide, kanban-board and editor controls show demo toasts, and Format Document and Assign to me are reworded. Verified at each handler.
  • Claim (description): each new handler is marked as demo-only in the source. Verified; canvas-editor marks its shared helper once.
  • Claim (description): a template demo-toast pattern is the current specification. No current spec states it; this is the decision the owner question asks for.
  • Claim (description): buttons inside the page editor's canvas, canvas-editor's main and Export menus and ide's search field are out of scope. Verified.
  • Claim (description): a Chromium click-through shows the toasts with no page errors. Verified for Add task and the right-to-left toolbar on identical template code.
  • Claim (description): a replay over the build ideas moves nothing. Not reproduced as such; the build kit's ranking and start tests pass on this head.
  • Claim (description): type, lint and format checks pass. Verified on byte-identical page sources at the previous commit.
  • Claim (description checklist): one capability, unrelated work split out, consumer docs and focused checks, no internal context. Verified as it applies: the mirror sits on two wired controls, the release note is the consumer doc, no migration applies, and the added text carries no internal context.
  • File .changeset/tools-working-controls.md: clear.
  • File packages/cli/assets/templates/pages/canvas-editor/page.tsx: clear; non-blocking rubric deductions and length.
  • File packages/cli/assets/templates/pages/editor/page.tsx: clear.
  • File packages/cli/assets/templates/pages/file-explorer/page.tsx: clear; non-blocking doc description note.
  • File packages/cli/assets/templates/pages/ide/page.tsx: clear; non-blocking rubric deductions.
  • File packages/cli/assets/templates/pages/kanban-board/page.tsx: clear; non-blocking rubric deductions.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 115d170

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 9131aef

@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 finished on this head yet.

The author's /approve-spec for this commit, as an engineering owner, records the decision that a page-template control with no real action shows a "Demo: … would … here" toast, which was the only thing approval waited on. The Undo and Redo arrows now mirror under right-to-left, as the bidirectionality spec requires.

Non-blocking: canvas-editor, kanban-board and ide keep template-rubric deductions this change does not cause, canvas-editor is long for one page layout at 2,942 lines, and file-explorer's doc still describes switchable list and grid views.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0)
  • Claim (title): the dead controls in the tool templates get a behavior. Verified for the controls the description lists; the menus, text fields and canvas content it excludes stay as they were.
  • Claim (changeset): a patch release of the CLI package. Verified: the templates ship in that package.
  • Claim (changeset): the toolbar buttons, menu items and view switch that did nothing now work or show a demo toast. Verified: 22 handlers across the five pages; the controls still without one are the exclusions the note names.
  • Claim (changeset): toasts that claimed an action had happened now say it would. Verified: every toast in the five pages uses the "would" wording.
  • Claim (changeset): text fields, form inputs and some menus are not part of the change. Verified.
  • Claim (changeset and description): Undo and Redo now mirror in right-to-left layouts, with no other layout or styling change. Verified: the only styling change is the mirror on those two icons.
  • Claim (description): the listed canvas-editor, file-explorer, ide, kanban-board and editor controls show demo toasts, and Format Document and Assign to me are reworded. Verified at each handler.
  • Claim (description): each new handler is marked as demo-only in the source. Verified; canvas-editor marks its shared helper once.
  • Claim (description): the template demo-toast pattern is the current specification. No current spec states it; the engineering owner's approval of this commit records the decision.
  • Claim (description): buttons inside the page editor's canvas, canvas-editor's main and Export menus and ide's search field are out of scope. Verified.
  • Claim (description): a Chromium click-through shows the toasts with no page errors. Verified on identical template code for Add task, Undo and the right-to-left toolbar.
  • Claim (description): a replay over the build ideas moves nothing. Consistent: the build kit reads each page's doc and the components it renders, and neither changes.
  • Claim (description): type, lint and format checks pass. Lint and format pass on this commit; the type check passes apart from an existing import that needs a built theme.
  • Claim (description checklist): one capability, unrelated work split out, consumer docs and focused checks, no internal context. Verified as it applies: the mirror sits on two wired controls, the release note is the consumer doc, and the added text carries no internal context.
  • File .changeset/tools-working-controls.md: clear.
  • File packages/cli/assets/templates/pages/canvas-editor/page.tsx: clear; non-blocking rubric deductions and length.
  • File packages/cli/assets/templates/pages/editor/page.tsx: clear.
  • File packages/cli/assets/templates/pages/file-explorer/page.tsx: clear; non-blocking doc description note.
  • File packages/cli/assets/templates/pages/ide/page.tsx: clear; non-blocking rubric deductions.
  • File packages/cli/assets/templates/pages/kanban-board/page.tsx: clear; non-blocking rubric deductions.

Automated review (maintainer link)

@josephfarina
josephfarina merged commit 54bf5ed into main Nov 16, 2026
78 checks passed
@github-actions
github-actions Bot deleted the josephfarina/tools-working-controls branch November 17, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — 9131aef7 Deployed Nov 16, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant