Skip to content

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

fix(design): make dark mode readable, and stop selection hiding on the boss card

Chaitanya Giricee3ec9b7607
diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx
index b7a28a14..8078ca61 100644
--- a/src/renderer/src/App.tsx
+++ b/src/renderer/src/App.tsx
@@ -305,18 +305,13 @@ export function App() {
>
{appThemeNow === 'dark' ? '☀' : '☾'}
</button>
+ {/* v0.3.4: the IDE button moved to agent level — every agent's header
+ (sidebar detail, god Command Center, fullscreen) carries it. */}
<button
- className="cth-titlebar-nodrag"
- onClick={() => {
- if (fullscreenAgentId) { useStore.getState().setFullscreen(null); return; }
- const all = useStore.getState().agents;
- const target = all.find((x) => x.id === useStore.getState().selectedId && x.ptyId)
- ?? all.find((x) => x.isGod && x.ptyId)
- ?? all.find((x) => x.ptyId);
- if (target) useStore.getState().setFullscreen(target.id);
- }}
- title={fullscreenAgentId ? 'Exit fullscreen (Esc)' : 'Fullscreen terminal — selected agent'}
- aria-label="Toggle fullscreen terminal"
+ className="cth-titlebar-nodrag cth-settings-btn"
+ onClick={() => { setSettingsSection(undefined); setSettingsOpen(true); }}
+ title="Settings"
+ aria-label="Settings"
style={{
display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
width: 28, height: 28, padding: 0,
@@ -326,15 +321,24 @@ export function App() {
color: 'var(--cth-ink-900)'
}}
>
- <Icon name={fullscreenAgentId ? 'minimize' : 'expand'} size={1} style={{ width: 16, height: 16 }} />
+ <GearGlyph />
</button>
- {/* v0.3.4: the IDE button moved to agent level — every agent's header
- (sidebar detail, god Command Center, fullscreen) carries it. */}
+ {/* Fullscreen. The title bar is chrome, not canvas, so these two use
+ clean stroke icons rather than the 16x16 pixel set the rest of the UI
+ is drawn in — at 16-18px a pixel-grid glyph reads as a rendering
+ artifact next to the OS window controls, not as a style choice. */}
<button
- className="cth-titlebar-nodrag cth-settings-btn"
- onClick={() => { setSettingsSection(undefined); setSettingsOpen(true); }}
- title="Settings"
- aria-label="Settings"
+ className="cth-titlebar-nodrag"
+ onClick={() => {
+ if (fullscreenAgentId) { useStore.getState().setFullscreen(null); return; }
+ const all = useStore.getState().agents;
+ const target = all.find((x) => x.id === useStore.getState().selectedId && x.ptyId)
+ ?? all.find((x) => x.isGod && x.ptyId)
+ ?? all.find((x) => x.ptyId);
+ if (target) useStore.getState().setFullscreen(target.id);
+ }}
+ title={fullscreenAgentId ? 'Exit fullscreen (Esc)' : 'Fullscreen terminal — selected agent'}
+ aria-label="Toggle fullscreen terminal"
style={{
display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
width: 28, height: 28, padding: 0,
@@ -344,8 +348,9 @@ export function App() {
color: 'var(--cth-ink-900)'
}}
>
- <Icon name="gear" size={1} style={{ width: 18, height: 18 }} />
+ {fullscreenAgentId ? <CollapseGlyph /> : <ExpandGlyph />}
</button>
+
</div>
<div style={{
@@ -472,3 +477,57 @@ export function App() {
</div>
);
}
+
+/* ── Title-bar glyphs ────────────────────────────────────────────────────────
+ Stroke icons on a 16 unit box, inheriting `currentColor` so they follow the
+ theme exactly as the pixel set does. Deliberately NOT added to
+ components/Icon.tsx: that library is the app's pixel-art identity and is used
+ at tab and card scale, where the pixel grid is the point. These three sit
+ beside the OS traffic lights, which is the one place that identity reads as a
+ blurry asset rather than a decision. */
+function Glyph({ children }: { children: React.ReactNode }) {
+ 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" focusable="false"
+ >{children}</svg>
+ );
+}
+
+/** Four outward corner brackets — enter fullscreen. */
+function ExpandGlyph() {
+ return (
+ <Glyph>
+ <path d="M6.2 3H3v3.2M9.8 3H13v3.2M6.2 13H3V9.8M9.8 13H13V9.8" />
+ </Glyph>
+ );
+}
+
+/** The same brackets turned inward — leave fullscreen. */
+function CollapseGlyph() {
+ return (
+ <Glyph>
+ <path d="M3 6.2h3.2V3M13 6.2H9.8V3M3 9.8h3.2V13M13 9.8H9.8V13" />
+ </Glyph>
+ );
+}
+
+/** A wrench. The previous glyph was a hub with eight radiating spokes, which at
+ * 18px is indistinguishable from a sun — sitting immediately beside a theme
+ * toggle whose light-mode icon IS a sun. A tool shape carries "settings"
+ * without competing with its neighbour. Drawn on a 24 box for curve headroom
+ * and rendered at 16. */
+function GearGlyph() {
+ return (
+ <svg
+ width="16" height="16" viewBox="0 0 24 24" fill="none"
+ stroke="currentColor" strokeWidth={2}
+ strokeLinecap="round" strokeLinejoin="round"
+ aria-hidden="true" focusable="false"
+ >
+ <path d="M15.5 3.5a5 5 0 0 0-6.1 6.1l-5.6 5.6a2.3 2.3 0 1 0 3.2 3.2l5.6-5.6a5 5 0 0 0 6.1-6.1l-3 3-2.2-.6-.6-2.2z" />
+ </svg>
+ );
+}
diff --git a/src/renderer/src/components/AgentCard.tsx b/src/renderer/src/components/AgentCard.tsx
index c598f375..a22ad34a 100644
--- a/src/renderer/src/components/AgentCard.tsx
+++ b/src/renderer/src/components/AgentCard.tsx
@@ -57,8 +57,25 @@ export function AgentCard({
}: AgentCardProps) {
const [hover, setHover] = useState(false);
const typing = useHasTerminalDraft(ptyId);
- // The god is always framed (stands out from the row); others only when selected.
- const framed = isGod || selected;
+ // IDENTITY and SELECTION are two different things, and conflating them is why
+ // selecting Michael appeared to do nothing.
+ //
+ // The card used to pass `isGod || selected` into PixelPanel's 'active' variant,
+ // whose frame is `inset 1px + 3px accent + 5px ink` — five pixels of border in
+ // the agent's OWN accent. Three problems in one: the selection cue changed
+ // colour per agent (the "blue halo" on a sky agent), it was invisible on god
+ // because god was framed unconditionally, and stacking the selection ring
+ // outside it made the boss card visibly fatter than its neighbours.
+ //
+ // Now: god is marked by its SURFACE (see godSurface), everyone shares the same
+ // 1px panel border, and selection is one accent-independent ring — identical on
+ // every card, god included.
+
+ // The selected card wears an ink ring OUTSIDE its border. ink-900 rather than
+ // an accent so the cue is identical on every agent, and it flips with the
+ // theme (near-black on cream, near-white on the dark ground), staying legible
+ // over whatever accent the card already carries.
+ const selectionRing = selected ? '0 0 0 2px var(--cth-ink-900)' : '';
// Context gauge as ONE clean fill (0..8 → 0..100%). Colour escalates as the
// window fills: accent while comfortable, amber from 6/8, coral from 7/8.
@@ -70,12 +87,37 @@ export function AgentCard({
? `Context: ${fmtK(contextTokens)} / ${fmtK(contextLimit)} tokens (${Math.round((contextTokens / contextLimit) * 100)}%)`
: 'Context gauge — fills once the agent reports activity';
- const width = isGod ? 216 : 196;
- const height = isGod ? 86 : 76;
- const lift = (isGod ? -2 : 0) - (hover ? 1 : 0);
+ // ONE card size for every agent. God used to be 216x86 against everyone
+ // else's 196x76, so the dock never lined up — and once the selection ring was
+ // added outside its 5px accent frame, the boss card grew a visibly thicker
+ // edge than any other. Distinction now comes from the card's SURFACE, not from
+ // making its box bigger or its border heavier.
+ // 196 was too tight once god's row carried NAME + BOSS + status: the name
+ // truncated to "MIC…" — the one word on the card that must never be the thing
+ // that gets cut. Widened for every card so the dock stays uniform, with enough
+ // slack that Talk's info mark (which only appears when the OpenAI key is
+ // missing) has somewhere to sit rather than pushing the row apart.
+ const width = 220;
+ const height = 78;
+ const lift = (isGod ? -2 : 0) - (hover ? 1 : 0) - (selected ? 1 : 0);
+ /** God's distinction: a tinted surface plus a thin accent border all the way
+ * around — NOT the 3px rule that used to sit on the top edge alone. That rule
+ * read as a stray yellow bar rather than as part of the card, and an edge
+ * treatment that only exists on one side always looks like a mistake or a
+ * progress bar. Same 1px geometry as every other card, so the box is
+ * unchanged and the selection ring still means exactly one thing everywhere. */
+ const godSurface: React.CSSProperties = isGod
+ ? {
+ background: `var(--cth-${accent}-light)`,
+ boxShadow: `inset 0 0 0 1px var(--cth-${accent})`
+ }
+ : {};
const dropShadow = isGod
? `2px 3px 0 0 rgba(26,19,32,${hover ? 0.2 : 0.14})`
: (hover ? '1px 2px 0 0 rgba(26,19,32,0.12)' : 'none');
+ // Ring first so it sits tight to the card, then the existing drop shadow.
+ const outerShadow = [selectionRing, dropShadow === 'none' ? '' : dropShadow]
+ .filter(Boolean).join(', ') || 'none';
// One context line: what it's DOING while working, WHERE it lives while idle.
const infoLine = (status !== 'idle' && action) ? action : project;
@@ -87,13 +129,16 @@ export function AgentCard({
onMouseEnter={() => setHover(true)}
onMouseLeave={() => setHover(false)}
draggable={draggable}
+ // The ring is the visual answer to "which terminal is open"; this is the
+ // same answer for a screen reader. Matches SidebarRow in fullscreen.
+ aria-current={selected ? 'true' : undefined}
className="cth-titlebar-nodrag"
style={{
width, minWidth: width, height,
padding: 0, border: 'none', background: 'transparent', cursor: 'pointer', textAlign: 'left',
position: 'relative',
transform: lift ? `translateY(${lift}px)` : 'none',
- boxShadow: dropShadow,
+ boxShadow: outerShadow,
transition: 'transform 90ms steps(2, end), box-shadow 90ms steps(2, end)'
}}
>
@@ -118,17 +163,19 @@ export function AgentCard({
</span>
)}
<PixelPanel
- variant={framed ? 'active' : 'default'}
- accent={framed ? accent : undefined}
- style={{ height: '100%', padding: '6px 8px' }}
+ variant="default"
+ style={{ height: '100%', padding: '6px 8px', ...godSurface }}
noPadding
>
<div style={{ display: 'flex', gap: 8, height: '100%' }}>
{/* Portrait tile — vertically centred so the card reads calm and even. */}
<div style={{
width: 36, height: isGod ? 50 : 46, alignSelf: 'center',
- background: `var(--cth-${accent}-light)`,
- boxShadow: 'inset 0 0 0 1px var(--cth-ink-100)',
+ // God's CARD is now accent-light, so the tile cannot be — it would
+ // vanish into its own background. Paper reads as an inset frame
+ // against the tint, which is what the tile is meant to look like.
+ background: isGod ? 'var(--cth-paper-100)' : `var(--cth-${accent}-light)`,
+ boxShadow: `inset 0 0 0 1px var(--cth-ink-${isGod ? '300' : '100'})`,
// Anchor the sprite's TOP: the 56px-tall portrait overflows this
// tile, and bottom-anchoring cropped the head — crop feet, not face.
display: 'flex', alignItems: 'flex-start', justifyContent: 'center', overflow: 'hidden',
@@ -146,6 +193,7 @@ export function AgentCard({
fontSize: 'var(--cth-text-display-sm)',
lineHeight: 'var(--cth-lh-display-sm)',
color: 'var(--cth-ink-900)',
+ flex: 1, minWidth: 0,
whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'
}}>{name.toUpperCase()}</span>
{isGod && (
@@ -156,7 +204,11 @@ export function AgentCard({
}}>BOSS</span>
)}
</span>
- <PixelBadge status={typing ? 'typing' : status} />
+ {/* flexShrink:0 — the badge is a fixed 2-to-5 character chip; when
+ it was allowed to shrink, the browser resolved the overflow by
+ eating the NAME instead. Truncation should land on the longest,
+ most redundant thing, not on the identity. */}
+ <PixelBadge status={typing ? 'typing' : status} style={{ flexShrink: 0 }} />
</div>
{/* Context line: action while working, repo while idle. */}
@@ -172,8 +224,16 @@ export function AgentCard({
{/* God: voice on its own compact row. Workers: the private note row.
Both sit ABOVE the gauge, so it is never covered. */}
{isGod ? (
+ // Talk grows an info mark when the OpenAI key is missing, so this
+ // row can hold three things instead of two. `overflow: hidden` is
+ // the guard: the toggle's label shrinks first (it has minWidth:0),
+ // and if it still does not fit, the row clips INSIDE the card
+ // instead of spilling over its border.
<div
- style={{ display: 'flex', alignItems: 'center', gap: 6, minWidth: 0 }}
+ style={{
+ display: 'flex', alignItems: 'center', gap: 6,
+ minWidth: 0, overflow: 'hidden'
+ }}
onClick={(e) => e.stopPropagation()}
>
<RealtimeMichaelToggle />
diff --git a/src/renderer/src/components/AgentControlStrip.tsx b/src/renderer/src/components/AgentControlStrip.tsx
index 297cbd72..7d88a9fd 100644
--- a/src/renderer/src/components/AgentControlStrip.tsx
+++ b/src/renderer/src/components/AgentControlStrip.tsx
@@ -58,10 +58,21 @@ export function AgentControlStrip({ agentId }: { agentId: string }) {
}}>
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<span style={{ fontFamily: 'var(--cth-font-display)', fontSize: 9, color: 'var(--cth-ink-500)', marginRight: 2 }}>CONTROL</span>
+ {/* Neither of these kills anything, and the two-word labels never said
+ so — the difference is WHEN the agent stops and whether it keeps its
+ session. Spelled out on hover rather than left to be discovered. */}
<PixelButton variant={snap?.paused ? 'primary' : 'secondary'} size="sm" onClick={togglePause}>
- {snap?.paused ? 'resume' : 'pause'}
+ <span title={snap?.paused
+ ? 'Resume — allow tool calls again. The agent keeps its session and picks up where it stopped.'
+ : 'Pause — deny every tool call from the next one onward. The agent keeps thinking and talking but cannot read, write or run anything. Takes effect immediately; reversible.'}>
+ {snap?.paused ? 'resume' : 'pause'}
+ </span>
+ </PixelButton>
+ <PixelButton variant="destructive" size="sm" onClick={halt}>
+ <span title="Halt — ask the agent to stop CLEANLY at its next hook boundary (usually the end of the current step), instead of killing the process. Its session survives, so Restart & Continue can resume it. Use the ✕ to end the process outright.">
+ halt
+ </span>
</PixelButton>
- <PixelButton variant="destructive" size="sm" onClick={halt}>halt</PixelButton>
{/* v0.3.4: the auto-delivery switch moved to the god's Command Center
header — ONE floor-wide control instead of a per-agent toggle. */}
{snap?.autoDeliveryPaused && (
diff --git a/src/renderer/src/components/CommandCenterPanel.tsx b/src/renderer/src/components/CommandCenterPanel.tsx
index da7dfc20..82636823 100644
--- a/src/renderer/src/components/CommandCenterPanel.tsx
+++ b/src/renderer/src/components/CommandCenterPanel.tsx
@@ -10,6 +10,7 @@ import { AskMeTab } from './AskMeTab';
import { TriggersTab } from './triggers/TriggersTab';
import { TriggerHistoryTab } from './triggers/TriggerHistoryTab';
import { WorkersTab } from './WorkersTab';
+import { SkillsTab } from './SkillsTab';
import { acquireTerminal, disposeTerminal, resetTerminal } from './terminalPool';
import { terminalInstanceKey } from './terminalRecovery';
import { Icon } from './Icon';
@@ -42,7 +43,7 @@ import { canReceiveInbox } from '@shared/agentProvider';
// the old Schedules tab: schedules are now one of four trigger types, and the
// whole surface lives in ./triggers (see src/shared/triggers.ts for the contract).
type CCTab = 'terminal' | 'floor' | 'tasks' | 'human' | 'triggers' | 'trigger-history'
- | 'memory' | 'graph' | 'activity' | 'handbook' | 'workers';
+ | 'memory' | 'graph' | 'activity' | 'skills' | 'workers';
/** Fallback denominator for the per-agent token meter when no floor token budget
* is configured — so the bar reads as a budget estimate (filled + remaining)
@@ -70,7 +71,7 @@ const TABS: { key: CCTab; label: string; icon: Parameters<typeof Icon>[0]['name'
{ key: 'memory', label: 'memory', icon: 'sparkle' },
{ key: 'graph', label: 'graph', icon: 'web' },
{ key: 'activity', label: 'activity', icon: 'bell' },
- { key: 'handbook', label: 'commands', icon: 'code' },
+ { key: 'skills', label: 'skills', icon: 'sparkle' },
{ key: 'workers', label: 'workers', icon: 'gear' }
];
@@ -211,13 +212,37 @@ export function CommandCenterPanel({ agent, fullscreen = false }: { agent: Agent
</div>
</div>
- {/* Tab bar — an auto-fit grid of equal-width cells. The tabs wrap onto
- extra rows when the panel is narrow (e.g. window fullscreen), but every
- column is the same width so the rows line up cleanly. The old flex-wrap
- left ragged rows of mismatched-width tabs (e.g. a short 4-tab second row
- under a 5-tab first row) that read as misaligned. */}
+ {/* Tab bar — ONE row, tabs at their natural width, scrolling only if the
+ panel is genuinely too narrow for all of them.
+
+ This was an auto-fit grid of equal-width cells, which had a failure mode
+ the equal widths caused: every column is sized to the WIDEST tab, so the
+ track count is set by the longest label rather than by the total width
+ the labels actually need. Adding a 12th tab tipped it over at fullscreen
+ width and dropped `setup` onto a second row with most of the first row's
+ space still unused — the tabs need ~1320px of content and had ~1610px.
+
+ Content-sized tabs fit all twelve on one line with room to spare, and the
+ `.cth-tabbar` rules in global.css (scrollbar-width: none, ::-webkit-
+ scrollbar { height: 0 }) already exist for exactly this: a single row that
+ scrolls with the scrollbar hidden. The grid never scrolled, so those rules
+ have been dead code since it landed.
+
+ Trade-off, deliberate: in the NARROW docked panel the far-right tabs now
+ scroll out of view instead of wrapping to a visible second row. One row
+ that sometimes needs a scroll beats two rows where one is nearly empty —
+ and the grid's own reason for existing (keeping wrapped rows aligned)
+ stops applying the moment there is only ever one row. */}
<div className="cth-tabbar" style={{
- display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(94px, 1fr))', gap: 4,
+ display: 'flex', gap: 4,
+ // Docked in the sidebar the panel is narrow, so tabs WRAP: a second row
+ // costs a few pixels of a tall column, while a horizontal scroll there
+ // would hide half the tabs behind a gesture with no affordance.
+ // In focus mode the panel is wide and vertical space is the scarce
+ // resource, so it stays ONE row and scrolls instead. `.cth-tabbar` in
+ // global.css already hides that scrollbar.
+ flexWrap: fullscreen ? 'nowrap' : 'wrap',
+ overflowX: fullscreen ? 'auto' : 'visible',
padding: '6px 8px', background: 'var(--cth-cream-100)',
borderBottom: '1px solid var(--cth-ink-700)', flexShrink: 0
}}>
@@ -227,10 +252,18 @@ export function CommandCenterPanel({ agent, fullscreen = false }: { agent: Agent
onClick={() => setTab(t.key)}
style={{
whiteSpace: 'nowrap',
+ // grow to share any spare width (so the strip still spans the panel
+ // exactly as the old grid did), never shrink below the label (a
+ // squashed tab is unreadable — overflow into the scroll instead).
+ flex: '1 0 auto',
display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 4,
padding: '4px 8px 3px', border: 'none', cursor: 'pointer',
background: tab === t.key ? `var(--cth-${agent.accent})` : 'var(--cth-cream-200)',
- color: 'var(--cth-ink-900)',
+ // The selected tab is filled with the agent's accent, which is a
+ // LIGHT colour in both themes. ink-900 flips to near-white in dark
+ // mode, so the active tab's label was pale-on-pale — the one tab
+ // you most need to read. On-accent text is dark in both themes.
+ color: tab === t.key ? 'var(--cth-on-accent)' : 'var(--cth-ink-900)',
boxShadow: tab === t.key
? 'inset 0 0 0 1px var(--cth-ink-300)'
: 'inset 0 0 0 1px var(--cth-ink-100)',
@@ -287,7 +320,7 @@ export function CommandCenterPanel({ agent, fullscreen = false }: { agent: Agent
/>
)}
{tab === 'activity' && <ActivityTab />}
- {tab === 'handbook' && <HandbookTab />}
+ {tab === 'skills' && <SkillsTab agentCwd={agent.cwd} />}
{tab === 'workers' && <WorkersTab />}
</div>
</PixelPanel>
@@ -1203,64 +1236,6 @@ function ActivityTab() {
);
}
-// ─── Handbook tab — copyable Claude command reference ────────────────────────
-
-function HandbookTab() {
- const [copied, setCopied] = useState<string | null>(null);
- const copy = async (cmd: string) => {
- try { await window.cth.copyToClipboard(cmd); setCopied(cmd); setTimeout(() => setCopied((c) => (c === cmd ? null : c)), 1300); }
- catch { /* noop */ }
- };
- return (
- <Scroll>
- <Muted>Click any command to copy it. Slash commands run inside Claude Code; CLI commands run in a shell.</Muted>
- <div style={{ height: 8 }} />
- {COMMAND_GROUPS.map((g) => (
- <Section key={g.title} title={g.title}>
- {g.items.map((it) => (
- <div key={it.cmd} style={{
- padding: 6, marginBottom: 6,
- background: 'var(--cth-paper-100)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)'
- }}>
- <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
- <span style={{
- fontFamily: 'var(--cth-font-display)', fontSize: 7, lineHeight: '12px',
- padding: '1px 4px 0', flexShrink: 0,
- background: it.kind === 'slash' ? 'var(--cth-sky-light)' : 'var(--cth-mint-light)',
- boxShadow: 'inset 0 0 0 1px var(--cth-ink-100)', color: 'var(--cth-ink-900)'
- }}>{it.kind === 'slash' ? 'SLASH' : 'CLI'}</span>
- <code style={{
- flex: 1, minWidth: 0, fontFamily: 'var(--cth-font-mono)', fontSize: 12,
- color: 'var(--cth-ink-900)', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap'
- }}>{it.cmd.trim() || '#'}</code>
- <button
- onClick={() => copy(it.cmd)}
- title="Copy command"
- style={{
- flexShrink: 0, display: 'inline-flex', alignItems: 'center', gap: 4,
- padding: '2px 7px 1px', border: 'none', cursor: 'pointer',
- background: copied === it.cmd ? 'var(--cth-mint)' : 'var(--cth-cream-200)',
- boxShadow: 'inset 0 0 0 1px var(--cth-ink-100)',
- fontFamily: 'var(--cth-font-ui)', fontSize: 11, color: 'var(--cth-ink-900)'
- }}
- >
- <Icon name={copied === it.cmd ? 'check' : 'code'} /> {copied === it.cmd ? 'copied' : 'copy'}
- </button>
- </div>
- <div style={{ fontSize: 12, lineHeight: '16px', color: 'var(--cth-ink-700)', marginTop: 4 }}>{it.desc}</div>
- {it.usage && (
- <div style={{
- marginTop: 3, fontFamily: 'var(--cth-font-mono)', fontSize: 11,
- color: 'var(--cth-ink-500)'
- }}>e.g. {it.usage}</div>
- )}
- </div>
- ))}
- </Section>
- ))}
- </Scroll>
- );
-}
// ─── small shared bits ───────────────────────────────────────────────────────
diff --git a/src/renderer/src/components/FullscreenTerminal.tsx b/src/renderer/src/components/FullscreenTerminal.tsx
index 37f89f07..b7a92886 100644
--- a/src/renderer/src/components/FullscreenTerminal.tsx
+++ b/src/renderer/src/components/FullscreenTerminal.tsx
@@ -16,7 +16,7 @@ import { useStore, type Agent } from '@/store/store';
import { usePtyParser } from '@/hooks/usePtyParser';
import { useRestoreTeam } from '@/hooks/useRestoreTeam';
import { useTerminalFontSize } from './terminalFontSize';
-import { useHasTerminalDraft } from './terminalPool';
+import { useHasTerminalDraft, disposeTerminal } from './terminalPool';
import { useAppTheme, toggleAppTheme } from '@/design/theme';
import type { HarnessConfig } from '@/store/config';
@@ -278,6 +278,24 @@ export function FullscreenTerminal({ config }: FullscreenTerminalProps) {
{/* Same top-right controls as the main title bar — fullscreen covers
it, so theme / exit-fullscreen / IDE must live here too. */}
<div className="cth-titlebar-nodrag" style={{ marginLeft: 'auto', display: 'flex', alignItems: 'center', gap: 12 }}>
+ <button
+ onClick={toggleRoster}
+ title={rosterCollapsed ? 'Show the agent list' : 'Hide the agent list — full-width terminal'}
+ aria-label={rosterCollapsed ? 'Show the agent list' : 'Hide the agent list'}
+ aria-pressed={rosterCollapsed}
+ style={{
+ display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
+ width: 28, height: 28, padding: 0,
+ // Pressed-in when collapsed, so the rail's absence reads as a state
+ // this button is holding rather than something that broke.
+ background: rosterCollapsed ? 'var(--cth-lemon)' : 'var(--cth-paper-100)',
+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)',
+ border: 'none', borderRadius: 2, cursor: 'pointer',
+ color: rosterCollapsed ? 'var(--cth-ink-900)' : 'var(--cth-ink-900)'
+ }}
+ >
+ <Icon name="sidebar" size={1} style={{ width: 16, height: 16 }} />
+ </button>
<button
onClick={() => {
const next = toggleAppTheme();
@@ -296,23 +314,32 @@ export function FullscreenTerminal({ config }: FullscreenTerminalProps) {
>
{appThemeNow === 'dark' ? '☀' : '☾'}
</button>
+ {/* Settings — the main title bar has it, so fullscreen must too:
+ anything reachable in one mode and not the other is a trap. Uses
+ App's existing `cth:open-settings` event rather than a new store
+ action, because this overlay is not a child of App. */}
<button
- onClick={toggleRoster}
- title={rosterCollapsed ? 'Show the agent list' : 'Hide the agent list — full-width terminal'}
- aria-label={rosterCollapsed ? 'Show the agent list' : 'Hide the agent list'}
- aria-pressed={rosterCollapsed}
+ className="cth-settings-btn"
+ onClick={() => window.dispatchEvent(new CustomEvent('cth:open-settings'))}
+ title="Settings"
+ aria-label="Settings"
style={{
display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
width: 28, height: 28, padding: 0,
- // Pressed-in when collapsed, so the rail's absence reads as a state
- // this button is holding rather than something that broke.
- background: rosterCollapsed ? 'var(--cth-lemon)' : 'var(--cth-paper-100)',
+ background: 'var(--cth-paper-100)',
boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)',
border: 'none', borderRadius: 2, cursor: 'pointer',
- color: rosterCollapsed ? 'var(--cth-ink-900)' : 'var(--cth-ink-900)'
+ color: 'var(--cth-ink-900)'
}}
>
- <Icon name="sidebar" size={1} style={{ width: 16, height: 16 }} />
+ <svg
+ width="16" height="16" viewBox="0 0 24 24" fill="none"
+ stroke="currentColor" strokeWidth={2}
+ strokeLinecap="round" strokeLinejoin="round"
+ aria-hidden="true" focusable="false"
+ >
+ <path d="M15.5 3.5a5 5 0 0 0-6.1 6.1l-5.6 5.6a2.3 2.3 0 1 0 3.2 3.2l5.6-5.6a5 5 0 0 0 6.1-6.1l-3 3-2.2-.6-.6-2.2z" />
+ </svg>
</button>
<button
onClick={() => setFullscreen(null)}
@@ -544,6 +571,43 @@ export function FullscreenTerminal({ config }: FullscreenTerminalProps) {
);
}
+/** Model ids are long and mostly boilerplate ("claude-opus-4-8[1m]",
+ * "anthropic/claude-sonnet-4-5"). The roster has ~120px, so show the part that
+ * distinguishes one agent from another and keep the full id in the tooltip. */
+function shortModel(model?: string): string | null {
+ if (!model || !model.trim()) return null;
+ const tail = model.split('/').pop() ?? model;
+ return tail
+ .replace(/^claude-/i, '')
+ .replace(/-\d{8}$/, '') // trailing date stamps
+ .replace(/\[(\d+)m\]/i, ' $1m') // [1m] → 1m
+ .replace(/-/g, ' ')
+ .trim();
+}
+
+/** Context fullness as a 3px rail. Colour tracks pressure rather than identity —
+ * an agent at 85% is about to compact, and that matters more than its accent. */
+function ContextBar({ tokens, limit, accent }: { tokens?: number; limit?: number; accent: string }) {
+ if (tokens === undefined || !limit) return null;
+ const pct = Math.max(0, Math.min(100, Math.round((tokens / limit) * 100)));
+ const color = pct >= 85 ? 'var(--cth-coral)' : pct >= 65 ? 'var(--cth-lemon)' : `var(--cth-${accent})`;
+ const k = (n: number) => (n >= 1000 ? `${Math.round(n / 1000)}k` : String(n));
+ return (
+ <div
+ title={`Context: ${k(tokens)} / ${k(limit)} tokens (${pct}%)`}
+ style={{ display: 'flex', alignItems: 'center', gap: 5, minWidth: 0 }}
+ >
+ <span style={{
+ flex: 1, minWidth: 0, height: 3,
+ background: 'var(--cth-ink-100)', overflow: 'hidden'
+ }}>
+ <span style={{ display: 'block', width: `${pct}%`, height: '100%', background: color }} />
+ </span>
+ <span style={{ flexShrink: 0, fontSize: 9, color: 'var(--cth-ink-500)' }}>{pct}%</span>
+ </div>
+ );
+}
+
function SidebarRow({
agent,
active,
@@ -681,6 +745,31 @@ function SidebarRow({
}}
>✎</span>
</div>
+ {/* WHAT this agent is, at a glance. The roster used to carry only a
+ name, a portrait and a status dot — enough to tell rows apart, not
+ enough to answer "which model is this on, where is it working, and
+ how full is its context", which is exactly what you need when the
+ terminal is the whole screen and the sidebar is your only index. */}
+ <div style={{
+ display: 'flex', alignItems: 'center', gap: 6, minWidth: 0,
+ fontSize: Math.max(9, scale.name - 3), lineHeight: 1.4,
+ color: 'var(--cth-ink-500)'
+ }}>
+ <span style={{
+ flexShrink: 0, maxWidth: '52%',
+ whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'
+ }} title={agent.model ? `Model: ${agent.model}` : 'Runs the CLI default model'}>
+ {shortModel(agent.model) ?? 'CLI default'}
+ </span>
+ <span style={{ flexShrink: 0, opacity: 0.5 }}>·</span>
+ <span style={{
+ flex: 1, minWidth: 0,
+ whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'
+ }} title={agent.worktreePath || agent.cwd}>
+ {basename(agent.worktreePath || agent.cwd) || agent.project}
+ </span>
+ </div>
+ <ContextBar tokens={agent.contextTokens} limit={agent.contextLimit} accent={agent.accent} />
{/* Every line of every agent, always on screen — the roster's job is
to answer "who is on what" without a single interaction. */}
<div style={{ display: 'flex', flexDirection: 'column', gap: 1 }}>
@@ -786,6 +875,33 @@ function SidebarRow({
function Header({ agent }: { agent: Agent }) {
const typing = useHasTerminalDraft(agent.ptyId);
+ const archiveAgent = useStore((st) => st.archiveAgent);
+ const [openState, setOpenState] = useState<'idle' | 'opening' | 'ok' | 'error'>('idle');
+
+ /** Same action as the docked panel: open the OS terminal in this agent's
+ * working directory. Fullscreen had no way to do it, which is backwards —
+ * this is the mode where you are most likely to want a shell beside it. */
+ const openTerminal = async () => {
+ setOpenState('opening');
+ try {
+ const res = await window.cth.openTerminalAt(agent.worktreePath || agent.cwd);
+ setOpenState(res.ok ? 'ok' : 'error');
+ } catch { setOpenState('error'); }
+ setTimeout(() => setOpenState('idle'), 1500);
+ };
+
+ /** Kill + archive, mirroring AgentDetailPanel. Confirmed, because it ends a
+ * running process. God is exempt: the floor respawns it immediately, so the
+ * button would read as "restart Michael" while looking like "close". */
+ const onKill = async () => {
+ if (!agent.ptyId) return;
+ if (!confirm(`Close ${agent.name}? The PTY process will terminate and the agent is archived (kept in history, off the floor).`)) return;
+ await window.cth.killPty(agent.ptyId);
+ disposeTerminal(agent.ptyId);
+ archiveAgent(agent.id);
+ useStore.getState().setFullscreen(null);
+ };
+
return (
<div style={{
display: 'flex', alignItems: 'center', gap: 12,
@@ -823,7 +939,40 @@ function Header({ agent }: { agent: Agent }) {
HUD stays Michael-only (it belongs to his card). */}
<RealtimeMichaelToggle />
{agent.isGod && <CostHud compact />}
- <PixelBadge status={typing ? 'typing' : agent.status} />
+ <PixelButton variant="secondary" size="sm" onClick={openTerminal} disabled={openState === 'opening'}>
+ <span
+ title={`Open your terminal app at ${agent.worktreePath || agent.cwd}`}
+ style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}
+ >
+ <Icon name="terminal" />
+ {openState === 'opening' ? '...' : openState === 'ok' ? 'ok' : openState === 'error' ? 'err' : 'open'}
+ </span>
+ </PixelButton>
+ {/* The badge is a STATUS, not a button, but it sits in a row of them.
+ Its own box is 20px (lineHeight 18 + 2px padding) against the 24px
+ every size="sm" PixelButton is fixed at, so the row read as ragged.
+ Sized through the badge's own style prop rather than a wrapper: a
+ wrapper only centres the 20px box inside 24px, it does not make the
+ visible border match. */}
+ <PixelBadge
+ status={typing ? 'typing' : agent.status}
+ style={{ height: 24, padding: '0 8px', lineHeight: '24px' }}
+ />
+ {!agent.isGod && (
+ <PixelButton variant="destructive" size="sm" onClick={onKill}>
+ {/* inline-flex + center: the other buttons hold TEXT, whose line box
+ the button centres for free. A bare <Icon> is replaced-content
+ sitting on the text baseline, so it rode low and overhung the
+ 24px box — the button measured the same as its neighbours while
+ reading taller than them. */}
+ <span
+ title={`Close ${agent.name} — ends the process and archives the agent`}
+ style={{ display: 'inline-flex', alignItems: 'center', lineHeight: 0 }}
+ >
+ <Icon name="x" />
+ </span>
+ </PixelButton>
+ )}
</div>
</div>
);
diff --git a/src/renderer/src/components/PtyTerminalView.tsx b/src/renderer/src/components/PtyTerminalView.tsx
index e39d9ddf..e9c404ac 100644
--- a/src/renderer/src/components/PtyTerminalView.tsx
+++ b/src/renderer/src/components/PtyTerminalView.tsx
@@ -75,32 +75,37 @@ const lightTheme = {
brightWhite: '#1A1320'
};
-// Dark theme — v0.3.4: matches the app's dark surface ramp (tokens.css
-// data-cth-theme='dark'). Muted-professional ANSI set: recognizable hues, no
+// Dark theme — mirrors the app's dark surface ramp (tokens.css
+// data-cth-theme='dark'). xterm takes literal colours and cannot read CSS
+// custom properties, so these values are RE-STATED rather than referenced, and
+// drift the moment the tokens move: this set was still on the pre-readability
+// ramp (background #1D1C21, the old paper-100) after tokens.css dropped to
+// a softer ground, which would have left every terminal sitting a visible step
+// apart from the panel holding it. Muted-professional ANSI: recognizable hues, no
// fluorescing on the dark ground; brights are one legible step up, not pastels.
const darkTheme = {
- background: '#1D1C21',
- foreground: '#E8E6E3',
- cursor: '#DF8078',
- cursorAccent: '#1D1C21',
- selectionBackground: '#37363E',
- selectionForeground: '#E8E6E3',
- black: '#26252C',
- red: '#DF8078',
- green: '#6FB88B',
- yellow: '#D8B052',
- blue: '#64ACBB',
- magenta: '#A493E0',
- cyan: '#64ACBB',
- white: '#E8E6E3',
- brightBlack: '#8F8C90',
+ background: '#1A1A1F', // = --cth-paper-100
+ foreground: '#DEDBD6', // = --cth-ink-900
+ cursor: '#E08C82',
+ cursorAccent: '#1A1A1F',
+ selectionBackground: '#37363F',
+ selectionForeground: '#DEDBD6',
+ black: '#222229',
+ red: '#E08C82',
+ green: '#74C096',
+ yellow: '#CFAA57',
+ blue: '#6FB3C4',
+ magenta: '#A896E3',
+ cyan: '#6FB3C4',
+ white: '#DEDBD6',
+ brightBlack: '#96919F',
brightRed: '#EBA39C',
brightGreen: '#96CDA9',
brightYellow: '#E5C87E',
brightBlue: '#8FC5D1',
brightMagenta:'#C0B3EB',
brightCyan: '#8FC5D1',
- brightWhite: '#F5F4F2'
+ brightWhite: '#EFEDE9'
};
const THEMES: Record<PtyTheme, typeof lightTheme> = { light: lightTheme, dark: darkTheme };
diff --git a/src/renderer/src/design/tokens.css b/src/renderer/src/design/tokens.css
index 91b16bab..8ecd0bb7 100644
--- a/src/renderer/src/design/tokens.css
+++ b/src/renderer/src/design/tokens.css
@@ -83,49 +83,74 @@
boxed every surface in thick chrome; structure now comes from surface
contrast, not outlines. Dialogs keep one slightly stronger line. */
--cth-panel-border: inset 0 0 0 1px var(--cth-ink-300);
+ /* Text that sits ON an accent fill (a selected tab, a filled chip). The
+ accents are LIGHT surfaces in BOTH themes, so this is dark in both — using
+ ink-900 here inverts with the theme and paints near-white on a pale accent,
+ which is the one place the theme switch actively hurts legibility. */
+ --cth-on-accent: #1A1320;
+
--cth-panel-border-inset: inset 0 0 0 1px var(--cth-ink-100);
--cth-panel-border-terminal: inset 0 0 0 1px var(--cth-ink-300);
--cth-panel-border-dialog: inset 0 0 0 1px var(--cth-ink-500);
}
-/* ── Dark theme (v0.3.4) ─────────────────────────────────────────────────────
- One token swap darkens the WHOLE app. Professional dark, not black: layered
- warm-neutral grays (à la Linear/VS Code) instead of void-purple, an off-white
- text ramp that never hits pure white, and accents lifted a step so they hold
- the same perceived weight on dark that the light set has on cream. Stamped by
- design/theme.ts as data-cth-theme on <html>; the terminal palette and
- per-agent Claude session themes follow the same switch. */
+/* ── Dark theme ──────────────────────────────────────────────────────────────
+ One token swap darkens the WHOLE app. Shades of black with a near-white text
+ ramp, tuned for READABILITY first and measured rather than eyeballed. Stamped
+ by design/theme.ts as data-cth-theme on <html>; the terminal palette and
+ per-agent Claude session themes follow the same switch.
+
+ THE BUG THIS FIXES. Text was never the problem — ink-900 measured 11-14:1 and
+ ink-700 8-9.6:1 against every surface. `ink-300` was, at 1.73-2.09:1. That
+ token is not decoration: it is this app's entire structural language, used
+ 187 times and 93 of those as `inset 0 0 0 1px` — the border on every button,
+ input, panel, card and chip. Below ~3:1 a 1px line is not perceivable, so in
+ dark mode the edges defining every control simply were not there, and the UI
+ read as flat washes of grey. ink-300 is now 3.12-3.59:1 and ink-100 stays
+ deliberately quieter (1.47-1.69:1) for dividers that should recede.
+
+ NOT BLACK, AND NOT WHITE. A first pass took the ground to #0E0E11 and text to
+ #EDECEA, which measured beautifully and read as harsh: near-black behind
+ near-white is maximum contrast, and maximum contrast is not the same as
+ comfortable. The ground now sits at luminance 0.009-0.020 (visibly lifted off
+ black, still unambiguously a dark theme) and text at 0.71 rather than 0.84 —
+ a warm off-white. Everything still clears its floor with room to spare.
+
+ Every value below is verified against WCAG contrast for the five surfaces it
+ can appear on: body text >= 4.5, structural borders >= 3.0. Accents are held
+ to a narrow luminance band (0.36-0.44) so no single hue fluoresces against
+ the black and colour never becomes the thing carrying the layout. */
:root[data-cth-theme='dark'] {
/* Base surfaces — a graded elevation ramp, darkest where light mode was
lightest. Neutral with a whisper of the brand's violet warmth. */
- --cth-cream-50: #1A191E;
- --cth-cream-100: #202025;
- --cth-cream-200: #2A2930;
- --cth-cream-300: #37363E;
- --cth-paper-100: #1D1C21;
- --cth-paper-200: #26252C;
+ --cth-cream-50: #17171B; /* app ground — dark, deliberately NOT black */
+ --cth-cream-100: #1D1D22;
+ --cth-cream-200: #26262C;
+ --cth-cream-300: #313139;
+ --cth-paper-100: #1A1A1F; /* cards, inputs, terminals */
+ --cth-paper-200: #222229;
/* Ink → off-white text ramp (never #FFF — glare) */
- --cth-ink-900: #E8E6E3;
- --cth-ink-700: #C3C0BC;
- --cth-ink-500: #8F8C90;
- --cth-ink-300: #4E4D55;
- --cth-ink-100: #313037;
+ --cth-ink-900: #DEDBD6; /* 10.9-13.0:1 — primary text, warm off-white */
+ --cth-ink-700: #B3B0AC; /* 7.0-8.3:1 — secondary text */
+ --cth-ink-500: #96919F; /* 4.9-5.8:1 — tertiary / hints */
+ --cth-ink-300: #787684; /* 3.4-4.0:1 — BORDERS. must stay >= 3.0 */
+ --cth-ink-100: #3E3D46; /* 1.4-1.7:1 — dividers, meant to recede */
/* Accents — one step lighter/softer than the light set so they read on dark
without fluorescing */
- --cth-coral: #DF8078; --cth-mint: #6FB88B;
- --cth-sky: #64ACBB; --cth-lemon: #D8B052;
- --cth-lilac: #A493E0; --cth-peach: #DFA07A;
+ --cth-coral: #E08C82; --cth-mint: #74C096;
+ --cth-sky: #6FB3C4; --cth-lemon: #CFAA57;
+ --cth-lilac: #A896E3; --cth-peach: #DFA57F;
/* Accent "-light" fills double as chip/selection backgrounds — deep muted
versions so light text (ink-900) stays readable on top. */
- --cth-coral-light: #46302E;
- --cth-mint-light: #2A3930;
- --cth-sky-light: #273A3E;
- --cth-lemon-light: #3D3524;
- --cth-lilac-light: #332F45;
- --cth-peach-light: #3F3029;
+ --cth-coral-light: #3B2724;
+ --cth-mint-light: #1E3227;
+ --cth-sky-light: #1F3238;
+ --cth-lemon-light: #332C1D;
+ --cth-lilac-light: #2B2740;
+ --cth-peach-light: #352822;
/* Status — dark-tuned counterparts (same hue language) */
--cth-status-idle: #6F6C77;
@@ -134,7 +159,9 @@
--cth-status-waiting: #8095DC;
--cth-status-blocked: #DF8078;
--cth-status-success: #6FB88B;
- --cth-status-ghost: #3D3C44;
+ /* The quietest status, but still a MARK the user must be able to find — at
+ the old #3D3C44 it measured 1.54:1 on the new ground and simply vanished. */
+ --cth-status-ghost: #6C6A76;
--cth-status-compacting: #9D8BD2;
--cth-status-looping: #D69A55;
--cth-status-typing: #CBA24A;
diff --git a/src/renderer/src/store/store.ts b/src/renderer/src/store/store.ts
index 900780cd..7ae52d5a 100644
--- a/src/renderer/src/store/store.ts
+++ b/src/renderer/src/store/store.ts
@@ -627,7 +627,21 @@ export const useStore = create<State>((set) => ({
// addAgent for the same id — never render a duplicate card. The first writer
// (richer local record) wins; the broadcast is a no-op for it.
if (s.agents.some((a) => a.id === agent.id)) return s;
- const agents = [...s.agents, agent];
+ // GOD enters at the HEAD, everyone else at the tail. Michael's position was
+ // otherwise decided by a race he usually lost: useHive's bootstrap removes
+ // the restored god entry, then spawns him asynchronously (a setTimeout, a
+ // listPtys round-trip, and a --resume that seeds a transcript first), while
+ // useRestoreTeam respawns last session's workers in parallel. Whoever
+ // resolved first landed first, so a session with workers to restore put the
+ // BOSS card fourth — and persistAgents() then wrote that order to disk, so
+ // it stuck across restarts instead of flickering once.
+ //
+ // Fixed at insertion rather than by sorting in AgentStrip: the strip has
+ // drag-reorder (reorderAgents) whose whole point is a persisted manual
+ // order, and a god-first sort at render time would silently override the
+ // user's own arrangement every frame. This just makes the head the honest
+ // default; a deliberate drag still wins and still persists.
+ const agents = agent.isGod ? [agent, ...s.agents] : [...s.agents, agent];
// Re-spawning an archived agent un-archives it: an id is active xor archived.
const archivedAgents = s.archivedAgents.filter((a) => a.id !== agent.id);
// A live (re)spawn also consumes any restorable entry for the same id.