Repository navigation
refactor(admin): use Kumo semantic tokens for status colors - #1866
Conversation
🦋 Changeset detectedLatest commit: 3b0fd41 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 | 3b0fd41 | Jul 09 2026, 09:41 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-do | 3b0fd41 | Jul 09 2026, 09:41 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 3b0fd41 | Jul 09 2026, 09:41 AM |
There was a problem hiding this comment.
This is the right kind of refactor: it is narrowly scoped to swapping hard-coded Tailwind palette classes for Kumo semantic tokens, aligns with AGENTS.md’s styling rules, and leaves all non-UI logic untouched. The changeset is appropriate, and the editor-journey files the PR explicitly skips still have legacy dark: classes.
I read the full diff, re-read the changed files, and searched the tree for remaining dark: prefixes in the touched files and for existing Badge variant usage. All changed files are now dark:-free. The conversion looks consistent across callouts, status dots, badges, and icon squares.
I only have two small, non-blocking notes: RoleBadge now sizes the small variant by text alone, which could leave padding inconsistent between sizes; and the refactor introduces several Badge variant values (warning, error, neutral, plus role colors) that are not used anywhere else in the admin, so worth a quick visual/type check. No blocking issues.
Findings
-
[suggestion]
packages/admin/src/components/users/RoleBadge.tsx:43-46The
smsize now overrides onlytext-xs, whilemdstill adds explicitpx-2.5 py-1 text-sm. If KumoBadgesupplies its own default padding this makes the two sizes diverge; if it does not, the small badge collapses to text-only. Since the PR says there are no behavior changes, make sizing explicit for both variants.const sizeClasses = { sm: "px-2 py-0.5 text-xs", md: "px-2.5 py-1 text-sm", }; -
[suggestion]
packages/admin/src/components/users/RoleBadge.tsx:23-29This refactor introduces
Badgevariants that are not used anywhere else in the admin (blue,green,purple,red,neutral). The existing codebase only usessuccess,secondary,outline, anddestructive. I cannot verify the KumoBadgeAPI without installed types, so this is just a heads-up: please confirm these variants are supported and render the intended colors. (Same note applies toCommentStatusBadgeinpackages/admin/src/components/comments/CommentDetail.tsxforwarning,error, andneutral.) -
[suggestion]
packages/admin/src/components/MarketplaceBrowse.tsx:329The pass branch now uses the prefixed
kumo-successtokens, but the warn branch still uses the barewarningtoken. For consistency with the rest of this refactor, consider migrating it to the prefixed Kumo token as well.className="inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs bg-kumo-warning/10 text-kumo-warning"
Replace hard-coded Tailwind palette classes and dark: prefixes with Kumo semantic tokens across 17 admin components so status colors theme consistently in light and dark mode. Convert the hand-rolled RoleBadge and CommentStatusBadge spans into Kumo Badge wrappers with semantic variants.
28ac83a to
07e0778
Compare
The warn branch of AuditBadge used bare warning utilities that have no token definition, so the badge rendered unstyled. Use the kumo-warning tokens like the pass and fail branches.
All six warning highlights in the dialog referenced a bare warning color token that has no definition in the admin theme, so new-capability rows, the public-routes notice, and the warn audit banner rendered unstyled. Use the kumo-warning tokens.
An automated style commit on this branch collapsed formatting that the pinned oxfmt/prettier versions expect expanded, which broke the CI format check. Re-running pnpm format restores the expected output.
Overlapping PRsThis PR modifies files that are also changed by other open PRs:
This may cause merge conflicts or duplicated work. A maintainer will coordinate. |
Follow-up commits addressed these issue. |
There was a problem hiding this comment.
This is the right kind of refactor: narrowly scoped to swapping hard-coded Tailwind palette classes and dark: prefixes for Kumo semantic tokens, with no logic changes. The changeset is appropriate, no new user-facing strings were added, and messages.po changes were correctly omitted.
The bare warning token I flagged in the previous review is now resolved — MarketplaceBrowse uses bg-kumo-warning/10 text-kumo-warning consistently. I checked all changed files for remaining raw palette classes and dark: prefixes and found none.
I have two remaining notes:
ContentTypeListintroducesbg-kumo-badge-purple/bg-kumo-badge-blue, which are not used anywhere else in the admin and are not present inpackages/admin/src/styles.css. If Kumo 2.6.0 does not ship these tokens, the content-type icon squares will render without a background. Worth confirming or switching to documented Kumo tokens.RoleBadgestill sizes thesmvariant by text alone whilemdadds explicit padding; this is a carry-over from the previous review. If KumoBadgedoes not supply equivalent default padding, the two sizes will diverge.
Neither is a hard blocker for a styling-only refactor, but the badge-bg tokens in particular should be verified before merge.
There was a problem hiding this comment.
This is a narrowly-scoped styling refactor: it strips hard-coded Tailwind palette classes and dark: prefixes from admin components and replaces them with Kumo semantic tokens, plus fixes the genuinely nonexistent bg-warning / text-warning classes. The changeset is appropriate, no new user-facing strings were introduced, and messages.po updates were correctly omitted.
As a re-review, my main concern remains the same as the previous pass: the PR introduces two token names that are not documented anywhere in this repo — bg-kumo-badge-purple / bg-kumo-badge-blue in ContentTypeList, and bg-kumo-subtle in ContentPickerModal. If Kumo 2.6.0 does not ship those exact CSS variables, Tailwind will silently drop the classes and those elements will render without their intended backgrounds. For the white icon squares in ContentTypeList, that means a real light-mode visual regression (white icons on the white/light table row). The author noted visual checks passed, but these tokens should still be confirmed against the Kumo 2.6.0 build or switched to documented tokens before merge.
Static checks found no remaining raw palette classes or dark: prefixes in the admin .tsx files, and the warning-token fixes in MarketplaceBrowse and CapabilityConsentDialog are correct. The RoleBadge migration to Kumo Badge is reasonable, though the sm/md sizing is still inconsistent.
I did not run the test suite, linter, or build (no shell access), so I cannot independently verify the author's reported pass results.
Co-authored-by: emdashbot[bot] <273199577+emdashbot[bot]@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | 3b0fd41 | Jul 09 2026, 09:41 AM |
What does this PR do?
Migrates admin UI status colors from hard-coded Tailwind palette classes and
dark:prefixes to Kumo semantic tokens across 17 admin components.This also fixes warning highlights that used nonexistent
bg-warning/text-warningclasses in:MarketplaceBrowseaudit warn badgeCapabilityConsentDialogwarning statesRoleBadgeandCommentStatusBadgenow use KumoBadgevariants instead of hand-rolled colored spans.Editor-journey files are intentionally untouched in this PR.
Closes #
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs — a workflow extracts catalogs on merge tomain. n/a, no new strings.AI-generated code disclosure
Screenshots / test output
pnpm lint:json | jq '.diagnostics | length': 0pnpm lint:quick: passedpnpm typecheck: passedpnpm --filter @emdash-cms/admin test: 84 files / 1050 tests passedpnpm format:check: passedTry 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
claude/determined-shannon-798e32. Updated automatically when the playground redeploys.