Skip to content

Commit 67868a6

Browse files
jotyyclaude
andcommitted
ui(desktop): unify settings cards on bordered chrome (drop shadow-md)
Sweep through settings-scope panels (Account, Billing, Submissions) and replace card-shaped `shadow-md` with `border border-border` so the visual language matches `SettingsCard` and the full-screen settings reference. Net effect: every settings card now reads as a quiet hairline-bordered group, with the page itself doing the heavy visual framing. Sites updated: - `auth/AuthPanel.tsx` — connected-providers list (3567), empty-state CTA card (3579), add-provider clickable row (3600), and the two `theme-shell` outer sections (4308, 4315) drop `shadow-card`. - `billing/BillingSummaryCard.tsx` — section card (133). - `settings/SubmissionsPanel.tsx` — destructive error card (399); swaps to `border border-destructive/24` to keep the warning tone. Skipped (intentional): - `auth/AuthPanel.tsx:3763, 4104` — Dialog popups with `shadow-xl`. Floating modals; lift is correct for them. - Workspace surfaces outside settings (PaneCard, AppShell sections, dashboard panels, ChatPane, AppSurfacePane). Out of scope; their lift is part of the workspace-pane visual language. - `IntegrationsPane.tsx` standalone path — when mounted in settings via `<IntegrationsPane embedded />` the embedded branch already bypasses the card-shell wrapper, so settings already render shadow-free for integrations. Standalone path stays as-is. Tests: - `auth/AuthPanel.test.mjs` brittle assertions updated: - `assert.match(source, /shadow-md/)` → `assert.doesNotMatch(...)` - empty-state CTA card pattern: `bg-card shadow-md` → `border border-border bg-card` - setup-loading section pattern: `rounded-[24px] ... shadow-card` → `rounded-3xl ...` (also picks up the rounded-3xl scale move from #285). - `npm run desktop:typecheck` clean - `node --test` 57 pass / 1 pre-existing baseline fail Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2802b27 commit 67868a6

4 files changed

Lines changed: 16 additions & 11 deletions

File tree

desktop/src/components/auth/AuthPanel.test.mjs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test("billing summary card exposes web-only billing actions", async () => {
2525
assert.match(source, /Billing managed on web/);
2626
assert.match(source, />\s*Manage\s*</);
2727
assert.match(source, /openExternalUrl/);
28-
assert.match(source, /shadow-md/);
28+
assert.doesNotMatch(source, /shadow-md/);
2929
assert.doesNotMatch(source, /Available hosted credits/);
3030
assert.doesNotMatch(source, /Recent usage/);
3131
assert.doesNotMatch(source, /text-\[[0-9]+px\]/);
@@ -159,7 +159,9 @@ test("runtime auth panel keeps model provider settings compact", async () => {
159159
);
160160
assert.match(
161161
runtimeProviderSettingsBlock,
162-
/<div className="flex flex-col items-center justify-center gap-2 rounded-xl bg-card shadow-md px-6 py-8 text-center">/,
162+
// Card chrome migrated from `shadow-md` to bordered (matches the
163+
// full-screen settings reference's quieter look).
164+
/<div className="flex flex-col items-center justify-center gap-2 rounded-xl border border-border bg-card px-6 py-8 text-center">/,
163165
);
164166
});
165167

@@ -352,7 +354,10 @@ test("account view uses an inline profile header and theme-colored sign-in actio
352354
assert.match(source, /if \(view === "account"\) \{/);
353355
assert.match(
354356
source,
355-
/if \(showsSetupLoadingState\) \{\s*return \(\s*<section className="theme-shell w-full max-w-none overflow-hidden rounded-\[24px\] border border-border text-sm text-foreground shadow-card">\s*<div className="px-4 py-5">\s*\{setupLoadingPanel\}\s*<\/div>/,
357+
// Card chrome migrated: `rounded-[24px]` → `rounded-3xl` (token
358+
// scale) and `shadow-card` dropped (settings adopt border-only
359+
// chrome — see SettingsCard).
360+
/if \(showsSetupLoadingState\) \{\s*return \(\s*<section className="theme-shell w-full max-w-none overflow-hidden rounded-3xl border border-border text-sm text-foreground">\s*<div className="px-4 py-5">\s*\{setupLoadingPanel\}\s*<\/div>/,
356361
);
357362
assert.match(source, /className="flex items-start justify-between gap-3"/);
358363
assert.match(source, /className="grid h-11 w-11 shrink-0 place-items-center rounded-full border border-primary bg-primary\/10 text-lg font-semibold text-primary"/);

desktop/src/components/auth/AuthPanel.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3564,7 +3564,7 @@ export function AuthPanel({ view = "full" }: AuthPanelProps) {
35643564
description="Connect the providers you want the agent to be able to use."
35653565
>
35663566
{connectedProviderIds.length > 0 ? (
3567-
<div className="overflow-hidden rounded-xl bg-card shadow-md">
3567+
<div className="overflow-hidden rounded-xl border border-border bg-card">
35683568
{connectedProviderIds.map((providerId, index) =>
35693569
renderProviderRow(
35703570
providerId,
@@ -3576,7 +3576,7 @@ export function AuthPanel({ view = "full" }: AuthPanelProps) {
35763576
// Empty state: card-shaped CTA. Cleaner than a full provider list
35773577
// that's mostly disconnected; mirrors craft-agents-oss's connections
35783578
// empty state.
3579-
<div className="flex flex-col items-center justify-center gap-2 rounded-xl bg-card shadow-md px-6 py-8 text-center">
3579+
<div className="flex flex-col items-center justify-center gap-2 rounded-xl border border-border bg-card px-6 py-8 text-center">
35803580
<div className="text-sm font-medium text-foreground">
35813581
No providers connected
35823582
</div>
@@ -3597,7 +3597,7 @@ export function AuthPanel({ view = "full" }: AuthPanelProps) {
35973597
render={
35983598
<button
35993599
type="button"
3600-
className="group flex w-full items-center justify-between gap-3 rounded-xl bg-card px-3 py-2 shadow-md transition-colors hover:bg-accent"
3600+
className="group flex w-full items-center justify-between gap-3 rounded-xl border border-border bg-card px-3 py-2 transition-colors hover:bg-accent"
36013601
>
36023602
<span className="flex items-center gap-2 text-sm font-medium text-foreground">
36033603
<Plus className="size-4 text-muted-foreground" />
@@ -4305,7 +4305,7 @@ export function AuthPanel({ view = "full" }: AuthPanelProps) {
43054305

43064306
if (showsSetupLoadingState) {
43074307
return (
4308-
<section className="theme-shell w-full max-w-none overflow-hidden rounded-3xl border border-border text-sm text-foreground shadow-card">
4308+
<section className="theme-shell w-full max-w-none overflow-hidden rounded-3xl border border-border text-sm text-foreground">
43094309
<div className="px-4 py-5">{setupLoadingPanel}</div>
43104310
</section>
43114311
);

desktop/src/components/billing/BillingSummaryCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export function BillingSummaryCard({
130130
const timelineLabel = billingTimelineLabel(overview);
131131

132132
return (
133-
<section className="overflow-hidden rounded-xl bg-card shadow-md [&>*+*]:border-t [&>*+*]:border-border">
133+
<section className="overflow-hidden rounded-xl border border-border bg-card [&>*+*]:border-t [&>*+*]:border-border">
134134
{/* Header row */}
135135
<div className="flex items-center justify-between gap-3 px-4 py-3">
136136
<div className="flex min-w-0 items-center gap-2">

desktop/src/components/settings/SubmissionsPanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@ export function SubmissionsPanel({ initialFocusedId = null }: SubmissionsPanelPr
394394
if (error) {
395395
return (
396396
<div className="grid gap-6">
397-
{/* Destructive variant — stays a custom card since SettingsCard
398-
uses bg-card; we want bg-destructive/5 for error tone. */}
399-
<div className="overflow-hidden rounded-xl bg-destructive/5 shadow-md">
397+
{/* Destructive variant — custom card (SettingsCard hard-codes
398+
bg-card; we want bg-destructive/5 for error tone). */}
399+
<div className="overflow-hidden rounded-xl border border-destructive/24 bg-destructive/5">
400400
<div className="flex items-center gap-2.5 px-4 py-3">
401401
<AlertTriangle className="size-4 shrink-0 text-destructive" />
402402
<p className="text-sm text-destructive">{error}</p>

0 commit comments

Comments
 (0)