Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

fix(settings): kill leaked native button chrome + dark visual polish

enesd203f64bc056
diff --git a/src/renderer/components/settings/SettingsIcons.tsx b/src/renderer/components/settings/SettingsIcons.tsx
new file mode 100644
index 000000000..ec717abd1
--- /dev/null
+++ b/src/renderer/components/settings/SettingsIcons.tsx
@@ -0,0 +1,85 @@
+import type { SettingsSectionId } from './nav'
+
+/** One small line glyph per settings section, used in the sidebar nav.
+ * 16×16, currentColor stroke — color is driven by the parent (active = accent). */
+const PATHS: Record<SettingsSectionId, React.JSX.Element> = {
+ terminal: (
+ <>
+ <rect x="2" y="3" width="12" height="10" rx="2" />
+ <path d="M4.8 6.2 6.6 8l-1.8 1.8M8.4 10h2.8" />
+ </>
+ ),
+ shell: <path d="M3 4.5 6 8l-3 3.5M8 11.5h5" />,
+ behavior: (
+ <>
+ <path d="M2.5 5.5h6M10.5 5.5h3M2.5 10.5h3M7.5 10.5h6" />
+ <circle cx="9.3" cy="5.5" r="1.4" />
+ <circle cx="6.3" cy="10.5" r="1.4" />
+ </>
+ ),
+ appearance: (
+ <>
+ <circle cx="8" cy="8" r="5.5" />
+ <path d="M8 2.5a5.5 5.5 0 0 0 0 11z" fill="currentColor" stroke="none" />
+ </>
+ ),
+ agents: (
+ <path d="M8 2.3 9.4 5.9 13 7.3 9.4 8.7 8 12.3 6.6 8.7 3 7.3 6.6 5.9z" />
+ ),
+ 'custom-agents': (
+ <>
+ <rect x="2.5" y="2.5" width="11" height="11" rx="2.5" />
+ <path d="M8 5.5v5M5.5 8h5" />
+ </>
+ ),
+ notifications: (
+ <>
+ <path d="M4.8 7a3.2 3.2 0 0 1 6.4 0c0 3 1.1 3.9 1.1 3.9H3.7S4.8 10 4.8 7Z" />
+ <path d="M6.7 12.8a1.4 1.4 0 0 0 2.6 0" />
+ </>
+ ),
+ commit: (
+ <>
+ <circle cx="8" cy="8" r="2.4" />
+ <path d="M2.6 8h3M10.4 8h3" />
+ </>
+ ),
+ tmux: (
+ <>
+ <rect x="2.5" y="3" width="11" height="10" rx="2" />
+ <path d="M8 3v10" />
+ </>
+ ),
+ license: (
+ <>
+ <circle cx="5.6" cy="5.6" r="2.6" />
+ <path d="M7.4 7.4 13 13M10.8 10.8l1.4-1.4M9.4 9.4l1.2-1.2" />
+ </>
+ ),
+ remote: (
+ <>
+ <circle cx="8" cy="8" r="5.5" />
+ <path d="M2.5 8h11M8 2.5c1.9 1.7 1.9 9.3 0 11M8 2.5c-1.9 1.7-1.9 9.3 0 11" />
+ </>
+ ),
+ updates: <path d="M8 2.6v7M5 6.6 8 9.6l3-3M3.6 12.6h8.8" />,
+ privacy: <path d="M8 2.4 12.4 4.2V8c0 3-2 4.8-4.4 5.6C5.6 12.8 3.6 11 3.6 8V4.2Z" />
+}
+
+export function SectionIcon({ id }: { id: SettingsSectionId }): React.JSX.Element {
+ return (
+ <svg
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.4"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ aria-hidden="true"
+ >
+ {PATHS[id]}
+ </svg>
+ )
+}
diff --git a/src/renderer/components/settings/SettingsPage.tsx b/src/renderer/components/settings/SettingsPage.tsx
index e1029b4d4..6fd1aa3c9 100644
--- a/src/renderer/components/settings/SettingsPage.tsx
+++ b/src/renderer/components/settings/SettingsPage.tsx
@@ -36,7 +36,7 @@ export function SettingsPage({ onClose }: { onClose: () => void }): React.JSX.El
}, [onClose])
return createPortal(
- <div className="fixed inset-0 z-[55] flex bg-bg text-text">
+ <div className="nt-settings fixed inset-0 z-[55] flex bg-bg text-text">
<SettingsSidebar
activeSectionId={active}
query={query}
diff --git a/src/renderer/components/settings/SettingsSection.tsx b/src/renderer/components/settings/SettingsSection.tsx
index d70f22fab..e54c00049 100644
--- a/src/renderer/components/settings/SettingsSection.tsx
+++ b/src/renderer/components/settings/SettingsSection.tsx
@@ -30,12 +30,16 @@ export function SettingsSection({
return null
}
return (
- <section id={id} data-settings-section={id} className="space-y-4">
- <div className="border-b border-border pb-4">
- <h2 className="text-lg font-semibold text-text">{title}</h2>
- {description ? <p className="mt-1 text-sm text-muted">{description}</p> : null}
+ <section id={id} data-settings-section={id} className="space-y-5">
+ <div>
+ <h2 className="text-[22px] font-semibold tracking-tight text-text">{title}</h2>
+ {description ? (
+ <p className="mt-1.5 max-w-2xl text-[13px] leading-relaxed text-muted">{description}</p>
+ ) : null}
+ </div>
+ <div className="rounded-xl border border-border bg-white/[0.02] px-5 py-2 shadow-sm">
+ {children}
</div>
- <div className="rounded-lg border border-border bg-panel px-5 py-3">{children}</div>
</section>
)
}
diff --git a/src/renderer/components/settings/SettingsSidebar.tsx b/src/renderer/components/settings/SettingsSidebar.tsx
index 8bfba0b45..a29900b32 100644
--- a/src/renderer/components/settings/SettingsSidebar.tsx
+++ b/src/renderer/components/settings/SettingsSidebar.tsx
@@ -2,6 +2,7 @@ import { cn } from '@renderer/ui/cn'
import { Input } from '@renderer/ui/Input'
import { SETTINGS_GROUPS, type SettingsSectionId } from './nav'
import { matchesQuery } from './search'
+import { SectionIcon } from './SettingsIcons'
export function SettingsSidebar({
activeSectionId,
@@ -18,31 +19,51 @@ export function SettingsSidebar({
}): React.JSX.Element {
const hasQuery = query.trim() !== ''
return (
- <aside className="flex w-[240px] shrink-0 flex-col border-r border-border bg-panel">
- <div className="flex items-center justify-between border-b border-border px-4 py-3">
- <h1 className="text-[15px] font-semibold text-text">Settings</h1>
+ <aside className="flex w-[256px] shrink-0 flex-col border-r border-border bg-panel">
+ <div className="flex items-center justify-between px-4 pb-2 pt-4">
+ <h1 className="text-sm font-semibold tracking-tight text-text">Settings</h1>
<button
type="button"
onClick={onClose}
aria-label="Close settings"
- className="text-lg leading-none text-muted hover:text-text"
+ className="flex size-6 items-center justify-center rounded-md text-muted transition-colors hover:bg-white/5 hover:text-text"
>
- ×
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round">
+ <path d="M3.5 3.5l7 7M10.5 3.5l-7 7" />
+ </svg>
</button>
</div>
- <div className="border-b border-border p-3">
- <Input
- className="w-full"
- value={query}
- onChange={(e) => onQueryChange(e.target.value)}
- placeholder="Search settings"
- aria-label="Search settings"
- />
+
+ <div className="px-3 pb-3">
+ <div className="relative">
+ <svg
+ aria-hidden="true"
+ className="pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-2"
+ width="14"
+ height="14"
+ viewBox="0 0 14 14"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.5"
+ strokeLinecap="round"
+ >
+ <circle cx="6" cy="6" r="4" />
+ <path d="M9.2 9.2 12 12" />
+ </svg>
+ <Input
+ className="h-8 w-full pl-8"
+ value={query}
+ onChange={(e) => onQueryChange(e.target.value)}
+ placeholder="Search settings"
+ aria-label="Search settings"
+ />
+ </div>
</div>
- <nav className="min-h-0 flex-1 overflow-y-auto p-3">
+
+ <nav className="min-h-0 flex-1 space-y-5 overflow-y-auto px-3 pb-4">
{SETTINGS_GROUPS.map((group) => (
- <div key={group.id} className="mb-4">
- <p className="px-2 pb-1 text-[11px] font-medium uppercase tracking-wider text-muted-2">
+ <div key={group.id} className="space-y-0.5">
+ <p className="px-2.5 pb-1 text-[10px] font-semibold uppercase tracking-[0.12em] text-muted-2">
{group.title}
</p>
{group.sections.map((s) => {
@@ -55,14 +76,22 @@ export function SettingsSidebar({
onClick={() => onSelect(s.id)}
aria-current={isActive ? 'page' : undefined}
className={cn(
- 'flex w-full items-center rounded-md px-2 py-1.5 text-left text-[13px] transition-colors',
+ 'group flex w-full items-center gap-2.5 rounded-lg px-2.5 py-[7px] text-left text-[13px] transition-colors',
isActive
- ? 'bg-accent text-white'
- : 'text-text hover:bg-[rgba(255,255,255,0.06)]',
- dimmed && 'opacity-40'
+ ? 'bg-accent/15 font-medium text-text ring-1 ring-inset ring-accent/30'
+ : 'text-muted hover:bg-white/[0.04] hover:text-text',
+ dimmed && 'opacity-35'
)}
>
- {s.title}
+ <span
+ className={cn(
+ 'flex size-4 shrink-0 items-center justify-center transition-colors',
+ isActive ? 'text-accent' : 'text-muted-2 group-hover:text-muted'
+ )}
+ >
+ <SectionIcon id={s.id} />
+ </span>
+ <span className="truncate">{s.title}</span>
</button>
)
})}
diff --git a/src/renderer/tailwind.css b/src/renderer/tailwind.css
index d3910ba90..d16134667 100644
--- a/src/renderer/tailwind.css
+++ b/src/renderer/tailwind.css
@@ -20,3 +20,22 @@
--radius-md: var(--radius);
--radius-lg: var(--radius-lg);
}
+
+/* Settings surface: Tailwind preflight is intentionally not loaded, so native
+ form-control chrome (the grey button background, the select arrow) would leak
+ through. Neutralize ONLY `appearance` here — no background/border/color/font —
+ so Tailwind utilities still fully control the look without a cascade-layer
+ conflict. Scoped to the settings page via the `.nt-settings` root class. */
+.nt-settings button,
+.nt-settings input,
+.nt-settings select,
+.nt-settings textarea {
+ -webkit-appearance: none;
+ appearance: none;
+}
+.nt-settings select::-ms-expand {
+ display: none;
+}
+.nt-settings textarea {
+ resize: vertical;
+}
diff --git a/src/renderer/ui/Select.tsx b/src/renderer/ui/Select.tsx
index f264c9794..1439e52ce 100644
--- a/src/renderer/ui/Select.tsx
+++ b/src/renderer/ui/Select.tsx
@@ -7,14 +7,30 @@ export function Select({
...rest
}: SelectHTMLAttributes<HTMLSelectElement>): React.JSX.Element {
return (
- <select
- className={cn(
- 'h-8 rounded-md border border-border bg-bg px-2 text-[13px] text-text outline-none focus:border-accent',
- className
- )}
- {...rest}
- >
- {children}
- </select>
+ <span className="relative inline-flex items-center">
+ <select
+ className={cn(
+ 'h-8 rounded-md border border-border bg-bg pl-2.5 pr-7 text-[13px] text-text outline-none focus:border-accent',
+ className
+ )}
+ {...rest}
+ >
+ {children}
+ </select>
+ <svg
+ aria-hidden="true"
+ className="pointer-events-none absolute right-2 text-muted-2"
+ width="12"
+ height="12"
+ viewBox="0 0 12 12"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.5"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ >
+ <path d="M3 4.5 6 7.5l3-3" />
+ </svg>
+ </span>
)
}