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(ui): move the 1:1 hold next to IDE, and say what the agent controls do

Chaitanya Giri12b56a7986dd
diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx
index 4df3ca4d..2d7c2e76 100644
--- a/src/renderer/src/App.tsx
+++ b/src/renderer/src/App.tsx
@@ -1,4 +1,4 @@
-import { useEffect, useMemo, useState } from 'react';
+import { useEffect, useState } from 'react';
import { useStore, selectedAgent } from '@/store/store';
import { startMockLoop, stopMockLoop } from '@/store/mockEvents';
import type { HarnessConfig } from '@/store/config';
@@ -49,16 +49,6 @@ export function App() {
const ideOpen = useStore(s => s.ideOpen);
const setIdeOpen = useStore(s => s.setIdeOpen);
- // Whoever the title bar's 1:1 hold acts on: the focused agent when focus mode
- // is on, otherwise the selection. Michael himself is excluded — putting the
- // orchestrator on hold would tell him to stop routing to himself.
- const selectedId = useStore(s => s.selectedId);
- const holdTarget = useMemo(() => {
- const id = fullscreenAgentId ?? selectedId;
- const a = agents.find((x) => x.id === id);
- return a && !a.isGod ? a : null;
- }, [agents, fullscreenAgentId, selectedId]);
-
const [config, setConfig] = useState<HarnessConfig | null>(null);
// Whether the user has passed the launch-time hive picker this session. Starts
// true (skip the picker) right after a hive SWITCH — changeHome relaunches and
@@ -343,40 +333,6 @@ export function App() {
</button>
{/* v0.3.4: the IDE button moved to agent level — every agent's header
(sidebar detail, god Command Center, fullscreen) carries it. */}
- {/* 1:1 hold. Acts on whoever is on screen — the focused agent, else the
- selection — and the tooltip names them, because a title-bar control
- that silently picks its own target is how you put the wrong agent on
- hold. Held agents keep running; all this changes is that Michael is
- told to stop routing work to them. */}
- {holdTarget && (
- <button
- className="cth-titlebar-nodrag cth-tip"
- onClick={() => {
- const next = !holdTarget.onHold;
- void window.cth.hiveSetAgentHold(holdTarget.id, next).then((r) => {
- // Only mirror it locally once main has actually written the
- // registry. Flipping the button optimistically would show a
- // hold that Michael never heard about.
- if (r.ok) useStore.getState().updateAgent(holdTarget.id, { onHold: next });
- });
- }}
- data-tip={holdTarget.onHold
- ? `${holdTarget.name} is on hold — release to Michael`
- : `Hold ${holdTarget.name} for a 1:1`}
- aria-label="Toggle 1:1 hold"
- aria-pressed={!!holdTarget.onHold}
- style={{
- display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
- width: 28, height: 28, padding: 0,
- background: holdTarget.onHold ? 'var(--cth-mint-light)' : 'var(--cth-paper-100)',
- boxShadow: `inset 0 0 0 1px ${holdTarget.onHold ? 'var(--cth-mint)' : 'var(--cth-ink-300)'}`,
- border: 'none', borderRadius: 2, cursor: 'pointer',
- color: 'var(--cth-ink-900)'
- }}
- >
- <HoldGlyph on={!!holdTarget.onHold} />
- </button>
- )}
<button
className="cth-titlebar-nodrag cth-settings-btn cth-tip"
onClick={() => { setSettingsSection(undefined); setSettingsOpen(true); }}
@@ -575,16 +531,6 @@ function ExpandGlyph() {
);
}
-/** Two bars, the universal pause. "This agent is parked, not gone." Filled when
- * the hold is ON so the state reads at a glance without hunting for a colour. */
-function HoldGlyph({ on }: { on: boolean }) {
- return (
- <Glyph>
- <path d="M6 3.5v9M10 3.5v9" strokeWidth={on ? 3 : 1.6} />
- </Glyph>
- );
-}
-
/** The same brackets turned inward — leave fullscreen. */
function CollapseGlyph() {
return (
diff --git a/src/renderer/src/components/AgentControlStrip.tsx b/src/renderer/src/components/AgentControlStrip.tsx
index 7d88a9fd..6b07a8b2 100644
--- a/src/renderer/src/components/AgentControlStrip.tsx
+++ b/src/renderer/src/components/AgentControlStrip.tsx
@@ -1,10 +1,24 @@
import { useEffect, useRef, useState } from 'react';
import { PixelButton } from './PixelButton';
-/** Operator control for one agent (#7C.1–7C.3) — pause (deny tools at the next
- * boundary), graceful halt (clean stop), and mid-run steering (inject context
- * without typing into the TUI). All ride Claude Code's hook-return protocol; no
- * PTY keystrokes. A thin strip under the agent header. */
+/**
+ * Operator control for one agent (#7C.1-7C.3) — pause (deny tools at the next
+ * boundary), graceful halt (clean stop), and mid-run steering (inject context
+ * without typing into the TUI). All ride Claude Code's hook-return protocol; no
+ * PTY keystrokes. A thin strip under the agent header.
+ *
+ * The labels used to be "CONTROL", "pause", "halt", "steer", which told you the
+ * mechanism and nothing about the consequence. "Control" what, and what is the
+ * difference between pausing and halting? Both stop something; only one is
+ * recoverable in the same breath. So each button now says what HAPPENS, the
+ * heading says what the section governs, and the explanations are on a styled
+ * hover tip rather than a native `title` that waits a second and then renders
+ * an unstyled OS bubble.
+ *
+ * Not in this strip on purpose: the 1:1 hold, which lives next to IDE in the
+ * header. Pause and halt stop the AGENT; hold stops MICHAEL sending it work.
+ * Grouping them would suggest they are three flavours of the same thing.
+ */
interface Snapshot {
paused: boolean;
halted: boolean;
@@ -34,12 +48,12 @@ export function AgentControlStrip({ agentId }: { agentId: string }) {
const togglePause = async () => {
const s = snap?.paused ? await window.cth.controlResume(agentId) : await window.cth.controlPause(agentId, true);
if (s) setSnap(s);
- flash(snap?.paused ? 'resumed' : 'paused — tool calls will be denied');
+ flash(snap?.paused ? 'tools allowed again' : 'tools blocked from the next call on');
};
const halt = async () => {
const s = await window.cth.controlHalt(agentId);
if (s) setSnap(s);
- flash('halt requested — stops cleanly at next hook');
+ flash('will stop after the current step');
};
const sendSteer = async () => {
const t = steer.trim();
@@ -47,7 +61,7 @@ export function AgentControlStrip({ agentId }: { agentId: string }) {
const s = await window.cth.controlSteer(agentId, t);
if (s) setSnap(s);
setSteer('');
- flash('steer queued — delivered on next turn');
+ flash('note queued, arrives on its next turn');
};
return (
@@ -57,43 +71,61 @@ export function AgentControlStrip({ agentId }: { agentId: string }) {
borderBottom: '1px solid var(--cth-ink-300)', flexShrink: 0
}}>
<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. */}
+ <span
+ className="cth-tip cth-tip-left cth-tip-wrap"
+ data-tip="What this agent is allowed to do right now, and a way to nudge it mid-run. Nothing here ends the agent or loses its session."
+ style={{ fontFamily: 'var(--cth-font-display)', fontSize: 9, color: 'var(--cth-ink-500)', marginRight: 2, cursor: 'help' }}
+ >WHAT THIS AGENT CAN DO</span>
+ {/* Neither of these kills anything, and the old two-word labels never
+ said so — the difference is WHEN the agent stops and whether it keeps
+ its session. Say the consequence on the button, the detail on hover. */}
<PixelButton variant={snap?.paused ? 'primary' : 'secondary'} size="sm" onClick={togglePause}>
- <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
+ className="cth-tip cth-tip-left cth-tip-wrap"
+ data-tip={snap?.paused
+ ? 'Give its tools back. The agent keeps its session and picks up where it stopped.'
+ : 'The agent keeps thinking and talking to you, but cannot read, write or run anything until you allow it again. Immediate, and reversible.'}
+ aria-label={snap?.paused ? 'Allow tools again' : 'Block this agent from using tools'}
+ >
+ {snap?.paused ? 'allow tools' : 'block tools'}
</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
+ className="cth-tip cth-tip-left cth-tip-wrap"
+ data-tip="Let it finish the step it is on, then stop. The process and its session survive, so Restart and Continue can pick it back up. To end the process outright, use the X."
+ aria-label="Stop this agent after the current step"
+ >
+ stop after this step
</span>
</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 && (
- <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>delivery paused (floor)</span>
+ <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>queued messages held (whole floor)</span>
)}
- {snap?.halted && <span style={{ fontSize: 11, color: 'var(--cth-coral)' }}>halting…</span>}
- {!!snap?.pendingSteers && <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>{snap.pendingSteers} steer queued</span>}
+ {snap?.halted && <span style={{ fontSize: 11, color: 'var(--cth-coral)' }}>stopping after this step…</span>}
+ {!!snap?.pendingSteers && <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>{snap.pendingSteers} note{snap.pendingSteers === 1 ? '' : 's'} waiting</span>}
</div>
<div style={{ display: 'flex', gap: 6 }}>
<input
value={steer}
onChange={(e) => setSteer(e.target.value)}
onKeyDown={(e) => { if (e.key === 'Enter') sendSteer(); }}
- placeholder="steer this agent (injected as context, no typing into its terminal)…"
+ placeholder="send this agent a note… (arrives as context on its next turn, nothing is typed into its terminal)"
style={{
flex: 1, padding: '4px 6px', background: 'var(--cth-paper-100)', border: 'none',
boxShadow: 'inset 0 0 0 1px var(--cth-ink-100)', fontFamily: 'var(--cth-font-ui)',
fontSize: 12, color: 'var(--cth-ink-900)', outline: 'none'
}}
/>
- <PixelButton variant="secondary" size="sm" onClick={sendSteer} disabled={!steer.trim()}>steer</PixelButton>
+ <PixelButton variant="secondary" size="sm" onClick={sendSteer} disabled={!steer.trim()}>
+ <span
+ className="cth-tip cth-tip-wrap"
+ data-tip="Hands the agent a note at its next turn boundary. It does not interrupt what it is doing now, and nothing is typed into its terminal."
+ aria-label="Send this agent a note"
+ >send</span>
+ </PixelButton>
</div>
{note && <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>{note}</span>}
</div>
diff --git a/src/renderer/src/components/AgentDetailPanel.tsx b/src/renderer/src/components/AgentDetailPanel.tsx
index c3f0c32c..cb86e37e 100644
--- a/src/renderer/src/components/AgentDetailPanel.tsx
+++ b/src/renderer/src/components/AgentDetailPanel.tsx
@@ -12,6 +12,7 @@ import { SidebarTabs } from './SidebarTabs';
import { ThreadsPanel } from './ThreadsPanel';
import { ToolWaterfall } from './ToolWaterfall';
import { AgentControlStrip } from './AgentControlStrip';
+import { AgentHoldButton } from './AgentHoldButton';
import { EditAgentModal } from './EditAgentModal';
import { GitTab } from './GitTab';
import { Icon } from './Icon';
@@ -133,8 +134,14 @@ export function AgentDetailPanel({ agent }: AgentDetailPanelProps) {
</PixelButton>
{/* v0.3.4: the IDE lives at agent level (replaces the old files tab) —
opens the full-window Monaco editor rooted at this agent's workspace. */}
+ <AgentHoldButton agentId={agent.id} />
<PixelButton variant="secondary" size="sm" onClick={() => useStore.getState().setIdeOpen(true, agent.id)}>
- <span title={`Open the IDE — file editor + git diff for ${agent.project}`} style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
+ <span
+ className="cth-tip cth-tip-wrap"
+ data-tip={`Open the IDE: browse and edit files in ${agent.project}, and see uncommitted changes as a diff.`}
+ aria-label="Open the IDE"
+ style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}
+ >
<Icon name="code" /> IDE
</span>
</PixelButton>
diff --git a/src/renderer/src/components/AgentHoldButton.tsx b/src/renderer/src/components/AgentHoldButton.tsx
new file mode 100644
index 00000000..41cd1c9d
--- /dev/null
+++ b/src/renderer/src/components/AgentHoldButton.tsx
@@ -0,0 +1,70 @@
+import { useEffect, useState } from 'react';
+import { PixelButton } from './PixelButton';
+import { Icon } from './Icon';
+import { useStore } from '@/store/store';
+
+/**
+ * 1:1 HOLD — "I have this agent, Michael stop sending it work."
+ *
+ * Sits immediately left of the IDE button on BOTH agent surfaces (the sidebar
+ * detail panel and the focus-mode header) because focus mode covers the title
+ * bar, so a title-bar control simply vanishes in the mode where you are most
+ * likely to be working with one agent one-on-one.
+ *
+ * Distinct from the pause and halt controls below the header, and the tooltip
+ * says so, because the three look interchangeable and are not: pause and halt
+ * stop the AGENT (deny its tools, or stop it after this step), while hold stops
+ * MICHAEL (the agent keeps running and answering you). Halt in particular is
+ * the wrong tool for a 1:1 — it stops the agent you wanted to talk to.
+ *
+ * Never rendered for Michael himself: telling the orchestrator to stop routing
+ * work to itself is not a state worth having.
+ */
+export function AgentHoldButton({ agentId }: { agentId: string }) {
+ const agent = useStore((s) => s.agents.find((a) => a.id === agentId));
+ const [busy, setBusy] = useState(false);
+
+ // The registry is the record and it survives restarts, so the store's copy
+ // can be stale on a fresh launch. Read it back once per agent.
+ useEffect(() => {
+ let alive = true;
+ window.cth.hiveRegistry?.().then((reg) => {
+ if (!alive) return;
+ const onHold = !!(reg as { agents?: Record<string, { onHold?: boolean }> })?.agents?.[agentId]?.onHold;
+ if (onHold !== !!useStore.getState().agents.find((a) => a.id === agentId)?.onHold) {
+ useStore.getState().updateAgent(agentId, { onHold });
+ }
+ }).catch(() => { /* no hive — the button is harmless either way */ });
+ return () => { alive = false; };
+ }, [agentId]);
+
+ if (!agent || agent.isGod) return null;
+ const on = !!agent.onHold;
+
+ return (
+ <PixelButton
+ variant={on ? 'primary' : 'secondary'}
+ size="sm"
+ disabled={busy}
+ onClick={() => {
+ setBusy(true);
+ // Mirror locally only after main confirms the write. Flipping
+ // optimistically would show a hold Michael never heard about.
+ void window.cth.hiveSetAgentHold(agentId, !on)
+ .then((r) => { if (r.ok) useStore.getState().updateAgent(agentId, { onHold: !on }); })
+ .finally(() => setBusy(false));
+ }}
+ >
+ <span
+ className="cth-tip cth-tip-wrap"
+ data-tip={on
+ ? `Release ${agent.name}. Michael can hand them work again.`
+ : `Hold ${agent.name} for a 1:1. Michael stops sending them work until you release. They keep running and answering you — this is not pause or halt.`}
+ aria-label={on ? 'Release this agent to Michael' : 'Hold this agent for a 1:1'}
+ style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}
+ >
+ <Icon name={on ? 'pause' : 'play'} /> {on ? 'on hold' : 'hold'}
+ </span>
+ </PixelButton>
+ );
+}
diff --git a/src/renderer/src/components/CommandCenterPanel.tsx b/src/renderer/src/components/CommandCenterPanel.tsx
index 2883eca6..ad4815cb 100644
--- a/src/renderer/src/components/CommandCenterPanel.tsx
+++ b/src/renderer/src/components/CommandCenterPanel.tsx
@@ -190,9 +190,11 @@ export function CommandCenterPanel({ agent, fullscreen = false }: { agent: Agent
onClick={() => { void toggleFloorDelivery(); }}
>
<span
- title={floorDeliveryPaused
- ? 'Automatic queue delivery is PAUSED for every agent — messages stay queued until resumed'
- : 'Automatic queue delivery is ON for every agent — click to pause the whole floor'}
+ className="cth-tip cth-tip-wrap"
+ data-tip={floorDeliveryPaused
+ ? 'Queued messages are being held for EVERY agent on the floor. Nothing is lost; it is delivered when you switch this back on.'
+ : 'Queued messages are delivered to every agent automatically. Click to hold the whole floor.'}
+ aria-label={floorDeliveryPaused ? 'Resume automatic delivery for the whole floor' : 'Hold automatic delivery for the whole floor'}
style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}
>
<Icon name={floorDeliveryPaused ? 'pause' : 'play'} />
@@ -206,7 +208,12 @@ export function CommandCenterPanel({ agent, fullscreen = false }: { agent: Agent
const s = useStore.getState();
s.setIdeOpen(true, s.selectedId);
}}>
- <span title="Open the IDE — file editor + git diff" style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
+ <span
+ className="cth-tip cth-tip-wrap"
+ data-tip="Open the IDE: browse and edit files in the selected agent's workspace, and see uncommitted changes as a diff."
+ aria-label="Open the IDE"
+ style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}
+ >
<Icon name="code" /> IDE
</span>
</PixelButton>
diff --git a/src/renderer/src/components/FullscreenTerminal.tsx b/src/renderer/src/components/FullscreenTerminal.tsx
index 39ae1023..02ea4f1d 100644
--- a/src/renderer/src/components/FullscreenTerminal.tsx
+++ b/src/renderer/src/components/FullscreenTerminal.tsx
@@ -6,6 +6,7 @@ import { PtyTerminalView } from './PtyTerminalView';
import { terminalInstanceKey } from './terminalRecovery';
import { MessageQueueComposer } from './MessageQueueComposer';
import { AgentControlStrip } from './AgentControlStrip';
+import { AgentHoldButton } from './AgentHoldButton';
import { CommandCenterPanel } from './CommandCenterPanel';
import { Icon } from './Icon';
import { SpritePortrait } from './SpritePortrait';
@@ -962,8 +963,14 @@ function Header({ agent }: { agent: Agent }) {
fullscreen does not change the selection, so leaving the IDE to infer
its agent would open whichever agent happens to be selected in the
sidebar rather than the one filling the screen. */}
+ <AgentHoldButton agentId={agent.id} />
<PixelButton variant="secondary" size="sm" onClick={() => useStore.getState().setIdeOpen(true, agent.id)}>
- <span title="Open the IDE — file editor + git diff" style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
+ <span
+ className="cth-tip cth-tip-wrap"
+ data-tip={`Open the IDE: browse and edit files in ${agent.name}'s workspace, and see their uncommitted changes as a diff.`}
+ aria-label="Open the IDE"
+ style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}
+ >
<Icon name="code" /> IDE
</span>
</PixelButton>
diff --git a/src/renderer/src/design/global.css b/src/renderer/src/design/global.css
index e83275df..ae792259 100644
--- a/src/renderer/src/design/global.css
+++ b/src/renderer/src/design/global.css
@@ -128,6 +128,20 @@ canvas, img, svg { image-rendering: pixelated; image-rendering: crisp-edges; }
.cth-tip:hover::after,
.cth-tip:focus-visible::after { opacity: 1; }
+/* Left-anchored variant, for a tip on a control that is NOT near the right edge
+ — the default right:0 would run the bubble off toward the sidebar. */
+.cth-tip-left::after { left: 0; right: auto; }
+
+/* Wrapping variant. `nowrap` is right for a two-word title-bar hint and wrong
+ for a sentence that has to say what a button actually does: at 60+ characters
+ a nowrap bubble is wider than the panel it explains. */
+.cth-tip-wrap::after {
+ white-space: normal;
+ width: max-content;
+ max-width: 260px;
+ line-height: 15px;
+}
+
/* Settings (gear) button in the title bar — a clear bordered chip with a
neo-brutalist hover (lemon fill + offset shadow) so it reads as a button. */
.cth-settings-btn { transition: background 80ms steps(2), box-shadow 80ms steps(2), transform 80ms steps(2); }