Repository navigation
Description
Overview
../nodespace-docs/DESIGN.md specifies modals use "a backdrop overlay at low opacity; no drop shadow on the panel itself," and that all colors come from the CSS variable token system defined in packages/desktop-app/src/app.css. An audit found several modal/toast/banner components with hand-picked custom box-shadow values (violating the no-shadow rule) and, in at least one case, an entirely separate hardcoded color palette unrelated to the token system.
Problem Statement
Forbidden shadows (DESIGN.md: "no drop shadow on the panel itself"):
delete-confirmation-modal.svelte—box-shadow: 0 8px 32px rgba(0,0,0,0.4)subtree-access-denied-modal.svelte— same0 8px 32px rgba(0,0,0,0.4)version-conflict-modal.svelte— custom shadowfirst-pro-consent-modal.svelte—0 4px 16px rgba(...)first-pro-consent-slot.svelte—0 4px 16px rgba(...)pro-relogin-modal.svelte—0 4px 16px rgba(...)update-banner.svelte— custom shadowconflict-toast.svelte— custom shadow
Only base-node.svelte's date-picker popover currently uses the one shadow value DESIGN.md actually sanctions for floating surfaces: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1). Popovers/dropdowns are a different surface type than modals in DESIGN.md's model — modals get no shadow at all (they're already visually separated by the backdrop overlay), so the fix for modals is to remove the shadow entirely, not to swap in the popover's value.
Hardcoded color palette:
version-conflict-modal.svelteuses an entirely unrelated Material-Design-style palette hardcoded inline:#d32f2f,#4caf50,#1976d2,#e8f5e9,#f5f5f5,#ddd,#666— none of these map to any token inapp.cssand several duplicate the intent of existing tokens (e.g.#d32f2f/destructive red,#4caf50/success green,#1976d2/primary-ish blue) under completely different hues than the app's actual palette.
Proposed Solution
- Remove the
box-shadowdeclarations from all listed modal panels — per DESIGN.md, the backdrop overlay alone provides the visual separation; add no replacement shadow - For
update-banner.svelteandconflict-toast.svelte(non-modal floating surfaces), check DESIGN.md's rules for toast/banner-class components specifically — if they fall under the same "backdrop-separated, no shadow" rule use the same fix; if DESIGN.md has separate guidance for toasts/banners, follow that guidance's specified shadow value instead of the modal panel rule - Replace every hardcoded literal in
version-conflict-modal.sveltewith the corresponding token fromapp.css(e.g.#d32f2f→var(--destructive),#4caf50→var(--success),#1976d2→var(--primary)orvar(--info-light)as appropriate to context,#e8f5e9/#f5f5f5/#ddd→ the corresponding--muted/--border/--secondarytokens,#666→--muted-foreground) — check each usage's actual semantic intent (error, success, informational, structural) rather than picking the nearest hex match
Acceptance Criteria
- No
box-shadowdeclaration remains on the modal panel itself indelete-confirmation-modal.svelte,subtree-access-denied-modal.svelte,version-conflict-modal.svelte,first-pro-consent-modal.svelte,first-pro-consent-slot.svelte,pro-relogin-modal.svelte -
update-banner.svelteandconflict-toast.svelteshadows are resolved consistent with whatever DESIGN.md specifies for their component class (documented in the PR which rule was applied and why) -
version-conflict-modal.sveltecontains zero hardcoded hex/rgba color literals — every color reference usesvar(--token)fromapp.css - Visual behavior is otherwise unchanged (backdrop opacity, layout, spacing not altered by this issue)
- No new Stylelint violations for these files once Add Stylelint enforcement for design tokens, shadows, and transitions in Svelte components #2589 lands (or, if this issue lands first, running the new linter against these files afterward shows zero violations)
- Code passes
bun run quality:fix - Tests pass (
bun run test:all)
Technical Specifications
Reference Files
- Token source of truth:
packages/desktop-app/src/app.css - Design spec:
../nodespace-docs/DESIGN.md— modal/backdrop/shadow rules - Correct shadow precedent (popover, not modal):
packages/desktop-app/src/lib/design/components/base-node.svelte(date-picker popover) —0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) - Files to fix:
delete-confirmation-modal.svelte,subtree-access-denied-modal.svelte,version-conflict-modal.svelte,first-pro-consent-modal.svelte,first-pro-consent-slot.svelte,pro-relogin-modal.svelte,update-banner.svelte,conflict-toast.svelte(exact paths underpackages/desktop-app/src— locate viafind packages/desktop-app/src -iname "<filename>")
Dependencies
- Add Stylelint enforcement for design tokens, shadows, and transitions in Svelte components #2589 (Stylelint enforcement — provides the regression check for this fix; not a hard blocker to start)
Related Issues
- Unify node-type accent colors to a single primary-based system #2590 (node-color unification — same audit, different finding)
- (sync/pro pills hardcoded-color issue — sibling remediation issue)
- (diagnostic-panel + noderef.css hardcoded-color issue — sibling remediation issue)
Activity
malibio commentedon Sep 16, 2026
Frontend baseline: 246 test files passed, 5078 tests passed (0 failures).
malibio commentedon Sep 16, 2026
Scope note —
version-conflict-modal.svelteno longer exists.The file named in the Problem Statement as the holder of the hardcoded Material-Design palette (
#d32f2f,#4caf50,#1976d2, …) was deleted in #2602 ("Delete 4 orphaned frontend components") as an unused component. Confirmed: none of those hex literals appear anywhere in the codebase today.That makes two acceptance criteria moot:
version-conflict-modal.svelteshadow removalversion-conflict-modal.sveltecontains zero hardcoded hex/rgba color literalsThe remaining 7 files are exactly as described, and the Stylelint gate from #2589 independently confirmed all 7 shadows.
Scope expanded (agreed with maintainer): 4 of the 7 files referenced a
--color-*variable vocabulary (--color-surface,--color-text-primary,--color-border,--color-accent, …) thatapp.cssdefines nowhere — so every reference silently resolved to its hardcoded fallback, and those fallbacks are dark-only values. These components rendered dark chrome in light mode regardless of theme. Same defect class as #2592, but on a disjoint set of files (no overlap).DESIGN.md ruling for the toast/banner question: the Toast section specifies z-index only, and the Do's/Don'ts scope shadows to popovers and dropdowns. So
conflict-toastandupdate-bannerget the same no-shadow treatment as the modal panels.Deliberately out of scope (remain in the gate baseline):
rgba(0, 0, 0, 0.5)on 4 modals — consistent app-wide convention; issue scopes backdrop opacity outconflict-toast@keyframes/animation — pre-existing DESIGN.md motion violation, unrelatedDesign-token baseline ratchets 251 → 201.
Replace hardcoded shadows and phantom color vars with design tokens (c…