Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
feat(agentic-ide): make the pane status badges live instead of five seconds late
rubenluetke10-beep3b3f76bd89d4
diff --git a/jarvis/ui/web/agentic_ide_routes.py b/jarvis/ui/web/agentic_ide_routes.pyindex 0c8f6fef5f..6e120e55a5 100644--- a/jarvis/ui/web/agentic_ide_routes.py+++ b/jarvis/ui/web/agentic_ide_routes.py@@ -125,6 +125,7 @@ router = APIRouter(prefix="/api/agentic-ide", tags=["agentic-ide"])#: than waited for indefinitely.SPAWN_READY_TIMEOUT_S = 20.0+async def _announce_coding_mode(request: Request) -> None:"""Tell every connected client what the coding mode is NOW.@@ -653,9 +654,7 @@ class ResumeWorkspace(BaseModel):session_id: str = ""folder: str = ""folder_name: str = ""- name: str = Field(- default="", description="The label the user gave this tab, if any."- )+ name: str = Field(default="", description="The label the user gave this tab, if any.")folder_exists: bool = Falseavailable: bool = Field(description="False when the folder is gone or none of its CLIs are installed."@@ -828,9 +827,7 @@ class InterruptedResponse(BaseModel):continuable_count: int = Field(default=0, description="How many of them can be continued right now.")- prompt: str = Field(- default="", description="The instruction the continue action would send."- )+ prompt: str = Field(default="", description="The instruction the continue action would send.")panes: list[InterruptedPane] = Field(default_factory=list)@@ -958,6 +955,47 @@ class RecapsResponse(BaseModel):terminals: list[TerminalRecap] = Field(default_factory=list)+class TerminalActivity(BaseModel):+ """What one pane is DOING, and nothing about what it is doing it about.++ The skinny sibling of :class:`TerminalRecap`: the recap poll also schedules+ a summarizer pass over every pane's transcript, which is why it runs on a+ relaxed clock — and why the status badge that rode on it always lagged the+ pane by several seconds. This row costs one look at the pane's stamped+ reading, so it can be polled fast enough for the badge to feel live.+ """++ key: str+ name: str+ status: str = Field(+ description="The pane's process status: 'pending', 'live', 'exited' or 'error'."+ )+ activity: str = Field(+ default="",+ description=(+ "Whether this pane's agent is still on the job: 'working', "+ "'waiting', 'asking', 'starting', 'exited' or 'failed'. Empty for "+ "a plain terminal, which runs no agent. Same reading as /recaps."+ ),+ )+ activity_since: float = Field(+ default=0.0,+ description="When the pane entered that state (epoch seconds). 0 when unknown.",+ )+ worked: bool = Field(+ default=False,+ description=(+ "Has anything ever been asked of this pane — an instruction sent "+ "to it, or the conversation it resumed?"+ ),+ )+++class ActivityResponse(BaseModel):+ workspace_id: str | None = None+ terminals: list[TerminalActivity] = Field(default_factory=list)++class LastPrompt(BaseModel):"""The exact text a pane was last handed — the receipt, in full.@@ -1957,9 +1995,7 @@ async def move_terminal(name: str, req: MoveTerminalRequest) -> dict:Dropping a pane onto itself succeeds and changes nothing."""try:- term = await get_registry().move_terminal(- name, target=req.target, position=req.position- )+ term = await get_registry().move_terminal(name, target=req.target, position=req.position)except SessionError as exc:# Three different fixes on the caller's side, so three different codes:# a position this grid cannot express is a bad request, a workspace that@@ -2113,6 +2149,47 @@ async def get_recaps(workspace_id: str | None = None) -> RecapsResponse:return RecapsResponse(workspace_id=session.id, terminals=rows)+ "/activity",+ response_model=ActivityResponse,+ summary="Whether each pane's agent is still working",+)+async def get_activity(workspace_id: str | None = None) -> ActivityResponse:+ """The status badge's own read — every pane's activity, and nothing else.++ Split from ``/recaps`` for the same reason ``/recaps`` is split from+ ``/state``: the two change on different clocks and cost different amounts.+ A recap is a sentence and scheduling one walks the transcript through the+ summarizer, so that poll is deliberately relaxed — which left the badge+ beside it reporting "working" seconds after a pane had visibly started.+ This read is one stamped word per pane, cheap enough to poll every second+ or two, so the badge can keep up with the pane it describes.++ Same conventions as ``/recaps``: without ``workspace_id`` the workspace on+ screen answers, and an unknown or closed one comes back empty rather than+ as an error — a poll that outlives its workspace is normal.+ """+ session = get_registry().get(workspace_id)+ if session is None:+ return ActivityResponse(workspace_id=None, terminals=[])+ rows: list[TerminalActivity] = []+ for term in session.terminals:+ # The pane's own stamped reading — the same source /recaps reports, so+ # the fast poll and the slow one can never disagree about a pane.+ reading = term.reading()+ rows.append(+ TerminalActivity(+ key=term.key,+ name=term.name,+ status=term.status,+ activity=reading.activity,+ activity_since=reading.since,+ worked=has_work_behind_it(term),+ )+ )+ return ActivityResponse(workspace_id=session.id, terminals=rows)++def _recap_row(term: Terminal, summary: recap_engine.SmartRecap) -> TerminalRecap:"""One pane's recap as every recap route reports it.@@ -2271,9 +2348,7 @@ async def get_last_prompt(name: str, workspace_id: str | None = None) -> LastProresponse_model=PromptHistoryResponse,summary="Every prompt sent to one terminal",)-async def get_prompt_history(- name: str, workspace_id: str | None = None-) -> PromptHistoryResponse:+async def get_prompt_history(name: str, workspace_id: str | None = None) -> PromptHistoryResponse:"""Read every exact prompt handed to this pane, newest first.Prompt bodies live outside the workspace snapshot and are loaded only for@@ -2312,9 +2387,7 @@ def _terminal_or_http_error(name: str) -> tuple[Session, Terminal]:if not registry.sessions:raise HTTPException(status_code=409, detail="No Agentic-IDE session is running.")known = ", ".join(t.name for s in registry.sessions for t in s.terminals) or "none"- raise HTTPException(- status_code=404, detail=f"No terminal called {name!r}. Running: {known}."- )+ raise HTTPException(status_code=404, detail=f"No terminal called {name!r}. Running: {known}.")@router.get("/terminals/{name}/report", summary="What one terminal is doing")@@ -2412,10 +2485,7 @@ async def all_terminal_voice_attachments() -> dict:"terminal": term.name,"batch_id": batch.batch_id,"files": list(batch.files),- "reserved": (- batch.batch_id- in term.pending_prompt_attachment_reservations- ),+ "reserved": (batch.batch_id in term.pending_prompt_attachment_reservations),}for batch in term.pending_prompt_attachment_batches)@@ -2439,9 +2509,7 @@ async def terminal_voice_attachments(name: str) -> dict:{"batch_id": batch.batch_id,"files": list(batch.files),- "reserved": (- batch.batch_id in term.pending_prompt_attachment_reservations- ),+ "reserved": (batch.batch_id in term.pending_prompt_attachment_reservations),}for batch in term.pending_prompt_attachment_batches]@@ -2466,9 +2534,7 @@ async def remove_terminal_voice_attachments(name: str, batch_id: str) -> dict:)before = len(term.pending_prompt_attachment_batches)term.pending_prompt_attachment_batches[:] = [- batch- for batch in term.pending_prompt_attachment_batches- if batch.batch_id != batch_id+ batch for batch in term.pending_prompt_attachment_batches if batch.batch_id != batch_id]removed = len(term.pending_prompt_attachment_batches) != beforereturn {"terminal": term.name, "batch_id": batch_id, "removed": removed}@@ -2627,9 +2693,7 @@ async def terminal_attach(voice_batch: PendingPromptAttachmentBatch | None = Noneif stage_for_voice and analysis_items:try:- voice_batch = await prompt_attachments.enqueue(- term, analysis_items, stored_names- )+ voice_batch = await prompt_attachments.enqueue(term, analysis_items, stored_names)except prompt_attachments.PromptAttachmentQueueFull as exc:raise HTTPException(status_code=409, detail=str(exc)) from exc@@ -2766,9 +2830,7 @@ async def fanout(request: Request, req: FanOutRequest) -> dict:from jarvis.core.events import NavigateSidebarawait bus.publish(- NavigateSidebar(- section="agentic-ide", source_layer="agentic_ide_routes"- )+ NavigateSidebar(section="agentic-ide", source_layer="agentic_ide_routes"))except Exception as exc: # noqa: BLE001 - notification is not the worklog.debug("AgenticIdeTerminalsAdded publish failed: %s", exc)@@ -2901,7 +2963,9 @@ def _unknown_terminal_detail(registry: object, wanted: str) -> str:call-sign it was actually given."""running = ", ".join(- t.name for s in registry.sessions for t in s.terminals # type: ignore[attr-defined]+ t.name+ for s in registry.sessions+ for t in s.terminals # type: ignore[attr-defined])return (f"No terminal called {wanted!r}. Running: {running or 'none'}. "@@ -2910,7 +2974,7 @@ def _unknown_terminal_detail(registry: object, wanted: str) -> str:"produce this name and retrying this ""prompt after a spawn fails the same way. Either prompt one of the ""panes listed above, or open and brief a new one in ONE call: "- "POST /api/agentic-ide/fanout with spawn=[{\"count\": 1}] and the "+ 'POST /api/agentic-ide/fanout with spawn=[{"count": 1}] and the '"instruction.")@@ -2944,17 +3008,14 @@ async def terminal_prompt(request: Request, name: str, req: PromptRequest) -> di# one cause — and neither of them said what to do about it.found = registry.find_terminal(name)if found is None:- raise HTTPException(- status_code=404, detail=_unknown_terminal_detail(registry, name)- )+ raise HTTPException(status_code=404, detail=_unknown_terminal_detail(registry, name))async def _compose_and_send() -> dict:text = req.promptcomposed_by = "raw"files: list[str] = []attachments = [- drop_analysis.DropAnalysis.from_dict(a.model_dump())- for a in req.attachments+ drop_analysis.DropAnalysis.from_dict(a.model_dump()) for a in req.attachments]if req.compose:from jarvis.agentic_ide.prompt_composer import compose as compose_prompt@@ -2968,9 +3029,7 @@ async def terminal_prompt(request: Request, name: str, req: PromptRequest) -> direq.prompt,session=session,terminal_name=term_for_compose.name,- agent_display=AGENT_DISPLAY.get(- term_for_compose.agent, term_for_compose.agent- ),+ agent_display=AGENT_DISPLAY.get(term_for_compose.agent, term_for_compose.agent),attachments=attachments,)text, composed_by, files = result.text, result.composed_by, result.files@@ -3409,8 +3468,7 @@ class PromptWriterState(BaseModel):class PromptWriterRequest(BaseModel):prompt_writer: str = Field(description=(- "'auto', 'subscription', 'api', or a specific brain provider id "- "from the options list."+ "'auto', 'subscription', 'api', or a specific brain provider id from the options list."))@@ -3548,9 +3606,7 @@ def _writer_options() -> list[PromptWriterOption]:]for provider, connected in candidates:options.append(- PromptWriterOption(- id=provider, label=_provider_label(provider), connected=connected- )+ PromptWriterOption(id=provider, label=_provider_label(provider), connected=connected))return options@@ -3562,9 +3618,7 @@ def _writer_options() -> list[PromptWriterOption]:)async def prompt_writer_state() -> PromptWriterState:"""Report the configured brief writer and every option, with live state."""- return PromptWriterState(- prompt_writer=_current_prompt_writer(), options=_writer_options()- )+ return PromptWriterState(prompt_writer=_current_prompt_writer(), options=_writer_options())@router.put(diff --git a/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.test.tsxindex 02943bb493..cc6992a6a1 100644--- a/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.test.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.test.tsx@@ -46,6 +46,11 @@ vi.mock("@/lib/agenticIdeApi", () => ({workspace_id: "ide_test",terminals: [],})),+ // The status badges' fast poll — one stamped word per pane, no recap.+ fetchTerminalActivity: vi.fn(async () => ({+ workspace_id: "ide_test",+ terminals: [],+ })),promptTerminal: vi.fn(),// Reached from the toolbar's settings panel, which the grid always renders.setIdeActiveAccount: vi.fn(),@@ -2042,6 +2047,35 @@ describe("session recaps", () => {),);});++ it("asks the fast activity feed too, and wears its answer on the badge", async () => {+ // The badge has its own poll beside the recap one — one stamped word per+ // pane, quick enough that a pane that starts working is SEEN to start+ // working rather than reported a recap-interval later.+ vi.mocked(api.fetchTerminalActivity).mockResolvedValue({+ workspace_id: "ide_test",+ terminals: [+ {+ key: "mika",+ name: "Mika",+ status: "live",+ activity: "working",+ activity_since: 0,+ worked: true,+ },+ ],+ });++ renderGrid();++ await waitFor(() =>+ expect(api.fetchTerminalActivity).toHaveBeenCalledWith("ide_test"),+ );+ await waitFor(() => {+ const badges = screen.getAllByTestId("pane-activity");+ expect(badges.some((badge) => badge.dataset.activity === "working")).toBe(true);+ });+ });});/*diff --git a/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.tsx b/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.tsxindex f122e28288..0b97f6b6ce 100644--- a/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.tsx@@ -91,6 +91,7 @@ import {composePrompt,moveTerminal,clearTerminalRecap,+ fetchTerminalActivity,fetchTerminalRecaps,fetchTerminalUiPreferences,refreshTerminalRecap,@@ -105,6 +106,7 @@ import {type IdeState,type PaneNotification,type SessionState,+ type TerminalActivityRow,type TerminalRecap,type TerminalState,} from "@/lib/agenticIdeApi";@@ -288,6 +290,31 @@ const ZONE_BOX: Record<DropZone, string> = {*/const RECAP_POLL_MS = 5000;+/**+ * How often the status badges re-read whether each agent is still working.+ *+ * Much faster than the recap poll, and that gap is the point: the recap is a+ * SENTENCE and costs a transcript walk per pane, so five seconds is right for+ * it — but the badge is one word, `/activity` answers it from a stamp without+ * touching the transcript, and a badge that flips five-plus seconds after the+ * pane visibly started reads as broken (maintainer report 2026-08-07). Shares+ * the recap poll's visibility gate: hidden badges are not glanced at either.+ */+const ACTIVITY_POLL_MS = 1500;++/**+ * How long a just-sent prompt is allowed to claim "working" on its own.+ *+ * The backend only reports `working` once the pane's screen MOVES, and an+ * agent can sit for a few seconds between receiving a prompt and painting+ * anything. Without this bridge the badge stays on "done" after Send, which+ * reads as a send that did not happen. Long enough to cover a slow first+ * paint, short enough that a prompt the agent truly swallowed goes back to+ * telling the truth. The backend's own reading takes over the moment it says+ * `working` — see `activityOf`.+ */+const SENT_BRIDGE_MS = 12_000;+/** How tall the prompt bar is — dragged by its top edge, and remembered.*@@ -851,22 +878,118 @@ export function AgenticGrid({};}, [session.id, pollRecaps]);+ /*+ * The badges' own fast feed — whether each pane's agent is still working.+ *+ * Kept apart from the recap poll above for the same reason that one is kept+ * apart from the workspace state: different clocks. `/activity` is one+ * stamped word per pane, so it can run every second and a half and the badge+ * flips within a beat of the pane — where the recap poll left it wrong for+ * up to five seconds, which on a list of a dozen agents reads as a broken+ * indicator rather than a slow one. Same workspace guard as the recap cache:+ * call-signs repeat between workspaces.+ */+ const [activityCache, setActivityCache] = useState<{+ workspaceId: string;+ rows: Record<string, TerminalActivityRow>;+ }>(() => ({ workspaceId: session.id, rows: {} }));+ const liveActivity: Record<string, TerminalActivityRow> =+ activityCache.workspaceId === session.id ? activityCache.rows : {};++ /*+ * When each pane was last handed a prompt from THIS window, epoch ms.+ *+ * The optimistic half of the badge: the moment Send succeeds the pane is+ * shown as working, because the user just watched themselves put work in+ * front of it — waiting for the screen-movement proof to round-trip made+ * every send look ignored for several seconds. The backend's reading takes+ * over as soon as it confirms (the entry is dropped), and the entry expires+ * after `SENT_BRIDGE_MS` so a prompt that truly went nowhere stops lying.+ */+ const [sentAt, setSentAt] = useState<Record<string, number>>({});++ useEffect(() => {+ if (!pollRecaps) return;+ let cancelled = false;+ let pulling = false;+ const pull = async () => {+ if (pulling) return;+ pulling = true;+ try {+ const answer = await fetchTerminalActivity(session.id);+ if (cancelled) return;+ const next = Object.fromEntries(answer.terminals.map((row) => [row.name, row]));+ setActivityCache({ workspaceId: session.id, rows: next });+ // The backend has seen these panes working: its reading is now the+ // truer one, so the optimistic bridge behind it is finished.+ setSentAt((current) => {+ const keep = Object.entries(current).filter(+ ([name]) => next[name]?.activity !== "working",+ );+ return keep.length === Object.keys(current).length+ ? current+ : Object.fromEntries(keep);+ });+ } catch {+ // The recap poll warns for both feeds; a second warning per tick from+ // the fast poll would only drown it.+ } finally {+ pulling = false;+ }+ };+ void pull();+ const timer = window.setInterval(() => void pull(), ACTIVITY_POLL_MS);+ return () => {+ cancelled = true;+ window.clearInterval(timer);+ };+ }, [session.id, pollRecaps]);+/** Is this pane's agent still working, or has it stopped?*- * The same two sources as the recap beside it, for the same reason: the- * workspace state carries an opening value so a pane never renders a blank- * badge, and the five-second poll keeps it true from then on. Both come- * straight from the pane — nothing is derived here, or two views of one- * terminal would disagree about whether it is busy.+ * Three sources, freshest first: the fast `/activity` poll, the recap poll,+ * and the opening value the workspace state carried — so a pane never+ * renders a blank badge, and never renders a stale one for longer than the+ * fast poll's beat. All three come straight from the pane; nothing is+ * derived here, or two views of one terminal would disagree.+ *+ * On top of that sits the one honest local claim: a prompt THIS window just+ * delivered. The backend cannot know about it until the pane's screen moves,+ * and the user cannot un-know it — see `sentAt`.*/const activityOf = (term: TerminalState) => {+ const live = liveActivity[term.name];const row = recaps[term.name];- return {- activity: row?.activity ?? term.activity ?? "",- since: row?.activity_since ?? term.activity_since ?? 0,- worked: row?.worked ?? term.worked ?? false,- };+ const activity = live?.activity ?? row?.activity ?? term.activity ?? "";+ const since = live?.activity_since ?? row?.activity_since ?? term.activity_since ?? 0;+ const worked = live?.worked ?? row?.worked ?? term.worked ?? false;+ const sent = sentAt[term.name];+ const bridging =+ sent !== undefined &&+ Date.now() - sent < SENT_BRIDGE_MS &&+ (activity === "waiting" || activity === "asking" || activity === "");+ if (bridging) {+ return { activity: "working" as const, since: sent / 1000, worked: true };+ }+ return { activity, since, worked };+ };++ /*+ * The status the badge leans on when this window has no socket view yet.+ *+ * `statuses` is written by each pane's own socket, which exists only after+ * the pane has mounted and connected — so on the first seconds of a+ * workspace (and for panes a view keeps off screen) the rail showed a grey+ * "connecting" spinner for terminals the backend already reported live. The+ * backend's word is the truthful fallback; "connecting" stays only for a+ * pane nobody knows anything about yet.+ */+ const statusOf = (term: TerminalState) => {+ const socket = statuses[term.name];+ if (socket) return socket;+ const backend = liveActivity[term.name]?.status ?? term.status;+ return backend ? { status: backend as PaneStatus, detail: undefined } : undefined;};/*@@ -1559,6 +1682,12 @@ export function AgenticGrid({? { ...current, rows: rekey(current.rows, from, to) }: current,);+ setActivityCache((current) =>+ current.workspaceId === session.id+ ? { ...current, rows: rekey(current.rows, from, to) }+ : current,+ );+ setSentAt((current) => rekey(current, from, to));setRestartTokens((current) => rekey(current, from, to));// The pane's dragged height is keyed by call-sign too, and the basis// map is what stops the remap effect from reading a rename as "one@@ -1755,6 +1884,13 @@ export function AgenticGrid({setPreviewSource("");replacePrompt("");setAttachments([]);+ // The pane's badge flips to "working" NOW, not when the poll catches the+ // screen moving: the user just watched this send succeed, and a badge+ // still saying "done" for the next several seconds reads as a send that+ // silently failed. See `sentAt` for how the backend takes back over.+ if (!result || result.submitted !== false) {+ setSentAt((current) => ({ ...current, [target]: Date.now() }));+ }// The text is typed either way — but if the agent did not accept it, say// so instead of leaving the user to wonder why nothing happened.if (result && result.submitted === false) {@@ -2214,7 +2350,7 @@ export function AgenticGrid({</div>{railTerminals.map((term) => {- const state = statuses[term.name];+ const state = statusOf(term);const headline = recaps[term.name]?.recap ?? term.recap;const title =headline?.trim() ||@@ -2756,7 +2892,7 @@ export function AgenticGrid({busy enough to need them. */}<div className="flex shrink-0 items-stretch gap-0.5 overflow-x-auto border-b border-border/60 px-1.5 scrollbar-jarvis">{session.terminals.filter(takesPrompts).map((term) => {- const state = statuses[term.name];+ const state = statusOf(term);const picked = target === term.name;return (<buttondiff --git a/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.test.tsxindex c288ca748c..8458c6fd90 100644--- a/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.test.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.test.tsx@@ -50,10 +50,13 @@ describe("what the badge shows", () => {it("keeps blue for the one state that wants something from you now", () => {// The only pane in the list that is neither busy nor simply finished, so- // it is the only one worth spending a second colour on.+ // it is the only one worth spending a second colour on — and the only+ // still state allowed to wave: a beacon is a still dot with a radiating+ // halo, which reads as a notification rather than as the spinner's+ // grinding.const badge = pill({ status: "live", activity: "asking" });expect(badge.textContent).toBe("");- expect(badge.getAttribute("data-icon")).toBe("dot");+ expect(badge.getAttribute("data-icon")).toBe("beacon");expect(badge.className).toContain("text-sky-400");});diff --git a/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.tsx b/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.tsxindex 6ae814dc4b..6abff59a43 100644--- a/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.tsx@@ -67,7 +67,13 @@ import type { PaneActivity } from "@/lib/agenticIdeApi";type Look = {label: string;className: string;- icon: "spinner" | "dot" | "ring" | "alert";+ icon: "spinner" | "dot" | "ring" | "alert" | "beacon";+ /**+ * A soft halo of the dot's own colour. Spent on exactly one state — a+ * finished job — so the one row holding something for you glows and the+ * grey ones (exited, a plain shell) stay matte.+ */+ glow?: boolean;/** The sentence behind the badge, minus the timing clause. */hint: string;};@@ -97,7 +103,14 @@ const LOOK: Record<Exclude<PaneActivity, "" | "waiting">, Look> = {asking: {label: "needs you",className: "text-sky-400",- icon: "dot",+ /*+ * The one deliberate exception to "motion means busy": a slow radiating+ * ring around a STILL dot. It does not share the spinner's silhouette —+ * rotation reads as grinding, a ping reads as a notification — and this is+ * the single state in the list that wants an action from the user right+ * now, so it is the single one allowed to wave.+ */+ icon: "beacon",hint: "Stopped with a question on screen. It is waiting for your answer.",},exited: {@@ -118,6 +131,7 @@ const DONE: Look = {label: "done",className: "text-amber-400",icon: "dot",+ glow: true,hint: "Finished and waiting at its prompt. That it stopped, not that the work is right.",};@@ -208,7 +222,24 @@ function Icon({ look }: { look: Look }) {if (look.icon === "spinner")return <Loader2 className="h-3 w-3 animate-spin motion-reduce:animate-none" />;if (look.icon === "dot")- return <span className="h-2 w-2 rounded-full bg-current" aria-hidden="true" />;+ return (+ <span+ className={cn(+ "h-2 w-2 rounded-full bg-current",+ look.glow && "shadow-[0_0_5px_currentColor]",+ )}+ aria-hidden="true"+ />+ );+ if (look.icon === "beacon")+ return (+ <span className="relative flex h-2 w-2" aria-hidden="true">+ {/* The halo — a slow ping, hidden for anyone who asked their OS for+ less motion; the still dot underneath carries the state alone. */}+ <span className="absolute inset-0 animate-ping rounded-full bg-current opacity-60 [animation-duration:1.8s] motion-reduce:hidden" />+ <span className="relative h-2 w-2 rounded-full bg-current shadow-[0_0_5px_currentColor]" />+ </span>+ );if (look.icon === "ring")return (<span@@ -254,13 +285,22 @@ export function PaneActivityPill({data-activity={activity || status}data-icon={look.icon}className={cn(- "flex h-4 w-4 shrink-0 items-center justify-center",+ "flex h-4 w-4 shrink-0 items-center justify-center transition-colors duration-300",look.className,)}title={title}aria-label={`${look.label}. ${title}`}>- <Icon look={look} />+ {/* Keyed by the shape it is changing TO, so a state change replaces the+ icon and plays one short zoom-in — the flip from spinner to dot is+ the news the whole badge exists for, and a 200 ms pop is what makes+ it visible in the corner of the eye without adding standing motion. */}+ <span+ key={look.icon}+ className="flex items-center justify-center animate-in fade-in zoom-in-50 duration-200 motion-reduce:animate-none"+ >+ <Icon look={look} />+ </span></span>);}diff --git a/jarvis/ui/web/frontend/src/lib/agenticIdeApi.ts b/jarvis/ui/web/frontend/src/lib/agenticIdeApi.tsindex 4285cedfb6..97e76b0461 100644--- a/jarvis/ui/web/frontend/src/lib/agenticIdeApi.ts+++ b/jarvis/ui/web/frontend/src/lib/agenticIdeApi.ts@@ -238,6 +238,33 @@ export interface RecapsResponse {terminals: TerminalRecap[];}+/**+ * What one pane is DOING, and nothing about what it is doing it about.+ *+ * The skinny sibling of `TerminalRecap`, for the poll behind the status badge:+ * the recap poll also schedules a summarizer pass per pane, so it runs on a+ * relaxed clock — and a badge that only learns "working" on that clock trails+ * the pane it describes by several seconds. This row is one stamped word per+ * pane and is cheap enough to poll fast.+ */+export interface TerminalActivityRow {+ key: string;+ name: string;+ /** The pane's process status: `pending`, `live`, `exited` or `error`. */+ status: string;+ activity?: PaneActivity;+ /** When it entered that state (epoch seconds); 0 when unknown. */+ activity_since?: number;+ /** Has anything ever been asked of this pane? */+ worked?: boolean;+}++export interface ActivityResponse {+ /** Which workspace answered; null when none is on screen. */+ workspace_id: string | null;+ terminals: TerminalActivityRow[];+}+export interface SessionState {id: string;folder: string;@@ -486,6 +513,23 @@ export function fetchTerminalRecaps(return getJson<RecapsResponse>(`/api/agentic-ide/recaps${query}`);}+/**+ * Whether each pane's agent is still working — the status badge's fast poll.+ *+ * Split from `fetchTerminalRecaps` the way that one is split from+ * `fetchIdeState`: a recap costs a walk of the pane's transcript, this costs a+ * look at one stamped word, so this one may run every second or two while the+ * recaps keep their relaxed clock.+ */+export function fetchTerminalActivity(+ workspaceId?: string,+): Promise<ActivityResponse> {+ const query = workspaceId+ ? `?workspace_id=${encodeURIComponent(workspaceId)}`+ : "";+ return getJson<ActivityResponse>(`/api/agentic-ide/activity${query}`);+}+/** The exact prompt a pane was last sent, as `/terminals/{name}/prompt` reports it. */export interface LastPrompt {name: string;diff --git a/tests/unit/agentic_ide/test_activity_route.py b/tests/unit/agentic_ide/test_activity_route.pynew file mode 100644index 0000000000..5132f08224--- /dev/null+++ b/tests/unit/agentic_ide/test_activity_route.py@@ -0,0 +1,98 @@+"""`GET /api/agentic-ide/activity` — the status badge's fast poll.++The route exists so the badge can be polled every second or two without+dragging the recap summarizer along, so the properties pinned here are the+contract ones: it answers for the workspace asked for, it never raises when the+workspace is gone, and it reports the SAME reading the recap poll reports —+two polls disagreeing about one pane is worse than either being slow.+"""++from __future__ import annotations++import time++import pytest+from fastapi import FastAPI+from fastapi.testclient import TestClient++from jarvis.agentic_ide import recap_engine+from jarvis.agentic_ide import session as ide+from jarvis.ui.web import agentic_ide_routes+++def client() -> TestClient:+ ide.reset_registry()+ recap_engine.reset_for_tests()+ app = FastAPI()+ app.include_router(agentic_ide_routes.router)+ with TestClient(app) as test_client:+ yield test_client+ ide.reset_registry()+ recap_engine.reset_for_tests()+++def _workspace(tmp_path, name: str = "Mika") -> ide.Session:+ """One open workspace holding a single pane, without spawning anything."""+ registry = ide.get_registry()+ session = ide.Session(+ id="ide_test",+ folder=str(tmp_path),+ name="Test",+ profile=ide.probe_project(tmp_path),+ terminals=[+ ide.Terminal(+ key=name.lower(),+ name=name,+ agent="claude",+ display_name="Claude Code",+ index=0,+ )+ ],+ created_at=0.0,+ )+ registry._sessions[session.id] = session # noqa: SLF001 - no spawn in a unit test+ registry._active = session.id # noqa: SLF001+ return session+++def test_activity_reports_every_pane_of_the_open_workspace(client, tmp_path) -> None:+ session = _workspace(tmp_path)+ term = session.terminals[0]+ term.status = "live"+ term.pty_id = "pty-1"+ term.last_submit_at = time.time()++ body = client.get("/api/agentic-ide/activity").json()++ assert body["workspace_id"] == session.id+ assert len(body["terminals"]) == 1+ row = body["terminals"][0]+ assert row["name"] == "Mika"+ assert row["status"] == "live"+ # An instruction was submitted, so the pane has work behind it — the half+ # that separates "finished" from "never asked for anything".+ assert row["worked"] is True+ assert row["activity"] in {"working", "waiting", "asking"}+++def test_the_fast_poll_and_the_recap_poll_agree(client, tmp_path) -> None:+ session = _workspace(tmp_path)+ term = session.terminals[0]+ term.status = "live"+ term.pty_id = "pty-1"++ fast = client.get("/api/agentic-ide/activity").json()["terminals"][0]+ slow = client.get("/api/agentic-ide/recaps").json()["terminals"][0]++ assert fast["activity"] == slow["activity"]+ assert fast["worked"] == slow["worked"]+ assert fast["status"] == slow["status"]+++def test_a_gone_workspace_answers_empty_rather_than_erroring(client, tmp_path) -> None:+ _workspace(tmp_path)++ body = client.get("/api/agentic-ide/activity", params={"workspace_id": "nope"}).json()++ assert body == {"workspace_id": None, "terminals": []}