AI media harness for planning, generating, and editing locally
TypeScript
Work queue and Agent buttons spin an accent arc while working
Bittid9c7e7589969
diff --git a/src/App.tsx b/src/App.tsxindex fb7392f..15b31f3 100644--- a/src/App.tsx+++ b/src/App.tsx@@ -147,6 +147,10 @@ function App() {void reportGenerationJobs(JSON.parse(guardKey) as GuardJob[]).catch(() => undefined);}, [guardKey]);const queueCount = guardJobs.length + Number(weightDownloadActive);+ /* Something is being worked on right now, not merely waiting its turn:+ a generation or icon past the queue, an export, a weight download. */+ const queueBusy = weightDownloadActive || exportingName !== null+ || workItems.some((item) => isWorkActive(item) && item.status !== "queued");useEffect(() => {void listRecentProjects()@@ -304,8 +308,8 @@ function App() {? <ReferenceIconGenerationDialog count={iconConfirmationCount} onAnswer={workQueue.answerIconConfirmation} /> : null;const queueTrigger = (ref: RefObject<HTMLButtonElement>) => (- <button ref={ref} type="button" className="icon-button titlebar-command" onClick={() => setWorkQueueOpen((open) => !open)}- aria-label="Work queue" aria-haspopup="dialog" aria-expanded={workQueueOpen} data-tooltip={queueCount ? `Work queue · ${queueCount} running or queued` : "Work queue"}>+ <button ref={ref} type="button" className={`icon-button titlebar-command${queueBusy ? " icon-button--busy" : ""}`} onClick={() => setWorkQueueOpen((open) => !open)}+ aria-label="Work queue" aria-haspopup="dialog" aria-expanded={workQueueOpen} aria-busy={queueBusy} data-tooltip={queueCount ? `Work queue · ${queueCount} running or queued` : queueBusy ? "Work queue · working" : "Work queue"}><WorkQueue16 aria-hidden="true" />{queueCount > 0 && <InfoBadge className="titlebar-command__badge" value={queueCount} />}</button>diff --git a/src/components/ProjectWorkspace.tsx b/src/components/ProjectWorkspace.tsxindex 3f25e77..e7079ec 100644--- a/src/components/ProjectWorkspace.tsx+++ b/src/components/ProjectWorkspace.tsx@@ -134,6 +134,7 @@ export function ProjectWorkspace({ project, initialView = "timeline", runtime =return initialView === "agent" || initialView === "editor" ? "timeline" : initialView;});const [agentOpen, setAgentOpenState] = useState(() => initialView === "agent" || readAgentPane());+ const [agentBusy, setAgentBusy] = useState(false);const setAgentOpen = (open: boolean) => { setAgentOpenState(open); writeAgentPane(open); };/* 360px is a comfortable conversation column, but at the 900px windowminimum it would take 40% of the width from the editor. The pane gives@@ -252,7 +253,7 @@ export function ProjectWorkspace({ project, initialView = "timeline", runtime =</button></div><span className="titlebar-separator" aria-hidden="true" />- <button ref={agentToggle} type="button" className={`icon-button${agentOpen ? " icon-button--checked" : ""}`} aria-label="Agent" aria-pressed={agentOpen} aria-controls={`${panelId}-agent`} data-tooltip={agentOpen ? "Hide agent" : "Show agent"} data-tooltip-shortcut="Ctrl+Shift+A" aria-keyshortcuts="Control+Shift+A" onClick={toggleAgent}>{agentOpen ? <Agent16Filled /> : <Agent16 />}</button>+ <button ref={agentToggle} type="button" className={`icon-button${agentOpen ? " icon-button--checked" : ""}${agentBusy ? " icon-button--busy" : ""}`} aria-label="Agent" aria-pressed={agentOpen} aria-busy={agentBusy} aria-controls={`${panelId}-agent`} data-tooltip={`${agentOpen ? "Hide agent" : "Show agent"}${agentBusy ? " · working" : ""}`} data-tooltip-shortcut="Ctrl+Shift+A" aria-keyshortcuts="Control+Shift+A" onClick={toggleAgent}>{agentOpen ? <Agent16Filled /> : <Agent16 />}</button>{titleBarActions}</>}>@@ -297,6 +298,7 @@ export function ProjectWorkspace({ project, initialView = "timeline", runtime =providers={runtime?.providers ?? CHECKING_PROVIDERS}onClose={() => { setAgentOpen(false); agentToggle.current?.focus(); }}onPromptStart={() => { if (!agentOpen) setAgentOpen(true); }}+ onBusyChange={setAgentBusy}/* The provider only proposes typed commands. Apply them to the session'slatest state—edits can continue while it thinks—as one undo step, thenroute the result through the same ordered save queue as the Save button. */diff --git a/src/components/workspace/AgentDock.tsx b/src/components/workspace/AgentDock.tsxindex a816aa5..e5ab857 100644--- a/src/components/workspace/AgentDock.tsx+++ b/src/components/workspace/AgentDock.tsx@@ -34,7 +34,7 @@ interface AgentActivity {* workspace. `onClose` wires the header's close button to it; without it the* button is not shown. `expanded` is accepted for compatibility and no longer* changes the layout: the pane is always the full conversation. */-export function AgentDock({ context, record, providers, onPromptStart, onCommands, onClose }: {+export function AgentDock({ context, record, providers, onPromptStart, onCommands, onClose, onBusyChange }: {context: string;record: ProjectRecord;providers: ProviderStatus[];@@ -44,6 +44,8 @@ export function AgentDock({ context, record, providers, onPromptStart, onCommandonCommands: (commands: ProjectCommand[]) => Promise<void>;/** Hide the pane (the header's × button). */onClose?: () => void;+ /** Told when a turn starts and ends, so the Agent toggle can show it. */+ onBusyChange?: (busy: boolean) => void;}) {const configured = loadAgentProvider() ?? record.config.providerSettings.agent?.options.selectedProvider;const initial = providers.some((item) => item.id === configured)@@ -58,6 +60,8 @@ export function AgentDock({ context, record, providers, onPromptStart, onCommandconst [pendingPrompt, setPendingPrompt] = useState<string | null>(null);const [sessionMessages, setSessionMessages] = useState<AgentMessage[]>([]);const activeRequest = useRef<string | null>(null);+ const busy = requestId !== null;+ useEffect(() => { onBusyChange?.(busy); }, [busy, onBusyChange]);const conversation = useRef<HTMLDivElement | null>(null);const field = useRef<HTMLTextAreaElement | null>(null);const cancelButton = useRef<HTMLButtonElement | null>(null);diff --git a/src/styles/controls.css b/src/styles/controls.cssindex f0d8cc6..6415c51 100644--- a/src/styles/controls.css+++ b/src/styles/controls.css@@ -103,6 +103,24 @@color: var(--text-disabled);}+/* An icon button whose work is under way (the Work queue while a job runs,+ the Agent toggle during a turn): an accent arc turns around the glyph,+ the indeterminate ProgressRing's motion at the button's size. */+.icon-button--busy {+ position: relative;+}++.icon-button--busy::before {+ content: "";+ position: absolute;+ inset: 3px;+ border: 2px solid transparent;+ border-top-color: var(--accent);+ border-radius: 50%;+ animation: spin 0.9s linear infinite;+ pointer-events: none;+}+/* A toggle icon button that is on (.icon-button--checked / aria-pressed)takes the shared on-state in ui.css ("Toggle on-state"). */