Repository navigation
fix(templates): settings controls that did nothing show what they would do - #12042
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 7a7c796 |
There was a problem hiding this comment.
Changes requested: one fix is needed before this can be approved.
- The sidebar settings template's phone back arrow (
packages/cli/assets/templates/pages/settings-sidebar/page.tsx:338) and drill-in chevrons (:272) do not mirror under right-to-left, so on a right-to-left phone the back arrow points forward and the chevrons point back; addxstyle={rtlStyles.mirror}from@astryxdesign/core/utilsto both icons, as the detail page and settings dialog templates already do.
The demo toasts are settled for this revision by the engineering owner's /approve-spec, and in Chromium the first Save button and Professional hosting tools show their "Demo:" message with no page errors. That approval covers this revision only, so after the fix an engineering owner comments /approve-spec <new head SHA> again; the author may do so as an engineering owner.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the three Save buttons on the settings page and Professional hosting tools on the sidebar settings page did nothing. Verified on the base: the Save buttons had no click handler and the list item had an empty one.
- Claim: each now shows a short message that starts with "Demo:" and says what it would do, never that it happened. Verified at
settings/page.tsx:158-164,:202-208,:246-252andsettings-sidebar/page.tsx:285-291, and in Chromium for the first Save button and Professional hosting tools. - Claim: each handler carries a comment that marks where the real call goes. Verified at all four handlers.
- Claim: nothing beyond the message changes in layout, style or behavior, and the existing confirmations are unchanged. Verified: the diff adds one import, one hook call per page and the four handlers; the sidebar's inline-edit Save and Cancel are untouched.
- Claim: the change is one click handler per control, the toast hook where missing, and a changeset. Verified.
- Claim: a replay of the build command moves no start, alternative or block list. Not re-run; consistent, because neither template's metadata changes.
- Claim: the settings dialog template's Delete my account button still does nothing and that template has no confirmation dialog. Verified at
settings-dialog/page.tsx:2060-2064; that template is unchanged here. - Claim: no new public API, default or interaction model, and no internal context in public text. Verified.
- Claim: formatting, lint and a strict typecheck pass. Lint passed in CI on this revision; CI's typecheck did not run because CI was full, and the toast options used (
body,uniqueID) match the toast type. - Claim: the repository's 390 px phone check passes on these templates. Not run on this revision: CI was full and cancelled its run.
- File
.changeset/settings-working-controls.md: clear. - File
packages/cli/assets/templates/pages/settings/page.tsx: clear. - File
packages/cli/assets/templates/pages/settings-sidebar/page.tsx: the right-to-left finding above.
PR Analysis Report🔎 Preview ·
|
…chevrons in right-to-left languages
|
/approve-spec 0efd190 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because its run was cancelled when CI was full, so re-run it and let the required checks pass before merge.
The earlier right-to-left finding is fixed: the sidebar settings template's phone back arrow and drill-in chevrons now mirror under right-to-left, and left-to-right rendering is unchanged. The demo toasts are settled for this revision by the engineering owner's /approve-spec.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0): none.
- Claim: the settings page's three Save buttons and the sidebar settings page's Professional hosting tools did nothing. Verified on the base: the Save buttons had no click handler and the list item had an empty one.
- Claim: each now shows a short message that starts with "Demo:" and says what it would do, never that it happened. Verified at
settings/page.tsx:158-164,:202-208,:246-252andsettings-sidebar/page.tsx:291-297, and in Chromium for the first Save button and Professional hosting tools, with no page errors. - Claim: on the sidebar settings page in right-to-left, the phone back arrow and drill-in chevrons now mirror, as on the detail page and settings dialog templates. Verified at
settings-sidebar/page.tsx:277and:348, the same shared mirror asdetail-page/page.tsx:187andsettings-dialog/page.tsx:2367; in Chromium at 390 px all eight chevrons and the back arrow flip under right-to-left, and the left-to-right frame is pixel-identical to the base. - Claim: each handler carries a comment that marks where the real call goes. Verified at all four handlers.
- Claim: nothing beyond the messages and the listed mirror changes in layout, style or behavior, and the existing confirmations are unchanged. Verified: the diff adds the toast and mirror imports, one hook call per page, the four handlers and the two mirror styles; the sidebar's inline Save and Cancel are untouched.
- Claim: the change is one click handler per dead control, the toast hook where missing, the mirror on two direction icons, and a changeset. Verified.
- Claim: a replay of the build command moves no start, alternative or block list. Verified from the code: build ranks templates from their metadata and checked-in weights, neither template's metadata changes, and page source only feeds setup notes, which ignore design-system imports.
- Claim: the settings dialog template's Delete my account button still does nothing and that template has no confirmation dialog. Verified at
settings-dialog/page.tsx:2060-2064; that template is unchanged here. - Claim: no new public API, default or interaction model, and no internal context in public text. Verified.
- Claim: Prettier, ESLint and a strict typecheck are clean on the changed pages. Verified: Prettier and ESLint pass on the changed files, the Lint workflow passed on this head, and a strict TypeScript check of both pages reports no errors in them.
- Claim: the repository's 390 px phone check passes on these templates. Not run on this head because CI was full; at 390 px the sidebar page shows no horizontal overflow in Chromium, and the change adds no layout box.
- File
.changeset/settings-working-controls.md: clear. - File
packages/cli/assets/templates/pages/settings/page.tsx: clear. - File
packages/cli/assets/templates/pages/settings-sidebar/page.tsx: clear; the earlier right-to-left finding is fixed.
User impact
Controls in two settings 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
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, style or behavior beyond the message changes.
Expected behavior and authority
Template controls either act or say honestly what they would do; a message never claims an action happened. The templates' existing confirmations are unchanged.
Smallest restoration
One
onClickper dead control, the toast hook where the component did not have it, the mirror style on two direction icons, and a changeset.Evidence
Known gap
The settings dialog's Delete my account button 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: settings, settings-sidebar page templates
Testing