Skip to content

fix(templates): Rename dashboard page templates to pattern slugs - #5927

Merged
kentonquatman merged 1 commit into
mainfrom
rename-dashboard-templates-to-pattern-slugs
Sep 2, 2026
Merged

fix(templates): Rename dashboard page templates to pattern slugs#5927
kentonquatman merged 1 commit into
mainfrom
rename-dashboard-templates-to-pattern-slugs

Conversation

@kentonquatman

Copy link
Copy Markdown
Contributor

Rename dashboard page templates to pattern slugs

Applies the template naming convention to the dashboard family. The convention asks a slug to name the reusable UI pattern, not the data or the task it happens to ship — a slug built on the fixture under-serves every neighbouring request.

Five of the seven dashboards named the fixture:

Before After Why the old slug missed
dashboard-data dashboard-comparison "data" separates nothing — every dashboard shows data
dashboard-executive-summary dashboard-scorecard names the audience and document purpose, not a pattern
dashboard-portfolio dashboard-composition finance domain noun (the ⚠️ data-shape row)
dashboard-project-status dashboard-progress domain noun; the shape fits any migration or rollout
dashboard-service-monitoring dashboard-alert-rail domain noun + gerund — the ❌ verb-phrase style, near-identical to the guide's own monitor-kpis example

Each new slug is the template's actual dominant structure, taken from the page itself: comparison tiles with period-over-period deltas; a "Scorecards" band with attainment bars and a commentary rail; composition-over-time closing on ranked contributors; a completion donut, milestone timeline and burndown; and an independently scrolling alert rail beside the charts.

Left alone deliberately

dashboard and dashboard-cohort-funnel already comply.

  • dashboard is the guide's own exemplar, and a bare family head is the roster's established convention — table, login, documentation, settings and ai-chat all do the same. It is also the family's only reliable front door: scoreCandidate in packages/cli/api/search/search.mjs only substring-matches when the shorter string covers ≥50% of the longer, so the query word "dashboard" scores an exact 100 against dashboard but would fall to 47% — below the threshold — against a suffixed dashboard-analytics.
  • dashboard-cohort-funnel reads as domain vocabulary but funnel and cohort are chart archetypes, making it a legitimate {pattern}-{pattern} hybrid.

Categories

Two categories move with their slugs, and both new values join the TemplateCategory union:

  • dashboard-comparisonDashboard - Comparison. It previously declared Dashboard - Analytics verbatim identical to the dashboard template, so neither owned what the guide calls "the strongest keyword signal a page has".
  • dashboard-scorecardDashboard - Scorecard, so the pattern slot holds a pattern.

Superseded values stay reserved in the union, per the taxonomy's documented behaviour. dashboard-alert-rail keeps Dashboard - Monitoring — category is exactly where domain vocabulary belongs.

Retrieval impact: none expected

Every domain noun dropped from a slug is already carried in that template's description, which is written to the four-slot structural shape. The guide's own measurement found the name axis inert for natural-language retrieval — ablating name changed 0 of 36 battery results — so this is a legibility and self-retrieval change, not a ranking change.

Also in this PR

Fixes a typo in the scorecard template's name field: "Executive Summary Dashoard". displayName was already correct, so it only surfaced where name is read.

Breaking

Template resolution is exact-match on the directory name with no alias mechanism, so the five old slugs stop resolving. astryx template dashboard-portfolio and friends will fail after this lands. Tagged [breaking] in the changeset, which the validator maps to a minor bump while 0.x.

Two of the five (dashboard-data, dashboard-service-monitoring) are isReady: false and carry no settled consumers.

Verification

  • pnpm check:repo — all 12 checks pass, including check:changesets and check:knowledge
  • pnpm vitest run packages/cli/api/template packages/cli/authoring … — 120 tests, 15 files, all pass
  • tsc --noEmit against tsconfig.template-docs.json and tsconfig.authoring-contract.json — clean (these are what typecheck the doc files against TemplateCategory)
  • node scripts/sync-templates.js — regenerates cleanly; no checked-in generated files change
  • astryx template --list --type page lists all seven dashboards under the new slugs
  • Git recorded all ten file moves as renames; page.tsx content is byte-identical in every case

Reviewer notes

  • apps/docsite/src/components/templateComponents.ts was the only code reference to any of these slugs; dashboard-portfoliodashboard-composition is updated there.
  • Changelog history in packages/cli/CHANGELOG.md mentions the old slugs. Left untouched — it is a record of what shipped.
  • Display names (name / displayName) are unchanged, e.g. dashboard-composition still displays as "Portfolio Dashboard". The convention explicitly keeps domain vocabulary in the human-facing name, and it is not scored. "Data Dashboard" on dashboard-comparison is the weakest of them and may be worth a follow-up, but renaming display names is an editorial call separate from this convention fix.
  • Not addressed here: table-page still carries the -page stopword suffix and duplicates table's Table - Basic category — the clearest remaining naming violation in the roster.

The template naming convention asks a slug to name the reusable UI
pattern, not the data or the task it happens to ship, so that a
neighbouring request matches it. Five dashboards named the fixture:

  dashboard-data                -> dashboard-comparison
  dashboard-executive-summary   -> dashboard-scorecard
  dashboard-portfolio           -> dashboard-composition
  dashboard-project-status      -> dashboard-progress
  dashboard-service-monitoring  -> dashboard-alert-rail

`dashboard` and `dashboard-cohort-funnel` already comply and are
untouched: the bare head is the family default, as with table/ and
login/, and funnel and cohort are chart archetypes rather than domains.

Two categories move with their slugs. dashboard-comparison takes
'Dashboard - Comparison' -- it previously shared 'Dashboard - Analytics'
verbatim with the dashboard template, so neither owned its strongest
keyword -- and dashboard-scorecard takes 'Dashboard - Scorecard'. Both
join the TemplateCategory union; the superseded values stay reserved.

Domain vocabulary is untouched in every description, which is where
retrieval reads it from. Also fixes "Executive Summary Dashoard".

Breaking: template resolution is exact-match on the directory name with
no alias mechanism, so the old slugs stop resolving.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 2, 2026
@vercel

vercel Bot commented Sep 2, 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 Sep 2, 2026 4:08pm UTC

Request Review

@kentonquatman kentonquatman changed the title Rename dashboard page templates to pattern slugs fix(templates): Rename dashboard page templates to pattern slugs Sep 2, 2026
github-actions Bot added a commit that referenced this pull request Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@kentonquatman
kentonquatman merged commit 3ffe0fc into main Sep 2, 2026
27 checks passed
@kentonquatman
kentonquatman deleted the rename-dashboard-templates-to-pattern-slugs branch September 2, 2026 18:55
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.

2 participants