Repository navigation
fix(templates): dashboard controls that did nothing show what they would do - #12040
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec e7e5f98 |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. Its run stopped before any test because CI was full, so it needs a re-run.
The eight buttons that did nothing in the six dashboard templates now show their "Demo:" toast, and an engineering owner approved that demo-toast behavior for this head. Non-blocking, and not caused by this change: the Project Status and Data Dashboard templates keep template-rubric deductions from main (a raw <div> wrapper, custom CSS, and in Data Dashboard a fixed two-column grid), and Project Status is 1,148 lines, long for one page layout.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the listed controls in six dashboard templates did nothing when pressed. Verified: none of the eight buttons had a click handler on the base, and in Chromium a press showed nothing.
- Claim: each now shows a short message that starts with "Demo:" and says what it would do. Verified at every handler and in Chromium for all eight.
- Claim: Analytics Reload and both View more buttons show the active-users reload, demographics and engagement messages. Verified at
dashboard/page.tsx:744,:783and:806. - Claim: Export on the comparison, scorecard and funnel dashboards shows its export message. Verified at
dashboard-comparison/page.tsx:824,dashboard-scorecard/page.tsx:805anddashboard-cohort-funnel/page.tsx:840. - Claim: the program dashboard's Export status shows the program status message. Verified at
dashboard-progress/page.tsx:619. - Claim: the portfolio dashboard's View more shows the market overview message. Verified at
dashboard-composition/page.tsx:747. - Claim: each handler carries the "Demo only: replace this toast …" comment. Verified: eight comments, one per handler.
- Claim: no layout, style or behavior beyond the message changes. Verified from the diff: imports, one hook call per component and the click handlers; two View more buttons only reflow onto several lines.
- Claim: a message never claims an action happened. Verified: every message says what "would" happen.
- Claim: the templates' existing confirmations are unchanged. Verified: the diff touches no other handler.
- Claim: one click handler per dead control, the toast hook where the component lacked it, and a changeset. Verified.
- Claim: in a browser at 1280 px each control shows its message with no page errors. Verified in Chromium at 1280 px: each message, no console errors.
- Claim: the 390 px phone check passes. Not re-run here; the diff adds no markup.
- Claim: the build-recommendation replay moves nothing. Not reproducible here; consistent with unchanged template docs.
- Claim: prettier, eslint and a strict typecheck are clean on the changed pages. Verified for all three.
- Claim: one defect is restored, with no hidden public API, default or interaction model, and no internal context in public text. Verified: no package surface changes, and the demo toast is owner-approved for this head.
- Claim (changeset): a patch note naming the same controls in the six templates. Verified against the diff.
- File
.changeset/dashboard-working-controls.md: clear. - File
packages/cli/assets/templates/pages/dashboard/page.tsx: clear. - File
packages/cli/assets/templates/pages/dashboard-comparison/page.tsx: clear; it keeps existing template-rubric deductions (70), which this change does not cause. - File
packages/cli/assets/templates/pages/dashboard-scorecard/page.tsx: clear. - File
packages/cli/assets/templates/pages/dashboard-cohort-funnel/page.tsx: clear. - File
packages/cli/assets/templates/pages/dashboard-progress/page.tsx: clear; it keeps existing template-rubric deductions (74) and is 1,148 lines, non-blocking notes. - File
packages/cli/assets/templates/pages/dashboard-composition/page.tsx: clear.
User impact
Controls in six dashboard 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, and a changeset.Evidence
Scope
Components: dashboard, dashboard-comparison, dashboard-scorecard, dashboard-cohort-funnel, dashboard-progress, dashboard-composition page templates
Testing