Skip to content

fix(design-system): give the EmptyState card the border it only coloured - #1527

Merged
jackwener merged 1 commit into
mainfrom
claude/emptystate-border-and-knip
Jul 27, 2026
Merged

fix(design-system): give the EmptyState card the border it only coloured#1527
jackwener merged 1 commit into
mainfrom
claude/emptystate-border-and-knip

Conversation

@jackwener

Copy link
Copy Markdown
Member

What

EmptyState's card recipe was … rounded-md border-border bg-card/70 … — a border colour with no width utility. Tailwind renders that at border-width: 0, so the edge never existed. Measured on the live Skills market surface before the fix:

borderWidth: 0px
boxShadow: … oklch(0.17 0.005 286 / 0.1) 0 0 0 1px, … 0 14px 40px …

What was outlining the card was incidental — the 0 0 0 1px var(--border) ring inside shadow-maka-panel.

Why it's worse than a normal missing hairline

The card has no fill contrast to fall back on. Measured in the same probe:

colour
card backgroundoklab(1 0 0 / 0.7)
panel behind itoklch(1 0 0)

70% white composited over pure white is pure white. bg-card/70 was presumably written for a gray page plate (--surface-canvas), but this card sits on a panel that paints pure white. So the border isn't decoration here — it's the only thing separating the card from the page.

How

Add the border width utility, and drop shadow-maka-panel.

That shadow is the floating-overlay family — mention popup, model picker, select popup, dialog — and EmptyState was its only in-page consumer, so the card was casting a popup's 0 14px 40px shadow as well as leaning on its ring for the missing border. After the fix there is exactly one 1px edge, on the same token .settingsRows and .maka-skill-market-card already use.

Verified live after the change: borderWidth: 1px, boxShadow: none.

Scope checks

  • The sidebar's .maka-session-empty-state variant is unaffected — empty-state.css strips border/background/shadow/padding there with !important.
  • Audited the other border-border sites: the rest are correct (border-b border-border, border border-border). item.tsx's outline variant looks like the same bug but isn't — its base class carries border border-transparent, so the variant only overrides the colour.

Also in scope, and already done

The knip leftover from #1515 (src/overlay/permission-overlay{,-preload}.ts unreachable) is already fixed on main — both files are in knip.json's desktop entry list and npx knip --workspace apps/desktop is clean. Nothing to do.

Tests

New render contract (packages/ui/src/__tests__/empty-state.test.ts): the card class must carry a real border, must keep the colour on the token, must not wear the overlay shadow, and the inline variant must stay chrome-free.

Gates: @maka/ui 253/253 · desktop test and typecheck exit 0 · format:check clean · knip --workspace apps/desktop clean.

`EmptyState` shipped its card recipe with `border-border` and no width
utility. In Tailwind that sets a colour and nothing else, so the rendered
border-width was 0 — the edge the author meant to draw never existed.
What was actually outlining the card was incidental: the
`0 0 0 1px var(--border)` ring inside `shadow-maka-panel`. That shadow is
the floating-overlay family — mention popup, model picker, select popup,
dialog — and EmptyState was its only in-page consumer, so the card was
also casting a `0 14px 40px` popup shadow for no reason.
This matters more than a normal missing hairline because the card has no
fill contrast to fall back on. Measured live on the Skills market surface:
the card composites to `oklch(1 0 0)` and the panel behind it is also
`oklch(1 0 0)` — `bg-card/70` contributes nothing there, so the border is
the only separation between card and page.
Add the `border` width utility and drop the overlay shadow. One real
hairline at the same token `.settingsRows` and the skill cards already use,
instead of a colour that did nothing plus a ring that was covering for it.
The sidebar's `.maka-session-empty-state` variant is unaffected — it strips
border/background/shadow/padding with `!important` in empty-state.css.
Checked the other `border-border` sites while here; the rest are correct
(`border-b border-border`, `border border-border`). `item.tsx`'s `outline`
variant looks like the same bug but is not — its base class carries
`border border-transparent`, so the variant only needs to change the colour.
Pinned by a new render test: the card class must carry a real `border`, must
keep the colour on the token, and must not wear the overlay shadow.
Gates: @maka/ui 253/253, desktop test + typecheck exit 0, format:check and
knip clean.
@jackwener
jackwener merged commit a61cc2b into mainJul 27, 2026
3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@jackwener