Skip to content

fix(cli): dashboard templates draw trend lines as straight segments - #12413

Merged
josephfarina merged 4 commits into
mainfrom
josephfarina/templates-straight-charts
Nov 18, 2026
Merged

josephfarina merged 4 commits into
mainfrom
josephfarina/templates-straight-charts

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Two dashboard page templates, dashboard-scorecard and dashboard-progress, drew their trend lines with recharts type="monotone". That curve bends each line between the measured points. With straight segments, a line no longer bends between measured points. Pages built from these templates copy the setting: in a set of agent-built weekly-report pages, 3 of 6 wrote a smoothed curve by hand after reading the scorecard template, and a blind visual judge marked the smoothed line as a defect each time. type="linear" joins each pair of measured points with a straight segment. The dashboard-alert-rail template already draws its lines this way.

Visual authority

  • Correction already settled by current family, design, theme, or objective accessibility authority.

No current record settles how page-template charts draw their lines. Authority for these two templates is the owner decision recorded on this pull request: Owner decision (on Joey's word): templates draw line and area charts straight.

Before and after

Each template was rendered with astryx experimental render before and after, then captured in Chromium at 1440 px and 390 px, in light and dark:

  • dashboard-scorecard: the four KPI trend charts change from smoothed curves to straight segments. Nothing else on the page changes.
  • dashboard-progress: the two trend lines change the same way. Nothing else changes.

State matrix

Desktop 1440 px and phone 390 px, light and dark, LTR. Only the line path changes. Colors, dots, axes, tooltips, and layout are the same.

Scope

Components: dashboard-scorecard template, dashboard-progress template

  • Appearance is the primary intent.
  • Behavior, API, interaction model, and unrelated layout changes were removed or split.
  • The evidence shows the changed pixels actively running, not only source or computed styles.
  • Public text and artifacts contain no internal Meta context.

Testing

  • Template sweep: all 58 page templates rendered before and after and pixel-compared at 1440/390, light/dark. Only these two templates change. Two others (checkout-wizard, table-filter) differ between two captures of the same build too, so they are not affected by this change. Two (canvas-editor, settings-dialog) do not render in the sweep project either before or after.
  • CI=1 pnpm exec vitest run --project node api/template/: 65 files, 277 tests pass.
  • CI=1 pnpm exec vitest run --project node packages/cli/api/build/build.test.mjs packages/cli/api/build/kit/rank.test.mjs: 110 tests pass.

The dashboard-scorecard and dashboard-progress templates set recharts
type="monotone" on their trend lines, which bends each line between real
data points. Agents copy that setting into the charts they build. Use
type="linear" so every segment joins two measured points, as the
dashboard-alert-rail template already does.
@vercel

vercel Bot commented Nov 17, 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 18, 2026 2:48am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 17, 2026
@astracat-bot

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 18, 2026, 3:06 AM UTC

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

Approval waits on one owner decision. The change itself checks out, and nothing else blocks it.

No current spec record says how page-template charts draw their lines, so moving dashboard-scorecard and dashboard-progress from monotone curves to straight segments (type="linear") needs a recorded decision. An engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, or by pointing to the current record that already settles it; the author can do this as an engineering owner.

  • Optional: the changeset says "values between days", but both charts plot weekly points; "so a line no longer bends between measured points" is closer.
Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim, changeset: both templates draw trend lines as straight segments between real points. Verified in both page files and in the rendered paths, which go from curves to straight segments.
  • Claim, changeset: a chart no longer shows values between days that were never measured. Partly accurate: the series are weekly, and a straight segment still joins measured points (optional wording fix above).
  • Claim: both templates used monotone curves, which bend between data points. Verified in the base files and the rendered base paths.
  • Claim: straight segments join two measured points. Verified (one straight segment per weekly interval).
  • Claim: the alert-rail dashboard template already draws lines this way. Verified (its shared line props use linear).
  • Claim: the correction is already settled by current authority, as an owner decision on the author's word. Not verified: no current record covers it, and this is the open owner decision.
  • Claim: in the scorecard only the four trend charts change, and in the progress page only the two trend lines. Verified by pixel comparison at 1440 px in light and dark.
  • Claim: colours, dots, axes, tooltips and layout are unchanged, with no behaviour, API or unrelated layout change and no internal context. Verified; area fills follow their line.
  • Claim: 58 page templates were swept and only these two change. The count is verified; the sweep itself cannot be checked, but it is consistent with the diff.
  • Claim: the template, build and rank tests pass. Verified on rerun.
  • Agent experiment in the description: not checkable from the repository.
  • File: .changeset/templates-straight-trend-lines.md, optional wording note.
  • File: packages/cli/assets/templates/pages/dashboard-progress/page.tsx, clear for this change.
  • File: packages/cli/assets/templates/pages/dashboard-scorecard/page.tsx, clear for this change.

Automated review (maintainer link)

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · f2b29b1

Storybook · Sandbox · built from this PR's head

Package size: measured; main has no measurement of the merge base to compare yet.

API changes: unknown (base surface unavailable): richtext, theme-butter, theme-chocolate, theme-gothic, theme-matcha, theme-neutral, theme-stone, theme-y2k

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

@josephfarina

Copy link
Copy Markdown
Contributor Author

Owner decision (engineering owner, covering this pull request): the dashboard-scorecard and dashboard-progress page templates draw their weekly trend lines as straight segments between measured points instead of smoothed curves, so a line no longer bends between measured points. Build's recommendations are unchanged.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec c3c9c57

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 5b80648

@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 for one line in the changeset. The owner decision recorded at this head settles the earlier question about straight trend lines, and the template change itself checks out.

  • Miss: .changeset/templates-straight-trend-lines.md says a chart "no longer shows values between days that were never measured", but both charts plot weekly points and a straight segment still draws values between them, so reword it, for example to "so a line no longer bends between measured points".

The earlier review marked this wording optional; a release note has to describe what the change does, so it needs fixing before approval. Once it is reworded nothing else blocks approval, and CI still has to run on the new head because the last run was cancelled for capacity.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules since the last review (0): none.
  • Changeset: both templates draw trend lines as straight segments between the real points. Verified: the six curve-type props are linear, and the rendered paths go from curve commands to straight segments.
  • Changeset: a chart no longer shows values between days that were never measured. False: both charts plot weekly points, and a straight segment still draws a value for every day between two of them.
  • Description: both templates drew their trend lines with monotone curves that bend between the real data points. Verified in the base files and the rendered base paths.
  • Description: with straight segments, each segment joins two measured points. Verified.
  • Description: the alert-rail dashboard template already draws its lines this way. Verified: its shared line props use linear.
  • Description: the visual authority is an owner decision that templates draw line and area charts straight. Verified for this change: the author, an engineering owner, recorded the decision on the pull request and approved this exact head; no committed spec record states it, and after this change no template draws monotone curves.
  • Description: in the scorecard only the four trend charts change, and in the progress page only the two trend lines. Verified by pixel comparison at 1440 px in light and dark.
  • Description: only the line path changes; colours, dots, axes, tooltips and layout stay the same. Verified: only the curve type differs, and area fills follow their line.
  • Description: appearance is the primary intent, with behaviour, API, interaction and unrelated layout changes left out, and no internal context in public text. Verified.
  • Description: 58 page templates were swept and only these two change. The count of 58 is verified; the sweep itself is the author's and is consistent with the diff.
  • Description: the template tests (65 files, 277 tests) and the build and rank tests (110 tests) pass. Verified on rerun.
  • Description: captures at 1440 px and 390 px in light and dark. The 1440 px light and dark result is reproduced; 390 px was not rerun.
  • Description: agent-built pages copied the curve and a blind judge flagged it. The author's own experiment; not checkable from the repository.
  • File: .changeset/templates-straight-trend-lines.md, blocking: the false consequence clause above.
  • File: packages/cli/assets/templates/pages/dashboard-progress/page.tsx, clear for this change; rubric grade and page size unchanged from main (non-blocking).
  • File: packages/cli/assets/templates/pages/dashboard-scorecard/page.tsx, clear for this change; rubric grade unchanged from main (non-blocking).

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec bfa8850

@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 for one line in the description; the reworded changeset fixes the earlier blocker, and the owner decision approved at this head settles the straight trend lines.

  • Miss: the description's Visual authority section checks "Correction already settled by current family, design, theme, or objective accessibility authority", but no current spec record settles how template charts draw their lines, so uncheck that box and name the owner decision recorded on this pull request for these two templates as the authority.

The earlier reviews read that section as an owner-decision claim and missed the checked box; it is a description edit, so no new commit is needed. While editing, the sentence saying a daily chart shows values between days that were never measured could take the changeset's wording, since straight segments also draw values between points. CI's build and test jobs were cancelled on this head because CI was full, so they still need a re-run.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules since the last review (0): none.
  • Changeset: both templates draw their trend lines as straight segments between the measured points, so a line no longer bends between them. Verified: the six curve-type props are linear, and the rendered paths go from curve commands to straight segments.
  • Description: both templates drew their trend lines with monotone curves. Verified in the base files and the rendered base paths.
  • Description: that curve bends each line between the data points, so a daily chart shows values between days that were never measured. Verified for the bend; the second half is true of any line, straight segments included, and these charts are weekly (non-blocking).
  • Description: with straight segments, each segment joins two measured points. Verified.
  • Description: agent-built pages copied the curve and a blind judge flagged it. The author's own experiment; not checkable from the repository.
  • Description: the alert-rail dashboard template already draws its lines this way. Verified: its shared line props use linear.
  • Description: the Visual authority checkbox says the correction is already settled by current family, design, theme or accessibility authority. False: no current record covers template chart curves.
  • Description: the owner decision that templates draw line and area charts straight. Verified for this change: the author, an engineering owner, recorded it for these two templates on the pull request and approved this exact head.
  • Description: each template was rendered with astryx experimental render and captured at 1440 px and 390 px in light and dark. The command exists; the 1440 px light and dark result is reproduced; 390 px was not rerun.
  • Description: in the scorecard only the four trend charts change, and in the progress page only the two trend lines. Verified by pixel comparison at 1440 px in light and dark.
  • Description: only the line path changes; colours, dots, axes, tooltips and layout stay the same. Verified: only the curve type differs, and area fills follow their line.
  • Description: appearance is the primary intent, behaviour, API, interaction and unrelated layout changes are left out, the evidence shows the changed pixels running, and public text has no internal context. Verified.
  • Description: 58 page templates were swept and only these two change; two others differ between captures of one build and two do not render in the sweep project. The count of 58 is verified; the sweep and its observations are the author's and consistent with the diff.
  • Description: the template tests (65 files, 277 tests) and the build and rank tests (110 tests) pass. Verified on rerun.
  • File: .changeset/templates-straight-trend-lines.md, clear: the earlier false consequence clause is reworded.
  • File: packages/cli/assets/templates/pages/dashboard-progress/page.tsx, clear for this change; rubric grade and page size unchanged from main (non-blocking).
  • File: packages/cli/assets/templates/pages/dashboard-scorecard/page.tsx, clear for this change; rubric grade unchanged from main (non-blocking).

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec f2b29b1

@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: CI's build and test jobs did not run on this head because CI was full, so they need a re-run before this merges.

The description now names the owner decision recorded on this pull request as the authority for straight trend lines in these two templates, which fixes the earlier blocker; the code is unchanged and still checks out. Two notes that do not block: both templates still grade C on the template rubric, the same as on main, and dashboard-progress runs 1,154 lines; simplifying them is a separate change.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules since the last review (0): none.
  • Changeset: both templates draw their trend lines as straight segments between the measured points, so a line no longer bends between them. Verified: the six curve-type props are linear, and the rendered paths go from curve commands to straight segments.
  • Description: both templates drew their trend lines with monotone curves. Verified in the base files and the rendered base paths.
  • Description: that curve bends each line between the measured points, and straight segments stop it. Verified.
  • Description: in agent-built weekly-report pages, half copied a smoothed curve from the scorecard template and a blind judge flagged it each time. The author's own experiment; not checkable from the repository.
  • Description: the linear type joins each pair of measured points with a straight segment. Verified.
  • Description: the alert-rail dashboard template already draws its lines this way. Verified: its shared line props use linear.
  • Description: no current record settles how page-template charts draw their lines, and the authority for these two templates is the owner decision recorded on the pull request. Verified: no current record has such a clause, and an engineering owner recorded the decision for these two templates and approved this exact head.
  • Description: each template was rendered with the experimental render command and captured at 1440 px and 390 px in light and dark. The command exists; the change is reproduced at 1440 px in light and dark and at 390 px in light.
  • Description: in the scorecard only the four trend charts change, and in the progress page only the two trend lines. Verified by pixel comparison; the ideal line's points already sit almost on one straight line, so only the actual line visibly moves.
  • Description: only the line path changes; colours, dots, axes, tooltips and layout stay the same. Verified: only the curve type differs, and area fills follow their line.
  • Description: appearance is the primary intent, behaviour, API, interaction and unrelated layout changes are left out, the evidence shows the changed pixels running, and public text has no internal context. Verified.
  • Description: 58 page templates were swept and only these two change; two others differ between captures of one build and two do not render in the sweep project. The count of 58 is verified; the sweep and its observations are the author's and consistent with the diff.
  • Description: the template tests (65 files, 277 tests) and the build and rank tests (110 tests) pass. Verified on rerun.
  • File: .changeset/templates-straight-trend-lines.md, clear.
  • File: packages/cli/assets/templates/pages/dashboard-progress/page.tsx, clear for this change; rubric grade and page size unchanged from main (non-blocking).
  • File: packages/cli/assets/templates/pages/dashboard-scorecard/page.tsx, clear for this change; rubric grade unchanged from main (non-blocking).

Automated review (maintainer link)

@josephfarina
josephfarina merged commit 5cf5d69 into main Nov 18, 2026
128 of 134 checks passed
@github-actions
github-actions Bot deleted the josephfarina/templates-straight-charts branch November 18, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — f2b29b14 Deployed Nov 18, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant