Skip to content

fix(templates): form buttons that did nothing show what they would do - #12041

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

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

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Workspace and audiobook wizards: Cancel ("leaving … would return you to the app here"). Neither wizard has an existing reset to wire to.
  • Workspace wizard: Create workspace on a finished last step ("your workspace would be created here"). It checks every step first: a problem on the current step still sends focus to it, and a problem on an earlier step (left behind by a jump through the stepper) sends the person to that step instead of finishing.
  • Audiobook wizard: Submit for review on a finished last step ("your audiobook would be submitted for review here"). It checks every step first, the same way.
  • Payment form: Place Order on a complete form ("your order would be placed here"). An incomplete form still shows its field errors, as before; the checks now run on every render so the button can tell a complete form from an incomplete one, and they are still shown only after the first press.
  • Payment form: Save on the cart line ("this item would be saved for later here"). It was a link to "#"; it is now a link-styled button.
  • Payment form: Continue Shopping ("the store would open here").

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

  • Before: each listed button did nothing; on the payment form a complete order did nothing and Save jumped to "#".
  • After (built into a Vite app with the neutral theme, Chromium at 1280 px): each listed button shows its "Demo:" message; jumping to a wizard's last step with an earlier step broken and pressing the finish button shows no message and opens the broken step; an incomplete payment form still shows its field errors and no message; no page errors occur.
  • A replay of build on this change against main moves no start, alternative or block list.

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

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • prettier, eslint and a strict typecheck on the changed pages: clean.
  • Real browser (Chromium, 1280×800): each wizard walked to its last step and finished; the payment form pressed empty and then complete; Save pressed. Results as under Evidence. The repository's 390 px phone check passes on these templates.

@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 10:25am 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, 10:45 AM UTC

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec a82b033

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 37dc2b9

Storybook · Sandbox · built from this PR's head

Package size: @astryxdesign/cli 5.12 MB packed (+688 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.

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

Automated review (maintainer link)

Comment thread .changeset/form-working-controls.md Resolved
@josephfarina josephfarina changed the title fix(templates): form controls that did nothing show what they would do fix(templates): wizard Cancel and Continue Shopping show what they would do Nov 16, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec d00d2e4

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 16, 2026
@josephfarina josephfarina changed the title fix(templates): wizard Cancel and Continue Shopping show what they would do fix(templates): form buttons that did nothing show what they would do Nov 16, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 5496ba8

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

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

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 37dc2b9

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

Automated review (maintainer link)

kvnloo pushed a commit to kvnloo/astryx that referenced this pull request Nov 16, 2026
…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.
@josephfarina
josephfarina merged commit 81efb8c into main Nov 16, 2026
266 of 290 checks passed
@github-actions
github-actions Bot deleted the josephfarina/form-working-controls branch November 17, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — 37dc2b99 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. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant