Repository navigation
fix(templates): form buttons that did nothing show what they would do - #12041
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec a82b033 |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes requested: the three demo toasts work, but the release note claims more than this pull request fixes.
- The changeset (
.changeset/form-working-controls.md:5) and the title say the dead controls in these three templates now respond, but Create workspace and Submit for review on a valid last step, Place Order on a valid form, and the cart line's Remove and Save on the checkout form still do nothing, so name only the three buttons this changes or give those five their own Demo message.
Cancel in both wizards and Continue Shopping now show their Demo toasts in a browser, and the demo-toast direction is settled by the engineering owner's /approve-spec for this head. Non-blocking: the checkout template keeps existing template-rubric deductions (external brand images, custom styles, fixed grid columns), and the vertical wizard and checkout pages are long for one page layout. CI's build and test jobs had not finished on this head when this review was written.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the release note says the controls that did nothing in the three templates now respond. False: five controls in those templates still do nothing (blocking finding).
- Claim: Cancel in both wizards and Continue Shopping on the checkout form did nothing before. Verified: each had an empty handler on the base, and a press in a browser showed nothing.
- Claim: each now shows a short message that starts with "Demo:" and says what it would do. Verified in a browser for all three, and in the page source the CLI emits.
- Claim: a message never claims an action happened. Verified: all three say what would happen.
- Claim: neither wizard has an existing reset to wire Cancel to. Verified: the only clearing code empties the optional team step on Skip.
- Claim: the end-of-flow confirmations in the dialog and inline wizards are unchanged. Verified: neither template is in the change.
- Claim: each handler carries the "Demo only" comment. Verified at all three handlers.
- Claim: nothing changes beyond the message. Verified: the change adds three handlers, one import and one hook call.
- Claim: the toast hook is added where the page lacked it. Verified: only the workspace wizard lacked it.
- Claim: in a browser each listed control shows its message with no page errors. Verified: the only console errors are missing demo images, the same before and after.
- Claim: prettier and eslint are clean on the changed pages. Verified; the strict typecheck was not reproduced here.
- Claim: the build-recommendation replay and the 390 px phone check are unchanged. Not re-run; consistent with a change that adds no layout, rendered component or template doc text.
- File:
.changeset/form-working-controls.md: the claim is broader than the change (blocking finding). - File:
packages/cli/assets/templates/pages/form-wizard/page.tsx: the Cancel handler and hook call are clear; Create workspace stays dead on a valid last step (part of the finding). - File:
packages/cli/assets/templates/pages/form-wizard-vertical/page.tsx: the Cancel handler is clear; Submit for review stays dead on a valid last step (part of the finding); long page (non-blocking). - File:
packages/cli/assets/templates/pages/payment-form/page.tsx: the Continue Shopping handler is clear; Place Order and the cart line's Remove and Save stay dead (part of the finding); existing rubric deductions and long page (non-blocking).
|
/approve-spec d00d2e4 |
|
/approve-spec 5496ba8 |
There was a problem hiding this comment.
Changes requested: the new Demo toasts work, but both wizards show their final toast while an earlier step is still broken.
- Create workspace (
form-wizard/page.tsx:332) and Submit for review (form-wizard-vertical/page.tsx:593) check only the current step before their Demo toast, so after a jump through the stepper the toast says the workspace would be created, or the book submitted, while an earlier step has errors; recheck every step there and send the person to the first broken one.
The release note now names exactly the controls it changes, and Cancel, Place Order, Continue Shopping and Save each show their message in a browser. Non-blocking: the checkout template keeps its existing template-rubric deductions (external brand images, custom styles, fixed grid columns), and the vertical wizard and checkout pages are long for one page layout.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0): the review rules are the same as at the last review.
- Claim: Cancel in both wizards shows a demo message. Verified: both handlers call the toast with a "Demo:" message.
- Claim: Create workspace and Submit for review on a finished last step show a demo message. Verified in a browser; false in one state: the message also appears while an earlier step is broken (blocking finding).
- Claim: a step with problems still sends focus to its first problem, as before. Verified for the current step; earlier steps are not rechecked (blocking finding).
- Claim: Place Order on a complete checkout shows a demo message, and an incomplete one still shows only its field errors, revealed after the first press. Verified in a browser: a complete form shows the message; an empty one shows 14 errors and no message, identical to before.
- Claim: the cart line's Save shows a demo message and is now a link-styled button instead of a link to "#". Verified in a browser.
- Claim: Continue Shopping says the store would open. Verified in the page source.
- Claim: these controls did nothing before. Verified in a browser on the base: no message, and Save only followed "#".
- Claim: neither wizard has a reset to wire Cancel to. Verified: the only clearing code empties the optional team step on Skip.
- Claim: controls say honestly what they would do, and no message claims an action happened. Every message says "would"; the broken-step state above is the exception (blocking finding).
- Claim: each handler carries the "Demo only" comment. Verified at all seven handlers.
- Claim: no layout or style changes, and the dialog and inline wizards are unchanged. Verified: no style or layout prop changes, and those templates are not in the change.
- Claim: the browser shows no page errors. Verified: the only console errors are missing demo images and blocked external logos, the same before and after.
- Claim: prettier, eslint and a strict typecheck are clean on the changed pages. Verified.
- Claim: the cart line's Remove still does nothing (known gap). Verified; the release note does not claim it.
- Claim: the build-recommendation replay and the 390 px phone check are unchanged. Not re-run.
- File:
.changeset/form-working-controls.md: clear; it names exactly the controls the change wires. - File:
packages/cli/assets/templates/pages/form-wizard/page.tsx: Cancel and the toast hook are clear; Create workspace shows its message while an earlier step is broken (blocking). - File:
packages/cli/assets/templates/pages/form-wizard-vertical/page.tsx: Cancel is clear; Submit for review shows its message while an earlier step is broken (blocking); long page (non-blocking). - File:
packages/cli/assets/templates/pages/payment-form/page.tsx: Place Order, Continue Shopping and Save are clear; existing rubric deductions and long page (non-blocking).
|
/approve-spec 37dc2b9 |
There was a problem hiding this comment.
Approved pending CI: the CI workflow was cancelled on this head because CI had no capacity, so it needs a re-run before merge (Lint and the CLI smoke test pass).
Both wizards now open the first step that still has problems instead of showing their final Demo message, which resolves the earlier finding, and every listed control shows its message in a browser. Non-blocking: the checkout template keeps its existing template-rubric deductions (external brand images, custom styles, fixed grid columns), and the vertical wizard and checkout pages are long for one page layout.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0): the review rules are the same as at the last review.
- Claim: Cancel in both wizards, Create workspace and Submit for review on a finished last step, Place Order on a complete form, and the cart line's Save show a demo message. Verified in a browser.
- Claim: these controls did nothing before, and Save followed "#". Verified in a browser on the base.
- Claim: neither wizard has a reset to wire Cancel to. Verified: the only clearing code empties the optional team step on Skip.
- Claim: the finish buttons check every step first; a problem on the current step still takes focus, and a problem on an earlier step opens that step instead of finishing. Verified in a browser in both wizards.
- Claim: Place Order on a complete form shows its message, and an incomplete form still shows its field errors only after the first press. Verified in a browser: an empty form shows 14 errors and no message, identical to before.
- Claim: Save is now a link-styled button instead of a link to "#". Verified: the press lands on a button and shows the message.
- Claim: Continue Shopping says the store would open. Verified in a browser.
- Claim: every message says what would happen and none claims an action happened. Verified: each message says "would".
- Claim: each handler carries the "Demo only" comment. Verified at all seven handlers.
- Claim: no layout or style changes, and the dialog and inline wizards are unchanged. Verified: no style or layout prop changes, and those templates are not in the change.
- Claim: the browser shows no page errors. Verified: the only console errors are a missing demo image and blocked external logos, the same before and after.
- Claim: build recommendations do not move. Verified: eight build queries return identical results before and after.
- Claim: prettier, eslint and a strict typecheck are clean on the changed pages. Verified.
- Claim: the 390 px phone check passes on these templates. Verified: the template phone-fit browser test passes on this head.
- Claim: the cart line's Remove still does nothing (known gap). Verified; the release note does not claim it.
- File:
.changeset/form-working-controls.md: clear; it names the controls the change wires. - File:
packages/cli/assets/templates/pages/form-wizard/page.tsx: clear. - File:
packages/cli/assets/templates/pages/form-wizard-vertical/page.tsx: clear; long page (non-blocking). - File:
packages/cli/assets/templates/pages/payment-form/page.tsx: clear; existing rubric deductions and long page (non-blocking).
…meta#12041) [fix] Buttons in form page templates that did nothing now show a demo message that says what would happen: Cancel in the workspace and audiobook wizards, Create workspace and Submit for review on a finished last step, Place Order on a complete payment form, and Save on the payment form's cart line.
User impact
Buttons in three form page templates did nothing when pressed. People and agents copying these templates got buttons that look interactive but do nothing, with no hint of what they are for. Each now responds with a short message that starts with "Demo:" and says what the button would do in a real app.
Problem and solution fit
The end-of-flow confirmations in the dialog and inline wizards are unchanged. Each handler carries the comment "Demo only: replace this toast with the call that performs the action." so a copy shows where to connect the real call. No layout or style changes.
Expected behavior and authority
Template controls either act or say honestly what they would do; a message never claims an action happened.
Smallest restoration
One handler per dead control, the payment form's checks lifted out of the submitted-only branch, and a changeset.
Evidence
Known gap
The cart line's Remove still does nothing. It is destructive, and the template has no confirmation dialog to put in front of it, so it is left unwired rather than given a message.
Scope
Components: form-wizard, form-wizard-vertical, payment-form page templates
Testing