AI media harness for planning, generating, and editing locally
TypeScript
Move agent spinner into stop button
Bitti04833c0d0974
diff --git a/src/components/workspace/AgentDock.test.tsx b/src/components/workspace/AgentDock.test.tsxindex baf4b42..c8d25f8 100644--- a/src/components/workspace/AgentDock.test.tsx+++ b/src/components/workspace/AgentDock.test.tsx@@ -141,7 +141,7 @@ describe("Slop output panel", () => {app.rerender(view(true));const log = screen.getByRole("log", { name: "Slop output" });expect(screen.getByRole("heading", { name: "Agent" })).toBeInTheDocument();- expect(screen.getByRole("img", { name: "Codex status: Processing" })).toHaveClass("agent-provider-light--busy");+ expect(screen.getByRole("img", { name: "Codex status: Processing" })).toHaveClass("agent-provider--ready");expect(screen.getByRole("textbox", { name: "Ask Slop about this generation queue" })).toHaveAttribute("rows", "2");expect(screen.getByRole("combobox", { name: "Agent provider" })).toHaveTextContent("Codex");expect(screen.getByRole("combobox", { name: "Agent provider" })).not.toHaveTextContent("Ready");diff --git a/src/components/workspace/AgentDock.tsx b/src/components/workspace/AgentDock.tsxindex 26ebf92..1276b86 100644--- a/src/components/workspace/AgentDock.tsx+++ b/src/components/workspace/AgentDock.tsx@@ -1,5 +1,5 @@import { listen } from "@tauri-apps/api/event";-import { ArrowUp, Check, ChevronDown, LoaderCircle, Square } from "lucide-react";+import { ArrowUp, Check, ChevronDown, LoaderCircle } from "lucide-react";import { useEffect, useId, useMemo, useRef, useState } from "react";import { describeDiagnosticError, errorContext, writeDiagnostic } from "../../lib/diagnostics";import { isTauri } from "../../lib/persistence";@@ -141,7 +141,7 @@ export function AgentDock({ context, record, providers, expanded, onPromptStart,</div>}<div className="agent-dock-row"><form className="agent-dock" onSubmit={(event) => { event.preventDefault(); void send(); }}>- {!expanded && <span className={`agent-provider-light agent-provider--${selected?.state ?? "unknown"}${requestId ? " agent-provider-light--busy" : ""}`} role="img" aria-label={providerStatusLabel}><i /></span>}+ {!expanded && <span className={`agent-provider-light agent-provider--${selected?.state ?? "unknown"}`} role="img" aria-label={providerStatusLabel}><i /></span>}<textareaaria-label={`Ask Slop about ${context}`}rows={expanded ? 2 : 1}@@ -159,9 +159,8 @@ export function AgentDock({ context, record, providers, expanded, onPromptStart,<div className="agent-dock__actions">{expanded && <AgentProviderSelector providers={providers} provider={provider} busy={Boolean(requestId)} statusLabel={providerStatusLabel} detail={blockedDetail} onChange={(next) => { setProvider(next); saveAgentProvider(next); }} />}{requestId- ? <button type="button" className="agent-cancel" onClick={() => void cancelAgentTurn(requestId)} aria-label="Cancel agent turn"><Square size={14} /></button>+ ? <button type="button" className="agent-cancel" onClick={() => void cancelAgentTurn(requestId)} aria-label="Cancel agent turn"><LoaderCircle className="agent-busy" size={16} aria-hidden="true" /></button>: <button type="submit" disabled={!prompt.trim() || !ready} aria-label="Send to Slop" title={ready ? "Send to Slop — or press Enter" : blockedDetail ?? "No agent provider is available"}><ArrowUp size={16} /></button>}- {requestId && <LoaderCircle className="agent-busy" size={16} />}</div></form></div>@@ -238,7 +237,7 @@ function AgentProviderSelector({ providers, provider, busy, statusLabel, detail,} else if (event.key === "Tab") setOpen(false);}}>- <span className={`agent-provider-light agent-provider--${selected?.state ?? "unknown"}${busy ? " agent-provider-light--busy" : ""}`} role="img" aria-label={statusLabel}><i /></span>+ <span className={`agent-provider-light agent-provider--${selected?.state ?? "unknown"}`} role="img" aria-label={statusLabel}><i /></span><span className="agent-provider__name">{selected?.label ?? "Choose LLM"}</span><ChevronDown size={14} aria-hidden="true" /></button>diff --git a/src/styles/workspace.css b/src/styles/workspace.cssindex e2c1eda..3f08c12 100644--- a/src/styles/workspace.css+++ b/src/styles/workspace.css@@ -384,7 +384,7 @@.agent-busy {flex: 0 0 auto;- color: var(--accent-bright);+ color: var(--danger);animation: spin 1.2s linear infinite;}@@ -517,17 +517,6 @@background: var(--text-faint);}-/* A solid dot has no visible rotational movement. While the provider is- working, turn it into an asymmetric ring so progress reads at a glance. */-.agent-provider-light--busy i {- box-sizing: border-box;- border: 2px solid var(--success-line);- border-top-color: var(--success);- background: transparent;- box-shadow: none;- animation: spin 0.8s linear infinite;-}-/* --- Conversation overlay -------------------------------------------------- */.agent-conversation {@@ -652,11 +641,6 @@animation-iteration-count: infinite !important;}- .agent-provider-light--busy i {- animation-duration: 0.8s !important;- animation-iteration-count: infinite !important;- }-.agent-conversation__waiting-dots i {animation-duration: 1.1s !important;animation-iteration-count: infinite !important;