Skip to content

Commit 391c0ec

Browse files
alari76claude
andauthored
fix: dark-mode form controls and gold-button contrast (#510)
Three contrast issues surfaced by reviewing the settings modal in dark mode: native checkboxes rendered as white boxes (no color-scheme set), gold buttons used near-white text at 3.3:1, and helper/Cancel text at neutral-6 sat below AA. Adds color-scheme per theme, a semantic on-primary token (dark text on gold fills in both themes), and bumps small text to neutral-5. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4e2a387 commit 391c0ec

8 files changed

Lines changed: 40 additions & 27 deletions

File tree

src/components/AddWorkflowModal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ export function AddWorkflowModal({ token, onClose, onAdd }: Props) {
535535
<button
536536
type="button"
537537
onClick={onClose}
538-
className="rounded-md bg-primary-8 px-4 py-2 text-[15px] font-medium text-neutral-1 hover:bg-primary-7 transition-colors"
538+
className="rounded-md bg-primary-8 px-4 py-2 text-[15px] font-medium text-on-primary hover:bg-primary-7 transition-colors"
539539
>
540540
Done
541541
</button>
@@ -611,7 +611,7 @@ export function AddWorkflowModal({ token, onClose, onAdd }: Props) {
611611
type="button"
612612
onClick={handleNext}
613613
disabled={!canNext()}
614-
className="flex items-center gap-1.5 rounded-md bg-primary-8 px-4 py-2 text-[15px] font-medium text-neutral-1 hover:bg-primary-7 disabled:opacity-40 transition-colors"
614+
className="flex items-center gap-1.5 rounded-md bg-primary-8 px-4 py-2 text-[15px] font-medium text-on-primary hover:bg-primary-7 disabled:opacity-40 transition-colors"
615615
>
616616
Next
617617
<IconArrowRight size={14} stroke={2} />
@@ -621,7 +621,7 @@ export function AddWorkflowModal({ token, onClose, onAdd }: Props) {
621621
type="button"
622622
onClick={handleSubmit}
623623
disabled={saving}
624-
className="flex items-center gap-1.5 rounded-md bg-primary-8 px-4 py-2 text-[15px] font-medium text-neutral-1 hover:bg-primary-7 disabled:opacity-50 transition-colors"
624+
className="flex items-center gap-1.5 rounded-md bg-primary-8 px-4 py-2 text-[15px] font-medium text-on-primary hover:bg-primary-7 disabled:opacity-50 transition-colors"
625625
>
626626
{saving ? (
627627
<>

src/components/EditWorkflowModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export function EditWorkflowModal({ token, repo, onClose, onSave }: Props) {
248248
<button
249249
type="submit"
250250
disabled={saving}
251-
className="flex-1 rounded-md bg-primary-8 py-2 text-[14px] font-medium text-neutral-1 hover:bg-primary-7 disabled:opacity-50 transition-colors flex items-center justify-center gap-1.5"
251+
className="flex-1 rounded-md bg-primary-8 py-2 text-[14px] font-medium text-on-primary hover:bg-primary-7 disabled:opacity-50 transition-colors flex items-center justify-center gap-1.5"
252252
>
253253
{saving ? (
254254
<>

src/components/FolderPicker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export function FolderPicker({ value, token, placeholder = '~/repos (default)',
142142

143143
{/* Help text */}
144144
{helpText && !error && !browseError && (
145-
<p className="mt-1 text-[12px] text-neutral-6">{helpText}</p>
145+
<p className="mt-1 text-[12px] text-neutral-5">{helpText}</p>
146146
)}
147147

148148
{/* Directory browser dropdown */}
@@ -174,7 +174,7 @@ export function FolderPicker({ value, token, placeholder = '~/repos (default)',
174174
{/* Directory list */}
175175
<div className="max-h-48 overflow-y-auto py-1">
176176
{dirs.length === 0 ? (
177-
<p className="px-3 py-2 text-[12px] text-neutral-6">No subdirectories</p>
177+
<p className="px-3 py-2 text-[12px] text-neutral-5">No subdirectories</p>
178178
) : (
179179
dirs.map(dir => (
180180
<button

src/components/InputBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function SendButton({ onClick, disabled, hasContent, size = 16, rounded = 'round
5454
}) {
5555
const activeClass = accent
5656
? 'bg-accent-7 text-neutral-1 hover:bg-accent-6'
57-
: 'bg-primary-8 text-neutral-1 hover:bg-primary-7'
57+
: 'bg-primary-8 text-on-primary hover:bg-primary-7'
5858
return (
5959
<button
6060
onClick={onClick}

src/components/SessionContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export function SessionContent({
170170
{/* Diff view button — top-right corner, visible when files have been changed */}
171171
{hasFileChanges && !diffPanelOpen && (
172172
<button
173-
className="absolute top-3 right-3 z-10 flex items-center gap-1.5 rounded-lg bg-primary-8 px-3 py-1.5 text-[13px] font-medium text-neutral-1 shadow-lg backdrop-blur-sm transition-colors hover:bg-primary-7"
173+
className="absolute top-3 right-3 z-10 flex items-center gap-1.5 rounded-lg bg-primary-8 px-3 py-1.5 text-[13px] font-medium text-on-primary shadow-lg backdrop-blur-sm transition-colors hover:bg-primary-7"
174174
onClick={onOpenDiffPanel}
175175
title="Review code changes (Ctrl+Shift+D)"
176176
>

src/components/Settings.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
196196
<button
197197
onClick={handleVerify}
198198
disabled={verifying || !tokenInput.trim()}
199-
className="rounded bg-primary-8 px-3 py-2 text-[15px] font-medium text-neutral-1 hover:bg-primary-7 disabled:opacity-50"
199+
className="rounded bg-primary-8 px-3 py-2 text-[15px] font-medium text-on-primary hover:bg-primary-7 disabled:opacity-50"
200200
>
201201
{verifying ? '...' : 'Verify'}
202202
</button>
@@ -248,7 +248,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
248248
className="w-40 rounded border border-neutral-9 bg-neutral-10 px-3 py-2 text-[15px] text-neutral-2 outline-none focus:border-primary-7"
249249
/>
250250
</div>
251-
<p className="mt-1 text-[13px] text-neutral-6">Display name for the orchestrator agent in the sidebar and chat</p>
251+
<p className="mt-1 text-[13px] text-neutral-5">Display name for the orchestrator agent in the sidebar and chat</p>
252252
</div>
253253

254254
<div className="border-t border-neutral-9/40" />
@@ -263,7 +263,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
263263
onClick={() => onUpdate({ theme: 'dark' })}
264264
className={`rounded px-4 py-1.5 text-[15px] font-medium transition-colors ${
265265
settings.theme !== 'light'
266-
? 'bg-primary-8 text-neutral-1'
266+
? 'bg-primary-8 text-on-primary'
267267
: 'border border-neutral-9 bg-neutral-10 text-neutral-3 hover:bg-neutral-9'
268268
}`}
269269
>
@@ -273,7 +273,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
273273
onClick={() => onUpdate({ theme: 'light' })}
274274
className={`rounded px-4 py-1.5 text-[15px] font-medium transition-colors ${
275275
settings.theme === 'light'
276-
? 'bg-primary-8 text-neutral-1'
276+
? 'bg-primary-8 text-on-primary'
277277
: 'border border-neutral-9 bg-neutral-10 text-neutral-3 hover:bg-neutral-9'
278278
}`}
279279
>
@@ -305,7 +305,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
305305
/>
306306
<span className="text-[15px] text-neutral-5">days</span>
307307
</div>
308-
<p className="mt-1 text-[13px] text-neutral-6">Auto-delete archived sessions older than this</p>
308+
<p className="mt-1 text-[13px] text-neutral-5">Auto-delete archived sessions older than this</p>
309309
</div>
310310
</div>
311311

@@ -328,7 +328,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
328328
Queue messages across sessions
329329
</span>
330330
</label>
331-
<p className="mt-1 ml-[26px] text-[13px] text-neutral-6">
331+
<p className="mt-1 ml-[26px] text-[13px] text-neutral-5">
332332
When enabled, messages sent while another session for the same repo is processing will be queued and sent automatically when it finishes.
333333
</p>
334334
</div>
@@ -362,7 +362,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
362362
Auto-enable worktrees for new sessions
363363
</span>
364364
</label>
365-
<p className="mt-1 ml-[26px] text-[13px] text-neutral-6">When enabled, new sessions will automatically start in a git worktree</p>
365+
<p className="mt-1 ml-[26px] text-[13px] text-neutral-5">When enabled, new sessions will automatically start in a git worktree</p>
366366
</div>
367367

368368
<div>
@@ -380,7 +380,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
380380
className="w-40 rounded border border-neutral-9 bg-neutral-10 px-3 py-2 text-[15px] text-neutral-2 outline-none focus:border-primary-7"
381381
/>
382382
</div>
383-
<p className="mt-1 text-[13px] text-neutral-6">Prefix for worktree branch names (e.g. wt/ → wt/abc12345)</p>
383+
<p className="mt-1 text-[13px] text-neutral-5">Prefix for worktree branch names (e.g. wt/ → wt/abc12345)</p>
384384
</div>
385385
</div>
386386

@@ -396,7 +396,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
396396
<>
397397
<IconCircleCheckFilled size={16} className="text-success-6" />
398398
<span className="text-[15px] text-success-5 font-medium">Active</span>
399-
<span className="text-[13px] text-neutral-6">
399+
<span className="text-[13px] text-neutral-5">
400400
&middot; max {webhookConfig.maxConcurrentSessions} concurrent sessions
401401
</span>
402402
</>
@@ -407,7 +407,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
407407
</>
408408
)
409409
) : (
410-
<span className="text-[13px] text-neutral-6">Loading...</span>
410+
<span className="text-[13px] text-neutral-5">Loading...</span>
411411
)}
412412
</div>
413413

@@ -456,7 +456,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
456456
}
457457
}}
458458
disabled={!healthRepo.trim() || healthLoading}
459-
className="flex items-center gap-1.5 rounded bg-primary-8 px-3 py-2 text-[13px] font-medium text-neutral-1 hover:bg-primary-7 disabled:opacity-50 transition-colors"
459+
className="flex items-center gap-1.5 rounded bg-primary-8 px-3 py-2 text-[13px] font-medium text-on-primary hover:bg-primary-7 disabled:opacity-50 transition-colors"
460460
>
461461
{healthLoading ? (
462462
<IconRefresh size={14} className="animate-spin" />
@@ -530,7 +530,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
530530
setWizardStep('idle')
531531
}
532532
}}
533-
className="flex items-center gap-1.5 rounded bg-primary-8 px-3 py-2 text-[13px] font-medium text-neutral-1 hover:bg-primary-7 transition-colors mt-2"
533+
className="flex items-center gap-1.5 rounded bg-primary-8 px-3 py-2 text-[13px] font-medium text-on-primary hover:bg-primary-7 transition-colors mt-2"
534534
>
535535
<IconWand size={14} />
536536
Set up automatically
@@ -617,7 +617,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
617617
setWizardStep('preview')
618618
}
619619
}}
620-
className="rounded bg-primary-8 px-3 py-1.5 text-[13px] font-medium text-neutral-1 hover:bg-primary-7 transition-colors"
620+
className="rounded bg-primary-8 px-3 py-1.5 text-[13px] font-medium text-on-primary hover:bg-primary-7 transition-colors"
621621
>
622622
Apply
623623
</button>
@@ -706,7 +706,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
706706
Under <strong className="text-neutral-3">&ldquo;Which events?&rdquo;</strong>, select <strong className="text-neutral-3">Let me select individual events</strong> and check <strong className="text-neutral-3">Workflow runs</strong> and <strong className="text-neutral-3">Pull requests</strong>
707707
</span>
708708
</div>
709-
<p className="text-[13px] text-neutral-6 pt-1 border-t border-neutral-9/50">
709+
<p className="text-[13px] text-neutral-5 pt-1 border-t border-neutral-9/50">
710710
Webhook events will automatically spawn <IconRobot size={12} className="inline -mt-0.5" /> sessions for PR reviews and CI failure analysis.
711711
</p>
712712
</div>
@@ -739,7 +739,7 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
739739

740740
{/* Disabled hint */}
741741
{webhookConfig && !webhookConfig.enabled && !healthResult && (
742-
<p className="mt-3 text-[13px] text-neutral-6">
742+
<p className="mt-3 text-[13px] text-neutral-5">
743743
Set <code className="bg-neutral-9/50 px-1 rounded text-neutral-4">GITHUB_WEBHOOK_ENABLED=true</code> and <code className="bg-neutral-9/50 px-1 rounded text-neutral-4">GITHUB_WEBHOOK_SECRET</code> on the server to enable.
744744
</p>
745745
)}
@@ -757,15 +757,15 @@ export function Settings({ open, onClose, settings, onUpdate, isMobile = false,
757757
{settings.token && (
758758
<button
759759
onClick={onClose}
760-
className="rounded px-4 py-2 text-[15px] text-neutral-6 hover:text-neutral-2"
760+
className="rounded px-4 py-2 text-[15px] text-neutral-5 hover:text-neutral-2"
761761
>
762762
Cancel
763763
</button>
764764
)}
765765
<button
766766
onClick={handleSave}
767767
disabled={!tokenInput.trim()}
768-
className="rounded bg-primary-8 px-4 py-2 text-[15px] font-medium text-neutral-1 hover:bg-primary-7 disabled:opacity-50"
768+
className="rounded bg-primary-8 px-4 py-2 text-[15px] font-medium text-on-primary hover:bg-primary-7 disabled:opacity-50"
769769
>
770770
Save
771771
</button>

src/components/WorkflowsView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export function WorkflowsView({ token, onNavigateToSession }: Props) {
128128
<div className="flex items-center gap-1.5">
129129
<button
130130
onClick={() => setShowAddForm(true)}
131-
className="flex items-center gap-1.5 rounded-md bg-primary-8 px-3 py-1.5 text-[15px] font-medium text-neutral-1 hover:bg-primary-7 transition-colors"
131+
className="flex items-center gap-1.5 rounded-md bg-primary-8 px-3 py-1.5 text-[15px] font-medium text-on-primary hover:bg-primary-7 transition-colors"
132132
>
133133
<IconPlus size={14} stroke={2} />
134134
New Workflow
@@ -156,7 +156,7 @@ export function WorkflowsView({ token, onNavigateToSession }: Props) {
156156
</div>
157157
<button
158158
onClick={() => setShowAddForm(true)}
159-
className="mt-4 inline-flex items-center gap-1.5 rounded-md bg-primary-8 px-4 py-2 text-[15px] font-medium text-neutral-1 hover:bg-primary-7 transition-colors"
159+
className="mt-4 inline-flex items-center gap-1.5 rounded-md bg-primary-8 px-4 py-2 text-[15px] font-medium text-on-primary hover:bg-primary-7 transition-colors"
160160
>
161161
<IconPlus size={14} stroke={2} />
162162
Create your first workflow

src/index.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
--color-ink: var(--color-neutral-2); /* primary text */
117117
--color-ink-muted: var(--color-neutral-5); /* secondary text */
118118
--color-ink-faint: var(--color-neutral-6); /* de-emphasized metadata */
119+
--color-on-primary: var(--color-primary-12); /* text on gold (primary-8) fills */
119120
}
120121

121122
/* Terminal / chat area — warm gray palette.
@@ -255,6 +256,8 @@
255256
--color-primary-10: #fcedcc;
256257
--color-primary-11: #fef3dc;
257258
--color-primary-12: #fef8ec;
259+
/* The light scale is inverted, so "dark text on gold" is primary-1 here */
260+
--color-on-primary: var(--color-primary-1);
258261

259262
/* Secondary (terracotta) — inverted */
260263
--color-secondary-1: #321d14;
@@ -515,6 +518,16 @@
515518
--color-neutral-6: #8a8a8a;
516519
}
517520

521+
/* Tell the browser which scheme native UI (checkboxes, scrollbars, number
522+
spinners, pickers) should use — without this, unchecked checkboxes render
523+
as stark white boxes in dark mode. */
524+
:root {
525+
color-scheme: dark;
526+
}
527+
[data-theme="light"] {
528+
color-scheme: light;
529+
}
530+
518531
html, body, #root {
519532
height: 100%;
520533
margin: 0;

0 commit comments

Comments
 (0)