Skip to content

fix(admin): pin @cloudflare/kumo so prebuilt CSS matches runtime - #1630

Merged
ascorbic merged 1 commit into
mainfrom
fix/admin-button-kumo-skew-1607
Jun 26, 2026
Merged

ascorbic merged 1 commit into
mainfrom
fix/admin-button-kumo-skew-1607

Conversation

@ascorbic

Copy link
Copy Markdown
Member

What does this PR do?

Fixes invisible primary buttons in the admin (notably Sign in with Passkey on the login page and Register Passkey in the add-passkey flow), which render as white text on a transparent/white background and leave passkey login unreachable.

Root cause is version skew, not the Tailwind scanner (contrary to the issue's diagnosis). The admin package ships a prebuilt dist/styles.css generated by scanning whatever @cloudflare/kumo is resolved at admin build time. It declared @cloudflare/kumo: ^2.4.0, so:

  • Our lockfile built the CSS against Kumo 2.4.1, whose primary Button uses a solid bg-kumo-brand background.
  • The published ^2.4.0 lets a consumer resolve 2.6.0, whose primary Button paints its background through an aria-hidden gradient span using bg-linear-to-b + from-(--kumo-button-emphasis-gradient-start) / to-(--kumo-button-emphasis-gradient-end).
  • Those classes were never emitted into the prebuilt CSS, so the gradient span paints nothing and !text-white lands on a white card.

The fix pins @cloudflare/kumo to an exact version in the catalog so build-time and runtime Kumo are always identical (a floating range fundamentally can't work for a package that ships prebuilt, scanned CSS), and rebuilds admin. A comment in pnpm-workspace.yaml documents the coupling so the range isn't reintroduced.

No breaking changes across 2.4.1 -> 2.6.0: the only breaking Kumo changes in that span were in 2.4.0 (Sidebar API removals), which predate our locked baseline. Everything else is additive (new Toolbar, opt-in chart prop) plus the Button gradient treatment.

Closes #1607

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change) — full admin suite (1014 tests) green on Kumo 2.6.0
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable) — n/a: this is a dependency-pinning/packaging fix; the failure mode is build-time CSS coverage, not testable code logic. The exact pin plus the explanatory comment guard against reintroducing the floating range.
  • User-visible strings in the admin UI are wrapped for translation (if applicable) — n/a, no string changes
  • I have added a changeset (if this PR changes a published package)
  • New features link to an approved Discussion — n/a, bug fix

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: Claude Opus 4.8 (opencode)

Screenshots / test output

Verified in a browser against the simple demo dev server (which serves the rebuilt prebuilt dist/styles.css with Kumo 2.6.0 component markup):

  • Login page: the "Sign in with Passkey" button now renders with its blue gradient background and white text. Computed style of the gradient span is background-image: linear-gradient(oklch(...), rgb(34, ...)) — the issue reported none.
  • Dashboard (sanity check across the 2.5.0 Sidebar rewrite): full admin renders cleanly, the active nav item shows the same gradient highlight, header buttons paint correctly, no invisible controls.

The admin ships a prebuilt dist/styles.css generated by scanning Kumo's
dist at build time, but declared @cloudflare/kumo: ^2.4.0. Consumers
resolved a newer Kumo whose primary Button paints via a gradient span
(bg-linear-to-b + --kumo-button-emphasis-gradient-*) absent from that
prebuilt CSS, rendering the button transparent (white text on a white
card) and leaving passkey login unreachable.

Pin Kumo to an exact version in the catalog so build-time and runtime
Kumo are always identical, and rebuild admin.

Closes #1607
@changeset-bot

changeset-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0e25460

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@emdash-cms/admin Patch
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/sandbox-workerd Patch
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/do-demo-site Patch
@emdash-cms/do-solo-demo-site Patch
@emdash-cms/auth Patch
@emdash-cms/blocks Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 Patch
create-emdash Patch
@emdash-cms/auth-atproto Patch
@emdash-cms/plugin-embeds Patch

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

@github-actions github-actions Bot added size/S review/needs-review No maintainer or bot review yet cla: signed labels Jun 26, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-playground 0e25460 Jun 26 2026, 12:19 PM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-do 0e25460 Jun 26 2026, 12:19 PM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-cache 0e25460 Jun 26 2026, 12:19 PM

@pkg-pr-new

pkg-pr-new Bot commented Jun 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@1630

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@1630

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/@emdash-cms/auth-atproto@1630

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@1630

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@1630

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/contentful-to-portable-text@1630

emdash

npm i https://pkg.pr.new/emdash@1630

create-emdash

npm i https://pkg.pr.new/create-emdash@1630

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@1630

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/@emdash-cms/plugin-cli@1630

@emdash-cms/plugin-types

npm i https://pkg.pr.new/@emdash-cms/plugin-types@1630

@emdash-cms/registry-client

npm i https://pkg.pr.new/@emdash-cms/registry-client@1630

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/@emdash-cms/registry-lexicons@1630

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/@emdash-cms/sandbox-workerd@1630

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@1630

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@1630

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@1630

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@1630

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@1630

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@1630

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/@emdash-cms/plugin-field-kit@1630

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@1630

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@1630

commit: 0e25460

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

This is a focused, correct packaging fix for the root cause described in #1607. The admin package ships a prebuilt dist/styles.css generated by scanning Kumo at build time, so a floating ^2.4.0 catalog range lets consumers resolve a different Kumo version than the one Tailwind saw. Pinning @cloudflare/kumo to an exact catalog version guarantees build-time and runtime Kumo match, which is the only real fix for invisible components caused by missing scanned classes.

What I checked:

  • Read the full diff and all changed files (changeset, pnpm-workspace.yaml, pnpm-lock.yaml).
  • Confirmed only @emdash-cms/admin builds a prebuilt dist/styles.css via its build script that calls @tailwindcss/cli; other workspace packages using Kumo (blocks, plugin packages) either don't ship CSS or export source files, so the catalog pin is appropriate.
  • Verified dist/ is gitignored, so the "rebuild admin" step correctly does not appear in the diff as committed output.
  • Confirmed the changeset is scoped to @emdash-cms/admin as a patch, which matches the user-visible bug fix.

No issues found. The approach is right, the change is minimal, and the comment in pnpm-workspace.yaml documents the coupling so future maintainers don't reintroduce a floating range.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: signed review/approved Approved; no new commits since size/S

Projects

None yet

1 participant