Skip to content

Replace opacity: 0.9 hover with --primary-hover on 8 buttons - #2764

Merged
mstomar125 merged 1 commit into
mainfrom
issue-2690-primary-hover-opacity
Sep 21, 2026
Merged

mstomar125 merged 1 commit into
mainfrom
issue-2690-primary-hover-opacity

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

Summary

Eight filled hsl(var(--primary)) buttons used opacity: 0.9 for hover, which makes the button translucent (whatever sits behind it shows through) and theme-blind (fading toward the surface color flips direction between light/dark). Replaces each hover declaration with background: hsl(var(--primary-hover)) — the documented token idiom established by #2673/#2685 — matching the property (background) each site's own base rule already uses.

Sites fixed

  • settings/model-manager.svelte — .btn--primary:hover:not(:disabled)
  • chat/chat-input.svelte — .send-button:not(:disabled):hover
  • viewers/collection-node-viewer.svelte — .retry-button:hover
  • viewers/query-node-viewer.svelte — .retry-button:hover AND .new-instance-button:hover:not(:disabled)
  • viewers/ai-chat-pty-session.svelte — .launch-button:hover:not(:disabled)
  • query/query-editor.svelte — .btn-save:hover
  • onboarding/onboarding-wizard.svelte — .primary-button:hover:not(:disabled)

:disabled { opacity: ... } declarations (chat-input's send button, query-node-viewer's new-instance button, onboarding's primary button) are untouched — separate, legitimate affordance.

Note on the orphaned transition: opacity cleanup

The issue predicted removing dead transition: opacity 0.15s ease rules (e.g. query-editor.svelte) would shrink the design-token baseline. Verified none of the 8 files in this worktree actually carry a transition: opacity declaration anymore — grepped all 7 changed files for transition, zero hits. So there was nothing to remove, and the baseline stays at 50 (unchanged), which is the correct outcome given that finding, not a fix defect.

Verification

  • bun run test: 256 files / 5226 tests passed, before and after.
  • bun run quality:design-tokens (from packages/desktop-app): 50 known violations before, 50 after — unchanged (see note above).
  • Live-verified via isolated NODESPACE_HOME + headless Playwright against the real dev-proxy/daemon stack:
    • model-manager.svelte "Add provider" button: rest background: rgb(29, 149, 137) (--primary, opacity 1) → hover background: rgb(24, 123, 114) (--primary-hover, opacity 1). Matches the computed hsl(174 67% 29%) exactly.
    • chat-input.svelte send button: disabled rest keeps opacity: 0.4 (untouched); once enabled, rest background: rgb(29, 149, 137) opacity 1 → hover background: rgb(24, 123, 114) opacity 1.
    • Both confirm buttons are fully opaque at rest and hover, and the hover color is genuinely the --primary-hover token, not an opacity fade.
  • Independent review agent re-verified all 8 sites, the disabled-state exclusions, the 9th-site grep (diagnostic-panel.svelte:264, confirmed out of scope — an unrelated hint-text style), the --primary-hover token definition in both themes, and independently re-measured the design-token baseline (50 → 50) — APPROVE.

Closes #2690

🤖 Generated with Claude Code

Eight filled hsl(var(--primary)) buttons used opacity: 0.9 for hover,
making them translucent (letting the background bleed through) and
theme-blind (the fade direction flips between light and dark since it
fades toward the surface color rather than using the dedicated token).

Replaces each hover declaration with background: hsl(var(--primary-hover)),
matching the property used in each site's own base rule. Disabled-state
opacity declarations (chat-input send button, query-node-viewer new-instance
button, onboarding primary button) are left untouched — they're a distinct
affordance.

Sites: model-manager, chat-input, collection-node-viewer,
query-node-viewer (x2), ai-chat-pty-session, query-editor,
onboarding-wizard.

Closes #2690

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@mstomar125
mstomar125 merged commit bd5d89f into main Sep 21, 2026
@mstomar125
mstomar125 deleted the issue-2690-primary-hover-opacity branch September 21, 2026 07:33
Sign up for free to 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.

Eight filled primary buttons use opacity: 0.9 as hover instead of --primary-hover

1 participant