Skip to content

fix(frontend): scope dark hover bg to class-based dark mode (#960) - #974

Merged
vybe merged 1 commit into
devfrom
fix/960-agents-light-theme-hover
Jun 2, 2026
Merged

vybe merged 1 commit into
devfrom
fix/960-agents-light-theme-hover

Conversation

@dolho

@dolho dolho commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the dark hover band that appeared on Agents list rows when the OS was in dark mode but the app theme was set to light.

  • src/frontend/src/views/Agents.vue defined dark:hover:bg-gray-750 inside @media (prefers-color-scheme: dark), but the app's Tailwind config uses darkMode: 'class'. OS dark + app light triggered the dark hover anyway, covering the row in an unreadable navy band.
  • Promote gray-750 to a real Tailwind utility via the config palette extension. The generated dark:hover:bg-gray-750 now resolves through :is(.dark *) and respects the app's theme class strategy.
  • Drop the custom @media (prefers-color-scheme: dark) block — no longer needed.
  • Side benefit: QueueList.vue referenced the same dark:hover:bg-gray-750 class but silently rendered nothing (no scoped CSS definition there). It now picks up the real utility.

Related to #960

Test plan

Verified in browser via Playwright (headless Chromium, colorScheme context to emulate OS preference):

  • Light OS + Light app → row idle rgb(255,255,255), hover rgb(249,250,251) (gray-50). PASS
  • Dark OS + Light app (original bug case) → html carries no dark class, row stays rgb(255,255,255) at rest, hovers to rgb(249,250,251). No dark artifact. PASS
  • Dark OS + Dark app → row idle rgb(31,41,55) (gray-800), hover rgb(42,48,60) (gray-750). Subtle darker hover preserved. PASS
  • CSS bundle confirms generated selector is .dark\:hover\:bg-gray-750:hover:is(.dark *) — broken @media rule is gone.

🤖 Generated with Claude Code

The custom CSS for `dark:hover:bg-gray-750` in Agents.vue was wrapped
in `@media (prefers-color-scheme: dark)`, but the app uses
`darkMode: 'class'`. A user with OS dark mode and the app on the
light theme triggered the dark hover anyway, producing an unreadable
dark band on row hover.

Promote `gray-750` to a real Tailwind utility via the config palette
extension. The generated `dark:hover:bg-gray-750` then resolves
through the class strategy and the manual `@media` block is no
longer needed. Also unblocks `QueueList.vue` which referenced the
same utility but silently rendered nothing because it had no scoped
CSS definition.

Related to #960

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@dolho
dolho requested a review from vybe June 1, 2026 06:46
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

⚠️ Nightly unit-suite check skipped — merge conflict against dev.

Resolve by running git merge dev locally and pushing the result. The next nightly run will re-test once the conflict is gone.

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

Validated: correct root-cause fix (class-based dark mode), Playwright matrix covers the OS-dark/app-light bug case, security clean. APPROVE.

@vybe
vybe merged commit db5ec16 into dev Jun 2, 2026
14 checks passed
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.

2 participants