Skip to content

fix(desktop): match dropdown trigger color to run button state#3009

Merged
Kitenite merged 2 commits into
mainfrom
ui-consistency-fix-for-run-button-color
Mar 30, 2026
Merged

fix(desktop): match dropdown trigger color to run button state#3009
Kitenite merged 2 commits into
mainfrom
ui-consistency-fix-for-run-button-color

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Mar 30, 2026

Summary

  • Sync the combo dropdown chevron color on the WorkspaceRunButton with the main button's state-dependent styling so both halves look like one cohesive control.

Why / Context

The main Run button changes color based on state — emerald when running, muted when unconfigured — but the adjacent dropdown chevron always stayed the default bg-secondary/50 text-muted-foreground. This made the split button look visually disconnected, especially in the running state where the left half was green and the right half was grey.

Manual QA Checklist

Run Button States

  • Running state: both main button and dropdown chevron show emerald styling (text-emerald-300, bg-emerald-500/10)
  • Idle with run command: both halves use default secondary styling
  • No run command configured: both halves show muted styling (text-muted-foreground/80, bg-secondary/40)
  • Hover on dropdown (running): background brightens to bg-emerald-500/20
  • Pending state: both halves show reduced opacity

Testing

  • bun run typecheck
  • Visual inspection across all three button states

Summary by cubic

Align the WorkspaceRunButton dropdown trigger with the main Run button so both halves share state-based styling. Running uses emerald, idle stays secondary, unconfigured is muted; pending opacity and running hover are respected.

  • Refactors
    • Linted the component file (no functional changes).

Written for commit 4718564. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed dropdown button styling to properly reflect workspace running state and command configuration status. The button now displays an active state when a workspace is running and a muted appearance when no run command is configured.

The combo dropdown chevron on the WorkspaceRunButton stayed a static
color while the main button changed between idle, running (emerald),
and unconfigured (muted) states. Apply the same conditional color
classes to the dropdown trigger so both halves look consistent.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 30, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f23264c2-c812-42e7-bda2-425fc25b33aa

📥 Commits

Reviewing files that changed from the base of the PR and between 29141c1 and 4718564.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/TopBar/components/WorkspaceRunButton/WorkspaceRunButton.tsx

📝 Walkthrough

Walkthrough

The dropdown trigger button in WorkspaceRunButton now applies conditional styling based on isRunning state and run command configuration. When running, it adopts an emerald-themed appearance; when not running without a configured command, it applies a muted disabled-like style.

Changes

Cohort / File(s) Summary
WorkspaceRunButton styling
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/TopBar/components/WorkspaceRunButton/WorkspaceRunButton.tsx
Dropdown trigger button now applies conditional CSS classes based on isRunning state and presence of configured run command; emerald active state when running, muted appearance when not running without command.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A button that shimmers in emerald glow,
When running it dances, when idle it's slow,
The trigger now knows when to shine or to fade,
No click left unnoticed—a stylish cascade! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ui-consistency-fix-for-run-button-color

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Kitenite Kitenite merged commit 83e49cc into main Mar 30, 2026
5 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/TopBar/components/WorkspaceRunButton/WorkspaceRunButton.tsx">

<violation number="1" location="apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/TopBar/components/WorkspaceRunButton/WorkspaceRunButton.tsx:146">
P3: In the running state, hover will still apply `hover:text-foreground` from the base classes, so the chevron text turns default on hover instead of staying emerald. Add a running-state hover text override to keep the colors consistent with the left button.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

"active:scale-[0.98]",
isPending && "opacity-50 pointer-events-none",
isRunning
? "text-emerald-300 border-emerald-500/25 bg-emerald-500/10 hover:bg-emerald-500/20"
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: In the running state, hover will still apply hover:text-foreground from the base classes, so the chevron text turns default on hover instead of staying emerald. Add a running-state hover text override to keep the colors consistent with the left button.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/TopBar/components/WorkspaceRunButton/WorkspaceRunButton.tsx, line 146:

<comment>In the running state, hover will still apply `hover:text-foreground` from the base classes, so the chevron text turns default on hover instead of staying emerald. Add a running-state hover text override to keep the colors consistent with the left button.</comment>

<file context>
@@ -142,6 +142,10 @@ export const WorkspaceRunButton = memo(function WorkspaceRunButton({
 							"active:scale-[0.98]",
 							isPending && "opacity-50 pointer-events-none",
+							isRunning
+								? "text-emerald-300 border-emerald-500/25 bg-emerald-500/10 hover:bg-emerald-500/20"
+								: !hasRunCommand &&
+									"text-muted-foreground/80 border-border/40 bg-secondary/40",
</file context>
Suggested change
? "text-emerald-300 border-emerald-500/25 bg-emerald-500/10 hover:bg-emerald-500/20"
? "text-emerald-300 border-emerald-500/25 bg-emerald-500/10 hover:bg-emerald-500/20 hover:text-emerald-300"
Fix with Cubic

MocA-Love added a commit to MocA-Love/superset that referenced this pull request Mar 30, 2026
fix(desktop): match dropdown trigger color to run button state (superset-sh#3009)
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.

1 participant