Repository navigation
fix(templates): give the dead controls in the tool templates a behavior - #12022
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.
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-1968and: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:2278and:2293), which this change wires, do not mirror under right-to-left, so addxstyle={rtlStyles.mirror}from@astryxdesign/core/utilsasfile-explorer/page.tsx:367does.
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.
|
/approve-spec a6df107 |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
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, butcanvas-editor/page.tsx:2282and:2301now 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.
There was a problem hiding this comment.
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.
|
/approve-spec 115d170 |
|
/approve-spec 9131aef |
There was a problem hiding this comment.
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.
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
onClickhandlers, reworded toast text, andxstyle={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
Evidence
Scope
Components: templates (canvas-editor, file-explorer, ide, kanban-board, editor)
Testing
tscon the five pages with the repo tsconfig;eslintandprettieron the changed files