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

feat(command-center): Add-Agent config IA + Command Center UX fixes

Chaitanya Girieaed9fb12f62
diff --git a/src/renderer/src/components/AddAgentModal.tsx b/src/renderer/src/components/AddAgentModal.tsx
index 214a1dfc..c6e23569 100644
--- a/src/renderer/src/components/AddAgentModal.tsx
+++ b/src/renderer/src/components/AddAgentModal.tsx
@@ -22,6 +22,19 @@ import {
const ACCENTS: AccentColorName[] = ['coral', 'mint', 'sky', 'lemon', 'lilac', 'peach'];
+// The Add Agent form has 11+ fields, so it's grouped into sections the user jumps
+// between via a left sidebar index (one section shown at a time). Engine carries
+// Command (it's the spawn command assembled from provider+model+flags); Workspace
+// clusters Folder + Git isolation + Resume (all "where/how it runs"). Capabilities
+// isn't a field here — it rides an imported hire manifest (the pinned banner).
+type SectionKey = 'identity' | 'workspace' | 'engine' | 'briefing';
+const SECTIONS: { key: SectionKey; label: string; hint: string }[] = [
+ { key: 'identity', label: 'Identity', hint: 'name · character · color' },
+ { key: 'workspace', label: 'Workspace', hint: 'folder · isolation · resume' },
+ { key: 'engine', label: 'Engine', hint: 'provider · model · command' },
+ { key: 'briefing', label: 'Briefing', hint: 'description · goal' }
+];
+
function basename(path: string): string {
return path.split('/').filter(Boolean).pop() ?? path;
}
@@ -104,6 +117,8 @@ export function AddAgentModal({ onClose, config }: AddAgentModalProps) {
const [folderNote, setFolderNote] = useState<string | undefined>();
const [error, setError] = useState<string | undefined>();
const [busy, setBusy] = useState(false);
+ // Which config section the left sidebar index is showing.
+ const [section, setSection] = useState<SectionKey>('identity');
// Zero-step resume: when a session id is entered, look up the cwd it originally
// ran in (from the transcript) and pre-fill the Folder so the user doesn't have
@@ -149,9 +164,11 @@ export function AddAgentModal({ onClose, config }: AddAgentModalProps) {
const submit = async () => {
setError(undefined);
- if (!name.trim()) { setError('Name is required'); return; }
- if (!cwd) { setError('Pick a folder first'); return; }
- if (!command.trim()) { setError('Command is required'); return; }
+ // A required field can live in a section the user hasn't opened, so jump to
+ // the offending section as we surface the error — the field is never hidden.
+ if (!name.trim()) { setError('Name is required'); setSection('identity'); return; }
+ if (!cwd) { setError('Pick a folder first'); setSection('workspace'); return; }
+ if (!command.trim()) { setError('Command is required'); setSection('engine'); return; }
setBusy(true);
const id = uniqueId(name);
@@ -248,14 +265,20 @@ export function AddAgentModal({ onClose, config }: AddAgentModalProps) {
zIndex: 100
}}
>
- <div onClick={(e) => e.stopPropagation()} style={{ width: 600, maxWidth: '92vw' }}>
+ <div onClick={(e) => e.stopPropagation()} style={{ width: 940, maxWidth: '95vw' }}>
<PixelPanel
variant="dialog"
title="ADD AGENT"
style={{ padding: 16 }}
noPadding
>
- <div style={{ display: 'flex', flexDirection: 'column', gap: 12, padding: 16 }}>
+ {/* Sectioned config with a left sidebar index. The form has 11+ fields,
+ so they're grouped into 4 sections (Identity / Workspace / Engine /
+ Briefing) shown one at a time; the sidebar jumps between them. The
+ hire-import review banner, the error, and the footer stay pinned
+ around the section pane. maxHeight keeps the dialog within the
+ viewport (title bar stays pinned). */}
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 12, padding: 16, maxHeight: '86vh', overflowY: 'auto' }}>
{hireMeta && (
<div style={{
padding: '6px 10px',
@@ -353,240 +376,297 @@ export function AddAgentModal({ onClose, config }: AddAgentModalProps) {
})()}
</div>
)}
- <Row label="Name">
- <input
- value={name}
- onChange={(e) => setName(e.target.value)}
- placeholder="Ada"
- style={inputStyle}
- />
- </Row>
-
- <Row label="Folder">
- {config.registeredRepos.length > 0 && (
- <div style={{ display: 'flex', gap: 6, flexWrap: 'wrap', marginBottom: 6 }}>
- {config.registeredRepos.map((r) => (
- <button
- key={r}
- onClick={() => setCwd(r)}
- title={r}
- style={{
- padding: '3px 8px 1px',
- background: cwd === r ? `var(--cth-${accent}-light)` : 'var(--cth-cream-100)',
- boxShadow: cwd === r
- ? 'inset 0 0 0 2px var(--cth-ink-900)'
- : 'inset 0 0 0 1px var(--cth-ink-700)',
- fontFamily: 'var(--cth-font-ui)',
- fontSize: 13,
- cursor: 'pointer',
- border: 'none'
- }}
- >
- {basename(r)}
- </button>
- ))}
- </div>
- )}
- <div style={{ display: 'flex', gap: 6, alignItems: 'center' }}>
- <input
- value={cwd}
- onChange={(e) => setCwd(e.target.value)}
- placeholder="/path/to/your/project"
- style={{ ...inputStyle, flex: 1, fontFamily: 'var(--cth-font-mono)', fontSize: 14 }}
- />
- <PixelButton variant="secondary" size="md" onClick={pickFolder}>
- <span style={{ display: 'inline-flex', gap: 4, alignItems: 'center' }}>
- <Icon name="folder" /> pick
- </span>
- </PixelButton>
- </div>
- </Row>
- <Row label="Provider">
- <div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>
- {AGENT_PROVIDER_PRESETS.map((p) => {
- const active = provider === p.id;
- return (
- <button
- key={p.id}
- onClick={() => pickProvider(p.id)}
- title={
- p.id === 'antigravity'
- ? 'Spawn the Antigravity CLI (agy) with a Gemini model'
- : p.id === 'codex'
- ? 'Spawn the Codex CLI (codex) without Claude-only flags'
- : p.id === 'custom'
- ? 'Run any command — no Claude-only flags'
- : p.label
- }
- style={{
- padding: '3px 8px 1px',
- background: active ? `var(--cth-${accent}-light)` : 'var(--cth-cream-100)',
- boxShadow: active
- ? 'inset 0 0 0 2px var(--cth-ink-900)'
- : 'inset 0 0 0 1px var(--cth-ink-700)',
- fontFamily: 'var(--cth-font-ui)', fontSize: 13,
- color: 'var(--cth-ink-900)', cursor: 'pointer', border: 'none'
- }}
- >
- {p.label}
- </button>
- );
- })}
- </div>
- </Row>
-
- {preset.supportsModel && <Row label="Model">
- <div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>
- {(() => {
- // An imported hire may name a model newer than this picker's
- // hardcoded list (e.g. claude-fable-5). Surface it as a real,
- // selected card instead of leaving the picker looking unset —
- // the command field already carries it either way.
- const known = modelsForProvider(provider);
- return model && !known.some((m) => m.id === model)
- ? [...known, { id: model, label: `${model} (from hire)` }]
- : known;
- })().map((m) => {
- const active = (model ?? '') === (m.id ?? '');
+ {/* sidebar index + the active section's fields */}
+ <div style={{ display: 'flex', gap: 16, alignItems: 'flex-start' }}>
+ {/* LEFT — section index. Capabilities isn't a nav item: it isn't a
+ user field, it rides the imported hire manifest (banner above). */}
+ <nav style={{ width: 168, flexShrink: 0, display: 'flex', flexDirection: 'column', gap: 4 }}>
+ {SECTIONS.map((s, i) => {
+ const active = section === s.key;
return (
<button
- key={m.label}
- onClick={() => pickModel(m.id)}
- title={m.id ?? 'CLI default model'}
+ key={s.key}
+ onClick={() => setSection(s.key)}
style={{
- padding: '3px 8px 1px',
+ textAlign: 'left', padding: '6px 9px 5px', border: 'none', cursor: 'pointer',
background: active ? `var(--cth-${accent}-light)` : 'var(--cth-cream-100)',
boxShadow: active
? 'inset 0 0 0 2px var(--cth-ink-900)'
: 'inset 0 0 0 1px var(--cth-ink-700)',
- fontFamily: 'var(--cth-font-ui)', fontSize: 13,
- color: 'var(--cth-ink-900)', cursor: 'pointer', border: 'none'
+ display: 'flex', flexDirection: 'column', gap: 1
}}
>
- {m.label}
+ <span style={{
+ fontFamily: 'var(--cth-font-display)', fontSize: 9, lineHeight: '13px',
+ color: 'var(--cth-ink-900)', textTransform: 'uppercase',
+ display: 'flex', alignItems: 'baseline', gap: 6
+ }}>
+ <span style={{ color: active ? 'var(--cth-ink-900)' : 'var(--cth-ink-500)' }}>{i + 1}</span>
+ {s.label}
+ </span>
+ <span style={{ fontFamily: 'var(--cth-font-ui)', fontSize: 11, color: 'var(--cth-ink-500)' }}>
+ {s.hint}
+ </span>
</button>
);
})}
+ </nav>
+
+ {/* RIGHT — the active section's fields */}
+ <div style={{ flex: 1, minWidth: 0, minHeight: 260, display: 'flex', flexDirection: 'column', gap: 12 }}>
+ {section === 'identity' && (
+ <>
+ <Row label="Name">
+ <input
+ value={name}
+ onChange={(e) => setName(e.target.value)}
+ placeholder="Ada"
+ style={inputStyle}
+ />
+ </Row>
+
+ <Row label="Character">
+ <div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>
+ {OFFICE_CAST.map(c => (
+ <button
+ key={c.name}
+ onClick={() => { setCharacter(c.name); setName(c.displayName); }}
+ title={c.blurb}
+ style={{
+ padding: 4,
+ background: character === c.name ? `var(--cth-${accent}-light)` : 'var(--cth-cream-100)',
+ boxShadow: character === c.name
+ ? 'inset 0 0 0 2px var(--cth-ink-900)'
+ : 'inset 0 0 0 1px var(--cth-ink-700)',
+ cursor: 'pointer',
+ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 2,
+ border: 'none', width: 56
+ }}
+ >
+ <div style={{ width: 44, height: 56, display: 'flex', alignItems: 'flex-end', justifyContent: 'center', overflow: 'hidden' }}>
+ <SpritePortrait character={c.name} scale={2} />
+ </div>
+ <span style={{ fontSize: 11, color: 'var(--cth-ink-700)' }}>{c.displayName}</span>
+ </button>
+ ))}
+ </div>
+ </Row>
+
+ <Row label="Color">
+ <div style={{ display: 'flex', gap: 6 }}>
+ {ACCENTS.map(a => (
+ <button
+ key={a}
+ onClick={() => setAccent(a)}
+ style={{
+ width: 32, height: 32,
+ background: `var(--cth-${a})`,
+ boxShadow: accent === a
+ ? 'inset 0 0 0 2px var(--cth-ink-900), 0 0 0 2px var(--cth-ink-900)'
+ : 'inset 0 0 0 1px var(--cth-ink-900)',
+ cursor: 'pointer',
+ border: 'none'
+ }}
+ aria-label={a}
+ />
+ ))}
+ </div>
+ </Row>
+ </>
+ )}
+
+ {section === 'workspace' && (
+ <>
+ <Row label="Folder">
+ {config.registeredRepos.length > 0 && (
+ <div style={{ display: 'flex', gap: 6, flexWrap: 'wrap', marginBottom: 6 }}>
+ {config.registeredRepos.map((r) => (
+ <button
+ key={r}
+ onClick={() => setCwd(r)}
+ title={r}
+ style={{
+ padding: '3px 8px 1px',
+ background: cwd === r ? `var(--cth-${accent}-light)` : 'var(--cth-cream-100)',
+ boxShadow: cwd === r
+ ? 'inset 0 0 0 2px var(--cth-ink-900)'
+ : 'inset 0 0 0 1px var(--cth-ink-700)',
+ fontFamily: 'var(--cth-font-ui)',
+ fontSize: 13,
+ cursor: 'pointer',
+ border: 'none'
+ }}
+ >
+ {basename(r)}
+ </button>
+ ))}
+ </div>
+ )}
+ <div style={{ display: 'flex', gap: 6, alignItems: 'center' }}>
+ <input
+ value={cwd}
+ onChange={(e) => setCwd(e.target.value)}
+ placeholder="/path/to/your/project"
+ style={{ ...inputStyle, flex: 1, fontFamily: 'var(--cth-font-mono)', fontSize: 14 }}
+ />
+ <PixelButton variant="secondary" size="md" onClick={pickFolder}>
+ <span style={{ display: 'inline-flex', gap: 4, alignItems: 'center' }}>
+ <Icon name="folder" /> pick
+ </span>
+ </PixelButton>
+ </div>
+ </Row>
+
+ <label style={{ display: 'flex', gap: 8, alignItems: 'center', cursor: resuming ? 'not-allowed' : 'pointer', opacity: resuming ? 0.5 : 1 }}>
+ <input
+ type="checkbox"
+ checked={resuming ? false : isolate}
+ disabled={resuming}
+ onChange={(e) => setIsolate(e.target.checked)}
+ style={{ width: 16, height: 16, cursor: resuming ? 'not-allowed' : 'pointer' }}
+ />
+ <span style={{ fontFamily: 'var(--cth-font-ui)', fontSize: 14, color: 'var(--cth-ink-900)' }}>
+ Git isolation (own worktree)
+ </span>
+ </label>
+
+ <Row label="Resume session ID (optional)">
+ <input
+ value={resumeSessionId}
+ onChange={(e) => { setResumeSessionId(e.target.value); setFolderNote(undefined); }}
+ onBlur={resolveFolderFromSession}
+ placeholder="paste a Claude session id to continue its conversation"
+ style={{ ...inputStyle, fontFamily: 'var(--cth-font-mono)', fontSize: 14 }}
+ />
+ {folderNote && (
+ <span style={{ fontFamily: 'var(--cth-font-ui)', fontSize: 12, color: 'var(--cth-mint, var(--cth-ink-700))' }}>
+ {folderNote}
+ </span>
+ )}
+ {resuming && (
+ <span style={{ fontFamily: 'var(--cth-font-ui)', fontSize: 12, color: 'var(--cth-ink-700)' }}>
+ Will resume this session in the chosen folder (git isolation disabled).
+ </span>
+ )}
+ </Row>
+ </>
+ )}
+
+ {section === 'engine' && (
+ <>
+ <Row label="Provider">
+ <div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>
+ {AGENT_PROVIDER_PRESETS.map((p) => {
+ const active = provider === p.id;
+ return (
+ <button
+ key={p.id}
+ onClick={() => pickProvider(p.id)}
+ title={
+ p.id === 'antigravity'
+ ? 'Spawn the Antigravity CLI (agy) with a Gemini model'
+ : p.id === 'codex'
+ ? 'Spawn the Codex CLI (codex) without Claude-only flags'
+ : p.id === 'custom'
+ ? 'Run any command — no Claude-only flags'
+ : p.label
+ }
+ style={{
+ padding: '3px 8px 1px',
+ background: active ? `var(--cth-${accent}-light)` : 'var(--cth-cream-100)',
+ boxShadow: active
+ ? 'inset 0 0 0 2px var(--cth-ink-900)'
+ : 'inset 0 0 0 1px var(--cth-ink-700)',
+ fontFamily: 'var(--cth-font-ui)', fontSize: 13,
+ color: 'var(--cth-ink-900)', cursor: 'pointer', border: 'none'
+ }}
+ >
+ {p.label}
+ </button>
+ );
+ })}
+ </div>
+ </Row>
+
+ {preset.supportsModel && <Row label="Model">
+ <div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>
+ {(() => {
+ // An imported hire may name a model newer than this picker's
+ // hardcoded list (e.g. claude-fable-5). Surface it as a real,
+ // selected card instead of leaving the picker looking unset —
+ // the command field already carries it either way.
+ const known = modelsForProvider(provider);
+ return model && !known.some((m) => m.id === model)
+ ? [...known, { id: model, label: `${model} (from hire)` }]
+ : known;
+ })().map((m) => {
+ const active = (model ?? '') === (m.id ?? '');
+ return (
+ <button
+ key={m.label}
+ onClick={() => pickModel(m.id)}
+ title={m.id ?? 'CLI default model'}
+ style={{
+ padding: '3px 8px 1px',
+ background: active ? `var(--cth-${accent}-light)` : 'var(--cth-cream-100)',
+ boxShadow: active
+ ? 'inset 0 0 0 2px var(--cth-ink-900)'
+ : 'inset 0 0 0 1px var(--cth-ink-700)',
+ fontFamily: 'var(--cth-font-ui)', fontSize: 13,
+ color: 'var(--cth-ink-900)', cursor: 'pointer', border: 'none'
+ }}
+ >
+ {m.label}
+ </button>
+ );
+ })}
+ </div>
+ </Row>}
+
+ <Row label={config.autoMode && preset.autoFlag ? 'Command (auto mode on)' : 'Command'}>
+ <input
+ value={command}
+ onChange={(e) => setCommand(e.target.value)}
+ placeholder={
+ provider === 'antigravity'
+ ? 'agy'
+ : provider === 'codex'
+ ? 'codex'
+ : provider === 'custom'
+ ? 'your-agent-cli'
+ : 'claude'
+ }
+ style={{ ...inputStyle, fontFamily: 'var(--cth-font-mono)' }}
+ />
+ </Row>
+ </>
+ )}
+
+ {section === 'briefing' && (
+ <>
+ <Row label="Description">
+ <input
+ value={description}
+ onChange={(e) => setDescription(e.target.value)}
+ placeholder="what is this agent for"
+ style={inputStyle}
+ />
+ </Row>
+
+ <Row label="Goal (optional)">
+ <textarea
+ value={goal}
+ onChange={(e) => setGoal(e.target.value)}
+ placeholder="long-running directive injected on every prompt"
+ rows={2}
+ style={{ ...inputStyle, fontFamily: 'var(--cth-font-ui)', resize: 'none' }}
+ />
+ </Row>
+ </>
+ )}
</div>
- </Row>}
-
- <Row label={config.autoMode && preset.autoFlag ? 'Command (auto mode on)' : 'Command'}>
- <input
- value={command}
- onChange={(e) => setCommand(e.target.value)}
- placeholder={
- provider === 'antigravity'
- ? 'agy'
- : provider === 'codex'
- ? 'codex'
- : provider === 'custom'
- ? 'your-agent-cli'
- : 'claude'
- }
- style={{ ...inputStyle, fontFamily: 'var(--cth-font-mono)' }}
- />
- </Row>
-
- <Row label="Description">
- <input
- value={description}
- onChange={(e) => setDescription(e.target.value)}
- placeholder="what is this agent for"
- style={inputStyle}
- />
- </Row>
-
- <Row label="Goal (optional)">
- <textarea
- value={goal}
- onChange={(e) => setGoal(e.target.value)}
- placeholder="long-running directive injected on every prompt"
- rows={2}
- style={{ ...inputStyle, fontFamily: 'var(--cth-font-ui)', resize: 'none' }}
- />
- </Row>
-
- <Row label="Resume session ID (optional)">
- <input
- value={resumeSessionId}
- onChange={(e) => { setResumeSessionId(e.target.value); setFolderNote(undefined); }}
- onBlur={resolveFolderFromSession}
- placeholder="paste a Claude session id to continue its conversation"
- style={{ ...inputStyle, fontFamily: 'var(--cth-font-mono)', fontSize: 14 }}
- />
- {folderNote && (
- <span style={{ fontFamily: 'var(--cth-font-ui)', fontSize: 12, color: 'var(--cth-mint, var(--cth-ink-700))' }}>
- {folderNote}
- </span>
- )}
- {resuming && (
- <span style={{ fontFamily: 'var(--cth-font-ui)', fontSize: 12, color: 'var(--cth-ink-700)' }}>
- Will resume this session in the chosen folder (git isolation disabled).
- </span>
- )}
- </Row>
-
- <label style={{ display: 'flex', gap: 8, alignItems: 'center', cursor: resuming ? 'not-allowed' : 'pointer', opacity: resuming ? 0.5 : 1 }}>
- <input
- type="checkbox"
- checked={resuming ? false : isolate}
- disabled={resuming}
- onChange={(e) => setIsolate(e.target.checked)}
- style={{ width: 16, height: 16, cursor: resuming ? 'not-allowed' : 'pointer' }}
- />
- <span style={{ fontFamily: 'var(--cth-font-ui)', fontSize: 14, color: 'var(--cth-ink-900)' }}>
- Git isolation (own worktree)
- </span>
- </label>
-
- <Row label="Character">
- <div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>
- {OFFICE_CAST.map(c => (
- <button
- key={c.name}
- onClick={() => { setCharacter(c.name); setName(c.displayName); }}
- title={c.blurb}
- style={{
- padding: 4,
- background: character === c.name ? `var(--cth-${accent}-light)` : 'var(--cth-cream-100)',
- boxShadow: character === c.name
- ? 'inset 0 0 0 2px var(--cth-ink-900)'
- : 'inset 0 0 0 1px var(--cth-ink-700)',
- cursor: 'pointer',
- display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 2,
- border: 'none', width: 56
- }}
- >
- <div style={{ width: 44, height: 56, display: 'flex', alignItems: 'flex-end', justifyContent: 'center', overflow: 'hidden' }}>
- <SpritePortrait character={c.name} scale={2} />
- </div>
- <span style={{ fontSize: 11, color: 'var(--cth-ink-700)' }}>{c.displayName}</span>
- </button>
- ))}
- </div>
- </Row>
-
- <Row label="Color">
- <div style={{ display: 'flex', gap: 6 }}>
- {ACCENTS.map(a => (
- <button
- key={a}
- onClick={() => setAccent(a)}
- style={{
- width: 32, height: 32,
- background: `var(--cth-${a})`,
- boxShadow: accent === a
- ? 'inset 0 0 0 2px var(--cth-ink-900), 0 0 0 2px var(--cth-ink-900)'
- : 'inset 0 0 0 1px var(--cth-ink-900)',
- cursor: 'pointer',
- border: 'none'
- }}
- aria-label={a}
- />
- ))}
- </div>
- </Row>
+ </div>
{error && (
<div style={{
diff --git a/src/renderer/src/components/AskMeTab.tsx b/src/renderer/src/components/AskMeTab.tsx
index 2d3fc086..9385faae 100644
--- a/src/renderer/src/components/AskMeTab.tsx
+++ b/src/renderer/src/components/AskMeTab.tsx
@@ -101,6 +101,32 @@ export function AskMeTab() {
setSending(null);
};
+ // Dismiss the open ask off the ASK ME board WITHOUT answering it. We mark the
+ // open humanQA entry `dismissedAt` (no fabricated answer) so openQuestion()
+ // stops returning it and the card leaves this view — the question itself stays
+ // on the card, so the Q&A history is never dropped (protocol). The task stays
+ // blocked on the kanban; the god can re-ask by appending a fresh humanQA entry.
+ // Reuses hiveWriteTasks (same path as the answer flow) — no new IPC.
+ const dismiss = async (task: HiveTask) => {
+ const open = openQuestion(task);
+ if (!open || sending === task.id) return;
+ const next = tasks.map((t) => {
+ if (t.id !== task.id) return t;
+ const qa = (t.humanQA ?? []).map((e) =>
+ e === open || (e.q === open.q && !e.a && !e.dismissedAt)
+ ? { ...e, dismissedAt: new Date().toISOString() }
+ : e
+ );
+ return { ...t, humanQA: qa };
+ });
+ setTasks(next); // optimistic — the card disappears immediately
+ try {
+ await window.cth.hiveWriteTasks(next);
+ } catch {
+ setTasks(tasks); // restore on failure so the user can retry
+ }
+ };
+
return (
// Body text is set in the mono face (VT323) — the same readable font the
// memory viewer uses. Pixelify Sans (font-ui) is too chunky for prose like
@@ -140,6 +166,24 @@ export function AskMeTab() {
{t.title}
</button>
{nameFor(t.assignee) && <PixelBadge status="blocked" label={nameFor(t.assignee)!} />}
+ {/* Dismiss — clears this ask off the board without answering it.
+ The card's Q&A history is preserved (the question stays on the
+ card, just marked dismissed). */}
+ <button
+ onClick={() => void dismiss(t)}
+ disabled={sending === t.id}
+ title="dismiss — clear this off the ASK ME board without answering (history kept)"
+ aria-label="dismiss this ask"
+ style={{
+ flexShrink: 0, width: 18, height: 18, padding: 0, marginLeft: 2,
+ display: 'flex', alignItems: 'center', justifyContent: 'center', lineHeight: 1,
+ border: 'none', cursor: sending === t.id ? 'default' : 'pointer',
+ background: 'transparent', color: 'var(--cth-ink-500)',
+ fontFamily: 'var(--cth-font-ui)', fontSize: 13
+ }}
+ onMouseEnter={(e) => { if (sending !== t.id) e.currentTarget.style.color = 'var(--cth-coral)'; }}
+ onMouseLeave={(e) => { e.currentTarget.style.color = 'var(--cth-ink-500)'; }}
+ >✕</button>
</div>
<div style={{ padding: 9, display: 'flex', flexDirection: 'column', gap: 8 }}>
diff --git a/src/renderer/src/components/CommandCenterPanel.tsx b/src/renderer/src/components/CommandCenterPanel.tsx
index cabc9d7a..5424203e 100644
--- a/src/renderer/src/components/CommandCenterPanel.tsx
+++ b/src/renderer/src/components/CommandCenterPanel.tsx
@@ -112,20 +112,23 @@ export function CommandCenterPanel({ agent }: { agent: Agent }) {
</div>
</div>
- {/* Tab bar — wraps onto extra rows when the panel is narrow (e.g. window
- fullscreen) so every tab stays fully visible. The old single-row scroll
- hid its scrollbar, which made the last tab ("memory") look clipped. */}
+ {/* 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. */}
<div className="cth-tabbar" style={{
- display: 'flex', flexWrap: 'wrap', gap: 4, rowGap: 4, padding: '6px 8px',
- background: 'var(--cth-cream-100)', borderBottom: '1px solid var(--cth-ink-700)', flexShrink: 0
+ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(94px, 1fr))', gap: 4,
+ padding: '6px 8px', background: 'var(--cth-cream-100)',
+ borderBottom: '1px solid var(--cth-ink-700)', flexShrink: 0
}}>
{TABS.map((t) => (
<button
key={t.key}
onClick={() => setTab(t.key)}
style={{
- flexShrink: 0, whiteSpace: 'nowrap',
- display: 'inline-flex', alignItems: 'center', gap: 4,
+ whiteSpace: 'nowrap',
+ 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)',
diff --git a/src/renderer/src/components/TasksKanban.tsx b/src/renderer/src/components/TasksKanban.tsx
index 375e9aaf..7fce1f1b 100644
--- a/src/renderer/src/components/TasksKanban.tsx
+++ b/src/renderer/src/components/TasksKanban.tsx
@@ -14,6 +14,10 @@ export interface HumanQA {
a?: string;
askedAt?: string;
answeredAt?: string;
+ /** Set when the human dismisses the ask from the ASK ME board WITHOUT
+ * answering — the question stays on the card (history is preserved) but
+ * openQuestion() stops returning it, so the card leaves ASK ME. */
+ dismissedAt?: string;
}
export interface HiveTask {
@@ -30,12 +34,13 @@ export interface HiveTask {
humanQA?: HumanQA[];
}
-/** The card's currently open question for the human, if any. */
+/** The card's currently open question for the human, if any. An entry the human
+ * dismissed (dismissedAt) counts as resolved, same as an answered one. */
export function openQuestion(t: HiveTask): HumanQA | undefined {
if (!Array.isArray(t.humanQA)) return undefined;
for (let i = t.humanQA.length - 1; i >= 0; i--) {
const e = t.humanQA[i];
- if (e && typeof e.q === 'string' && !e.a) return e;
+ if (e && typeof e.q === 'string' && !e.a && !e.dismissedAt) return e;
}
return undefined;
}
@@ -95,7 +100,10 @@ export function parseTasks(raw: unknown): HiveTask[] {
q: e.q as string,
a: typeof e.a === 'string' ? e.a : undefined,
askedAt: typeof e.askedAt === 'string' ? e.askedAt : undefined,
- answeredAt: typeof e.answeredAt === 'string' ? e.answeredAt : undefined
+ answeredAt: typeof e.answeredAt === 'string' ? e.answeredAt : undefined,
+ // Preserve a dismissal across the 5s re-parse, else the card would
+ // resurface on the next poll (openQuestion would see it as open).
+ dismissedAt: typeof e.dismissedAt === 'string' ? e.dismissedAt : undefined
}))
: undefined
}));