an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions
HTML agent-harnessagent-orchestrationagentsai-agentsautonomous-agentsclaude-codecodexcoding-agentsdesktop-appdeveloper-toolselectrongemini-cliharnessharness-engineeringlocal-firstmemorymulti-agentopencodeorchestrationtypescript
fix(ui): make disabled buttons and inverted-surface icons visible again
Chaitanya Girib158c2905d32
diff --git a/src/renderer/src/components/Icon.tsx b/src/renderer/src/components/Icon.tsxindex ee841b3c..fdb0ebc3 100644--- a/src/renderer/src/components/Icon.tsx+++ b/src/renderer/src/components/Icon.tsx@@ -6,7 +6,7 @@ import { CSSProperties } from 'react';export type IconName =| 'gear' | 'plus' | 'x' | 'check' | 'arrow-right' | 'pause' | 'play'| 'bell' | 'folder' | 'terminal' | 'code' | 'web' | 'mcp' | 'sparkle'- | 'expand' | 'minimize' | 'clock' | 'mic' | 'ledger';+ | 'expand' | 'minimize' | 'clock' | 'mic' | 'ledger' | 'info' | 'sidebar';interface IconDef {ink: string; // primary color path d@@ -98,6 +98,24 @@ const paths: Record<IconName, IconDef> = {mic: {accentColor: 'var(--cth-coral)',ink: 'M6 2h4v7H6V2z M4 9h1v2H4z M11 9h1v2h-1z M4 11h8v1H4z M7 12h2v2H7z M5 14h6v1H5z'+ },+ // Filled disc with the 'i' knocked OUT of it — the dot and stem are separate+ // subpaths cut by fill-rule: evenodd, same trick as the gear's hub hole. A+ // knocked-out glyph stays legible at 16px where a 1px-stroked outline would+ // shimmer against the pixel grid.+ info: {+ accentColor: 'var(--cth-sky)',+ ink: 'M5 1h6v1h2v1h1v2h1v6h-1v2h-1v1h-2v1H5v-1H3v-1H2v-2H1V5h1V3h1V2h2V1z M7 4h2v2H7z M7 7h2v5H7z'+ },+ // Panel outline with the left column filled — the standard sidebar-toggle+ // glyph. Three subpaths under fill-rule: evenodd — frame, hollow interior,+ // then the left column, which lands on an ODD crossing count and so fills back+ // in. Deliberately NOT `minimize`/`expand`: those sit in the same toolbar+ // meaning "exit fullscreen", and two size-ish arrows side by side read as the+ // same control twice.+ sidebar: {+ accentColor: 'var(--cth-ink-300)',+ ink: 'M1 3h14v10H1z M2 4h12v8H2z M2 4h4v8H2z'}};@@ -120,7 +138,14 @@ export function Icon({ name, size = 1, style }: IconProps) {aria-hidden>{def.accent && <path d={def.accent} fill={def.accentColor} fillRule="evenodd" />}- <path d={def.ink} fill="var(--cth-ink-900)" fillRule="evenodd" />+ {/* currentColor, not a hardcoded `--cth-ink-900`. `body` already sets that+ same token as its color, so this is a no-op for every icon sitting on a+ normal surface — but on an INVERTED surface it is the difference between+ an icon and a blank space. A primary PixelButton fills itself with+ `--cth-ink-900` and an icon painted the same token vanished into it (the+ arrow on Send, in both themes). Inheriting means an icon is always the+ colour of the text it sits beside, which is what every call site meant. */}+ <path d={def.ink} fill="currentColor" fillRule="evenodd" /></svg>);}diff --git a/src/renderer/src/components/PixelButton.tsx b/src/renderer/src/components/PixelButton.tsxindex 23ce93a3..c9cab7de 100644--- a/src/renderer/src/components/PixelButton.tsx+++ b/src/renderer/src/components/PixelButton.tsx@@ -30,33 +30,48 @@ export function PixelButton({const [pressed, setPressed] = useState(false);const [hover, setHover] = useState(false);+ // DISABLED TEXT IS ITS OWN COLOR, not the variant's.+ //+ // Every variant swaps its FILL to `--cth-cream-300` when disabled, but the+ // variants used to keep their enabled text token — and `primary`'s is+ // `--cth-cream-50`, the INVERSE foreground picked to sit on an ink-900 button.+ // On the cream-300 disabled fill that pairing collapses: in dark mode it is+ // #1A191E text on #37363E (~1.4:1, effectively invisible), and in light mode a+ // near-white #FFFDF5 on tan, which is barely better. That is why a disabled+ // Send or Dispatch reads as an empty box.+ //+ // `--cth-ink-500` is the one foreground that works against cream-300 in BOTH+ // themes, because both tokens flip together — and a muted label is what a+ // disabled control should look like anyway.+ const disabledText = 'var(--cth-ink-500)';+const palette = (() => {switch (variant) {case 'primary':return {fill: disabled ? 'var(--cth-cream-300)' : (hover ? 'var(--cth-ink-700)' : 'var(--cth-ink-900)'),- text: 'var(--cth-cream-50)',+ text: disabled ? disabledText : 'var(--cth-cream-50)',border: 'var(--cth-ink-900)',shadow: 'var(--cth-ink-900)'};case 'secondary':return {fill: disabled ? 'var(--cth-cream-300)' : (hover ? 'var(--cth-cream-200)' : 'var(--cth-cream-100)'),- text: 'var(--cth-ink-900)',+ text: disabled ? disabledText : 'var(--cth-ink-900)',border: 'var(--cth-ink-300)',shadow: 'var(--cth-ink-100)'};case 'ghost':return {fill: hover ? 'var(--cth-cream-200)' : 'transparent',- text: 'var(--cth-ink-700)',+ text: disabled ? disabledText : 'var(--cth-ink-700)',border: 'var(--cth-ink-300)',shadow: 'var(--cth-ink-100)'};case 'destructive':return {fill: disabled ? 'var(--cth-cream-300)' : (hover ? 'var(--cth-coral-light)' : 'var(--cth-coral)'),- text: 'var(--cth-ink-900)',+ text: disabled ? disabledText : 'var(--cth-ink-900)',border: 'var(--cth-ink-500)',shadow: 'var(--cth-ink-300)'};