Repository navigation
Refine admin dashboard cards with Kumo primitives - #1865
Conversation
Replace the hand-rolled anchor styling in the dashboard header with Kumo RouterLinkButton (secondary, base size) so the quick actions read as a consistent toolbar and inherit Kumo focus, dark-mode, and RTL behavior. Also route the collection quick actions to the new-content route (/content/$collection/new) so their "+" create framing matches their destination, instead of the collection list.
🦋 Changeset detectedLatest commit: 20455b5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/auth-atproto
@emdash-cms/blocks
@emdash-cms/cloudflare
@emdash-cms/contentful-to-portable-text
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/plugin-cli
@emdash-cms/plugin-types
@emdash-cms/registry-client
@emdash-cms/registry-lexicons
@emdash-cms/sandbox-workerd
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-field-kit
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 20455b5 | Jul 08 2026, 02:29 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 20455b5 | Jul 08 2026, 02:31 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-do | 20455b5 | Jul 08 2026, 02:29 PM |
There was a problem hiding this comment.
This is a sensible visual-only refresh: it replaces ad-hoc dashboard containers with Kumo LayerCard/Badge/SkeletonLine/Banner, preserves the existing DashboardStats contract, and keeps stale data visible during background refetch errors. The quick-action route change to /content/$collection/new is intentional and matches a registered route. All user-facing strings are Lingui-wrapped, no raw Tailwind directional utilities were introduced, and changesets are present.
The main issue is an RTL regression: the ArrowRight hover indicator in the Content rows is not flipped for right-to-left layouts, which directly contradicts the repo’s RTL guidance and the author’s own note that RTL alignment was not visually verified in Arabic. I also noticed that the previous dashboard status strip showed a scheduled-content count, but the new metric cards only show drafts/media/users, so that information is no longer surfaced anywhere on the dashboard. That may be intentional, but it is a behavior change worth calling out.
I spot-checked the diff against AGENTS.md conventions (Lingui, RTL-safe Tailwind, Kumo primitives, changesets) and traced route and type usage through router.tsx and dashboard.ts. I did not run the test suite or typechecker locally; those results are taken from the PR description as unverified.
There was a problem hiding this comment.
This is a measured, visual-only dashboard refresh that aligns the admin UI with Kumo primitives, fixes the prior RTL regression, and preserves stale data during background refetch errors. I read the full diff, traced the ArrowNext / CaretNext helpers in ArrowIcons.tsx, verified the /content/$collection/new route exists, and checked for physical directional utilities and Lingui leaks. The code is generally clean and consistent with AGENTS.md.
What changed since the last review:
- RTL fixed. The Content-row hover arrow now uses
ArrowNext, which appliesrtl:-scale-x-100inpackages/admin/src/components/ArrowIcons.tsx, so it points left in RTL layouts instead of right. - Active error handling added.
isErroris now surfaced, a KumoBanneris shown on failures, and the dashboard still renders cached data when a background refetch fails.
Still worth addressing:
- The scheduled-content count is gone. The old status strip displayed scheduled entries as a metric when present; the new
SummaryMetricscards only show drafts, media, and users. That is a real dashboard behavior change the description calls out as preserved ("preserving the existing dashboard data contract"). Either restore a scheduled metric or update the PR description/changeset to document the removal. - Scope creep.
packages/core/tests/integration/smoke/retry-font-fetch.mjsandfixtures/perf-site/astro.config.mjs(fonts: false) are unrelated to dashboard card primitives. They may be a sensible CI deflake, but they are not described in the PR and should be split out or at least called out.
No security, SQL, authorization, or API-contract issues were introduced. I did not run the test suite, typechecker, or linter locally; those results are taken from the PR description as unverified.
ascorbic
left a comment
There was a problem hiding this comment.
It would be good if we could upstream a real fix for the fonts issue. Not sure if it's in Astro itself or one of the libraries it uses, but in either case having a retry mechanism would be a good addition.
There was a problem hiding this comment.
Re-review of the dashboard Kumo refresh. The outstanding item from the last round — the missing scheduled-content metric — is now fixed and explicit. ContentRepository.getStats counts rows with scheduled_at IS NOT NULL, the dashboard handler/client types thread scheduled through, and the UI renders a conditional Scheduled LayerCard instead of inferring it from residual statuses.
The rest of the refresh follows the repo’s conventions: Kumo primitives for cards, badges, skeletons and banner; RouterLinkButton avoids invalid <a><button> nesting; ArrowNext gives correct RTL behavior; and error state preserves stale data while showing a Banner. I didn’t spot Lingui leaks, physical directional utilities, raw Tailwind colors, dynamic SQL, or missing changesets.
The two non-card hunks (fixtures/perf-site/astro.config.mjs fonts: false and the retry-font-fetch.mjs smoke-test shim) remain included but are now called out in the PR description, so they read as a documented deflake side-quest rather than an unnoticed scope creep. They’re not blocking.
Tests are updated for the scheduled count and the quick-action routing. I did not run the suite, typechecker, or linter locally; those results are taken from the PR description as unverified. Overall this is clean enough to sign off.
What does this PR do?
Refreshes the admin dashboard to use Kumo card primitives and more consistent dashboard spacing, while preserving the existing dashboard data contract.
Highlights:
LayerCardmetric cards for drafts, scheduled content when present, media files, and users.LayerCard.Badgefor Content published/draft counts and semantic Kumo tokens for Recent Activity status dots.SkeletonLinefor loading states andBannerfor dashboard data load errors while preserving stale dashboard data during background refetch failures.No linked issue.
Type of change
Checklist
pnpm typecheckpassespnpm lint:quickpasses andpnpm lint:json | jq '.diagnostics | length'returns0pnpm --filter @emdash-cms/admin test -- tests/components/Dashboard.test.tsxpasses (full admin browser suite: 1053 tests)pnpm formathas been runmessages.pochanges except in translation PRs — a workflow extracts catalogs on merge tomain.AI-generated code disclosure
openai/gpt-5.5).Screenshots / test output
Full-page screenshots captured at 1400x1000.
Loaded
Empty
Loading
Error
Verification run:
Adversarial review:
second-opinionreview against the branch diff.Try this PR
Open a fresh playground →
A full working EmDash site, deployed from this branch. Each visit gets its own session-scoped sandbox: no login needed and no shared state. Try the admin, edit content, hit the public site.
Tracks
fix/admin-dashboard-layer-card. Updated automatically when the playground redeploys.