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(strip): note editor as a proper popover; drop the Delegate toggle; stop cropping avatar heads

Chaitanya Giri122472a90392
diff --git a/src/renderer/src/components/AgentCard.tsx b/src/renderer/src/components/AgentCard.tsx
index 5b1f9530..92523ad0 100644
--- a/src/renderer/src/components/AgentCard.tsx
+++ b/src/renderer/src/components/AgentCard.tsx
@@ -128,7 +128,9 @@ export function AgentCard({
width: 36, height: isGod ? 50 : 46, alignSelf: 'center',
background: `var(--cth-${accent}-light)`,
boxShadow: 'inset 0 0 0 1px var(--cth-ink-100)',
- display: 'flex', alignItems: 'flex-end', justifyContent: 'center', overflow: 'hidden',
+ // 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',
flexShrink: 0
}}>
<SpritePortrait character={character} scale={2} />
diff --git a/src/renderer/src/components/AgentStrip.tsx b/src/renderer/src/components/AgentStrip.tsx
index 26e300aa..6879e3ef 100644
--- a/src/renderer/src/components/AgentStrip.tsx
+++ b/src/renderer/src/components/AgentStrip.tsx
@@ -49,7 +49,10 @@ export function AgentStrip({ config }: AgentStripProps) {
const [dragId, setDragId] = useState<string | null>(null);
const [overId, setOverId] = useState<string | null>(null);
// Note editing is EXPLICIT (✎ toggles the editor) — nothing appears on hover.
+ // The editor is a fixed popover ABOVE the card (anchored off its rect): the
+ // strip clips overflow and the compact cards have no room for an inline box.
const [noteEditId, setNoteEditId] = useState<string | null>(null);
+ const cardRefs = useRef<Record<string, HTMLDivElement | null>>({});
// Each worker's actively-DOING ledger tasks, polled from hive/tasks.json —
// rendered as a sticky note on the avatar card (click → task detail).
const [doingByAgent, setDoingByAgent] = useState<Record<string, string[]>>({});
@@ -94,6 +97,7 @@ export function AgentStrip({ config }: AgentStripProps) {
// starts on movement — so AgentCard's onClick is unaffected.
<div
key={a.id}
+ ref={(el) => { cardRefs.current[a.id] = el; }}
draggable
onDragStart={(e) => { setDragId(a.id); e.dataTransfer.effectAllowed = 'move'; }}
onDragOver={(e) => {
@@ -145,63 +149,79 @@ export function AgentStrip({ config }: AgentStripProps) {
note={a.note}
onEditNote={a.isGod ? undefined : () => setNoteEditId(a.id)}
/>
- {/* The note itself lives INSIDE the card (its own row above the gauge,
- v0.3.4 — so it can never cover the context bar). This overlay is
- only the transient EDITOR: ✎ opens it, Esc / ✕ closes it. */}
- {noteEditId === a.id && !dragId && (
- <div
- onClick={(e) => e.stopPropagation()}
- onMouseDown={(e) => e.stopPropagation()}
- style={{
- position: 'absolute', left: 60, right: 7, bottom: 7, height: 30, zIndex: 5,
- display: 'flex', alignItems: 'center', gap: 4, padding: '3px 4px',
- background: 'var(--cth-paper-100)',
- boxShadow: 'inset 0 0 0 1px var(--cth-ink-300), 2px 2px 0 rgba(26,19,32,0.2)',
- boxSizing: 'border-box'
- }}
- >
- <span style={{
- flexShrink: 0, fontFamily: 'var(--cth-font-mono)', fontSize: 10,
- lineHeight: '18px', color: 'var(--cth-ink-700)'
- }}>NOTE</span>
- {/* A textarea, not an input: the note is a bullet list (one line
- each) and the fullscreen roster renders every line. An <input>
- silently drops the newlines the moment the user edits here,
- which would eat every bullet but the first. */}
- <textarea
- autoFocus
- draggable={false}
- rows={1}
- wrap="off"
- value={a.note ?? ''}
- onChange={(e) => setAgentNote(a.id, e.target.value)}
- onKeyDown={(e) => { if (e.key === 'Escape') setNoteEditId(null); }}
- placeholder="private note…"
- aria-label={`Note for ${a.name}`}
- title={a.note || undefined}
- style={{
- flex: 1, minWidth: 0, height: 22, padding: '2px 5px',
- border: 'none', outline: 'none', boxSizing: 'border-box',
- resize: 'none', overflow: 'auto',
- background: 'var(--cth-cream-100)',
- fontFamily: 'var(--cth-font-mono)', fontSize: 12,
- lineHeight: '18px', color: 'var(--cth-ink-900)'
- }}
- />
- <button
- onClick={() => setNoteEditId(null)}
- title="Done"
- aria-label="Close note editor"
- style={{
- flexShrink: 0, width: 18, height: 18, padding: 0, lineHeight: 1,
- display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
- fontFamily: 'var(--cth-font-ui)', fontSize: 11,
- color: 'var(--cth-ink-500)', background: 'transparent',
- border: 'none', cursor: 'pointer'
- }}
- >✕</button>
- </div>
- )}
+ {/* The note itself lives INSIDE the card (its own row above the gauge).
+ This is the transient EDITOR: a fixed popover ABOVE the card —
+ the compact card has no room for an inline box, and the strip
+ clips overflow. ✎ opens it; Esc / ✕ / click-away closes. */}
+ {noteEditId === a.id && !dragId && (() => {
+ const rect = cardRefs.current[a.id]?.getBoundingClientRect();
+ if (!rect) return null;
+ const width = 280;
+ const left = Math.max(8, Math.min(rect.left, window.innerWidth - width - 8));
+ const bottom = Math.max(8, window.innerHeight - rect.top + 8);
+ return (
+ <>
+ {/* click-away backdrop */}
+ <div
+ onClick={() => setNoteEditId(null)}
+ style={{ position: 'fixed', inset: 0, zIndex: 349, background: 'transparent' }}
+ />
+ <div
+ onClick={(e) => e.stopPropagation()}
+ onMouseDown={(e) => e.stopPropagation()}
+ style={{
+ position: 'fixed', left, bottom, width, zIndex: 350,
+ padding: 10, boxSizing: 'border-box',
+ background: 'var(--cth-paper-100)',
+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-300), 3px 3px 0 rgba(26,19,32,0.14)',
+ display: 'flex', flexDirection: 'column', gap: 6
+ }}
+ >
+ <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
+ <span style={{
+ fontFamily: 'var(--cth-font-display)', fontSize: 8, lineHeight: '12px',
+ color: 'var(--cth-ink-500)'
+ }}>PRIVATE NOTE · {a.name.toUpperCase()}</span>
+ <button
+ onClick={() => setNoteEditId(null)}
+ title="Done"
+ aria-label="Close note editor"
+ style={{
+ flexShrink: 0, width: 18, height: 18, padding: 0, lineHeight: 1,
+ display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
+ fontFamily: 'var(--cth-font-ui)', fontSize: 11,
+ color: 'var(--cth-ink-500)', background: 'transparent',
+ border: 'none', cursor: 'pointer'
+ }}
+ >✕</button>
+ </div>
+ {/* A textarea, not an input: the note is a bullet list (one
+ line per bullet) and the fullscreen roster renders every
+ line — an <input> would silently eat the newlines. */}
+ <textarea
+ autoFocus
+ rows={3}
+ value={a.note ?? ''}
+ onChange={(e) => setAgentNote(a.id, e.target.value)}
+ onKeyDown={(e) => { if (e.key === 'Escape') setNoteEditId(null); }}
+ placeholder="one line per bullet…"
+ aria-label={`Note for ${a.name}`}
+ style={{
+ width: '100%', padding: '6px 8px',
+ border: 'none', outline: 'none', resize: 'none', boxSizing: 'border-box',
+ background: 'var(--cth-cream-100)',
+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-100)',
+ fontFamily: 'var(--cth-font-mono)', fontSize: 12,
+ lineHeight: '18px', color: 'var(--cth-ink-900)'
+ }}
+ />
+ <span style={{ fontSize: 10, color: 'var(--cth-ink-500)' }}>
+ one line = one bullet · esc to close
+ </span>
+ </div>
+ </>
+ );
+ })()}
</div>
))}
<PixelButton
diff --git a/src/renderer/src/components/MessageQueueComposer.tsx b/src/renderer/src/components/MessageQueueComposer.tsx
index cfc337b6..0a8398dd 100644
--- a/src/renderer/src/components/MessageQueueComposer.tsx
+++ b/src/renderer/src/components/MessageQueueComposer.tsx
@@ -16,9 +16,6 @@ interface Attachment {
}
// Prepended (only to the enqueued value, never the visible draft) when the
-// god/Michael agent has the "Delegate to agents" toggle ON.
-const DELEGATE_PREFIX =
- "Delegate to other available agents as mentioned if no agents available do it yourself one by one the user's message starts now: ";
export interface MessageQueueComposerProps {
agent: Agent;
@@ -68,7 +65,6 @@ export function MessageQueueComposer({ agent }: MessageQueueComposerProps) {
const idle = agent.status === 'idle';
// Only the god/Michael agent gets the delegation toggle. Default OFF.
- const [delegate, setDelegate] = useState(false);
// Files/images staged for the next message. Component-local: switching agents
// remounts this component, so attachments are cleared on tab switch (drafts
@@ -138,8 +134,7 @@ export function MessageQueueComposer({ agent }: MessageQueueComposerProps) {
? `${text}\n\nAttached files:\n`
: 'Attached files:\n') + attachments.map((a) => `- ${a.path} (${a.name})`).join('\n')
: text;
- const out = delegate ? DELEGATE_PREFIX + body : body;
- enqueueMessage(agent.id, out);
+ enqueueMessage(agent.id, body);
setText('');
setAttachments([]);
};
@@ -346,13 +341,10 @@ export function MessageQueueComposer({ agent }: MessageQueueComposerProps) {
boxSizing: 'border-box'
}}
/>
- {/* Control bar: Delegate (god only) left; Attach + voice + Send aligned
- right. flexWrap so a narrow sidebar wraps the buttons onto a second
- row instead of pushing Send off-screen. */}
+ {/* Control bar: Attach + voice + Send aligned right. flexWrap so a
+ narrow sidebar wraps the buttons onto a second row instead of
+ pushing Send off-screen. */}
<div style={{ display: 'flex', alignItems: 'center', gap: 6, rowGap: 6, flexWrap: 'wrap', minWidth: 0 }}>
- {agent.isGod && (
- <DelegateSwitch on={delegate} onToggle={() => setDelegate((d) => !d)} />
- )}
<span style={{ flex: 1 }} />
<PixelButton variant="secondary" size="sm" onClick={pickFiles}>
<span style={{ display: 'inline-flex', gap: 6, alignItems: 'center' }}>
@@ -473,45 +465,6 @@ function QueuedMessageRow(
);
}
-/**
- * A pixel-style toggle switch for the god/Michael delegation flag. ON prepends
- * DELEGATE_PREFIX to the enqueued message so Michael fans the task out to other
- * available agents (or does it himself one-by-one if none are free).
- */
-function DelegateSwitch({ on, onToggle }: { on: boolean; onToggle: () => void }) {
- return (
- <button
- type="button"
- role="switch"
- aria-checked={on}
- onClick={onToggle}
- title="When ON, Michael hands the task to other available agents (or does it himself one-by-one if none are free)."
- style={{
- display: 'inline-flex', alignItems: 'center', justifyContent: 'space-between', gap: 8,
- padding: '3px 6px', border: 'none', cursor: 'pointer', background: 'transparent',
- fontFamily: 'var(--cth-font-ui)', fontSize: 12,
- color: on ? 'var(--cth-ink-900)' : 'var(--cth-ink-700)'
- }}
- >
- <span>Delegate</span>
- {/* track */}
- <span style={{
- position: 'relative', flexShrink: 0, width: 28, height: 14,
- background: on ? 'var(--cth-lilac)' : 'var(--cth-cream-200)',
- boxShadow: `inset 0 0 0 1px ${on ? 'var(--cth-ink-900)' : 'var(--cth-ink-700)'}`,
- transition: 'background 120ms ease'
- }}>
- {/* knob */}
- <span style={{
- position: 'absolute', top: 2, left: on ? 16 : 2, width: 10, height: 10,
- background: 'var(--cth-paper-100)',
- boxShadow: '0 0 0 1px var(--cth-ink-300)',
- transition: 'left 120ms ease'
- }} />
- </span>
- </button>
- );
-}
/**
* Push-to-talk button for the queue composer. Click to start recording, click