Skip to content

Commit b23e5d9

Browse files
authored
Add colorful composer controls appearance setting (#858)
* feat: add colorful composer controls appearance setting Introduces an opt-in Appearance setting that paints the composer's effort level, Plan toggle, and Terminal-Mode toggle with their accent colors (off by default for a neutral appearance). * feat: restore accent colors to composer mode controls Remove the colorful composer controls setting and make accent colors always-on (the preferred default). Simplifies the code by eliminating the opt-in toggle and its conditional rendering logic.
1 parent bf84ce9 commit b23e5d9

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"helmor": patch
3+
---
4+
5+
Restore the accent colors on the composer's mode controls — the animated Extra High / Max effort label, the Plan toggle, and the Terminal-Mode toggle.

src/features/composer/index.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,13 @@ export const WorkspaceComposer = memo(function WorkspaceComposer({
11691169
disabled={toolbarDisabled}
11701170
className={cn(
11711171
`flex items-center gap-0.5 ${composerToolbarTriggerClassName}`,
1172-
composerToolbarActiveClassName,
1172+
// `effort-max-text` paints via `-webkit-text-fill-color:
1173+
// transparent` without a `color`, so it needs a muted
1174+
// baseline to avoid a flash when the gradient class drops.
1175+
"text-muted-foreground hover:text-muted-foreground",
1176+
(effectiveEffort === "max" ||
1177+
effectiveEffort === "xhigh") &&
1178+
"effort-max-text",
11731179
toolbarDisabled
11741180
? "cursor-not-allowed opacity-45 hover:bg-transparent"
11751181
: null,
@@ -1223,7 +1229,7 @@ export const WorkspaceComposer = memo(function WorkspaceComposer({
12231229
className={cn(
12241230
`size-7 justify-center px-0 ${composerToolbarTriggerClassName}`,
12251231
permissionMode === "plan"
1226-
? composerToolbarActiveClassName
1232+
? "text-plan hover:text-plan"
12271233
: "text-muted-foreground/70 hover:text-muted-foreground/70",
12281234
)}
12291235
onToggle={() =>
@@ -1244,7 +1250,7 @@ export const WorkspaceComposer = memo(function WorkspaceComposer({
12441250
className={cn(
12451251
`size-7 justify-center px-0 ${composerToolbarTriggerClassName}`,
12461252
terminalMode
1247-
? composerToolbarActiveClassName
1253+
? "text-emerald-500 hover:bg-emerald-500/10 hover:text-emerald-500"
12481254
: // Pin the hover text color (like the Plan toggle) so the
12491255
// toolbar base `hover:text-foreground` can't flash the icon
12501256
// white for a frame while `transition-colors` runs on toggle.

0 commit comments

Comments
 (0)