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
fix(agentic-ide): stop the pane caption claiming work the badge says is over
Ruben Lütkefd9a92d93434
diff --git a/jarvis/agentic_ide/recap.py b/jarvis/agentic_ide/recap.pyindex 38bc5d9c2a..5409ece352 100644--- a/jarvis/agentic_ide/recap.py+++ b/jarvis/agentic_ide/recap.py@@ -45,6 +45,8 @@ import timefrom dataclasses import dataclassfrom typing import TYPE_CHECKING, Any+from .activity import observed+if TYPE_CHECKING: # pragma: no cover - typing onlyfrom collections.abc import Sequence@@ -349,13 +351,17 @@ def summarize(term: Any, *, tail: Sequence[str] | None = None) -> Recap:sent = int(getattr(term, "prompts_sent", 0) or 0)activity = _activity(tail)idle = idle_phrase(term)- # A live pane that is visibly producing output but was never sent a prompt- # is being driven by hand — the caption must say that, not imply idleness.- working = status == "live" and bool(activity or idle)+ # Is this pane's agent STILL AT IT, from the one detector that answers that+ # (see .activity)? Asked rather than guessed from "has it ever printed+ # anything", which is what this used to do — and which called a pane that+ # had been finished for twenty minutes "Working now", one line under a badge+ # correctly saying it had stopped. Two descriptions of one pane, disagreeing+ # inside a single payload.+ doing = observed(term).activity# One sentence about the instruction, computed once: every branch below# opens with it, and a plain terminal answers it differently.asked = (- _task_sentence(task, sent=sent, working=working)+ _task_sentence(task, sent=sent, working=status == "live" and bool(activity or idle))if _typed_into(term)else "This is a plain terminal — you type into it yourself.")@@ -413,11 +419,23 @@ def summarize(term: Any, *, tail: Sequence[str] | None = None) -> Recap:else:headline = "Running — no work visible yet"- now = (- f"Working now, last output {idle}: {activity}."- if idle and activity- else (f"Working now: {activity}." if activity else "Running, with nothing printed yet.")- )+ # What it is doing RIGHT NOW, in the same words the pane's badge uses. The+ # last row it printed rides along in every case: it is the evidence for the+ # claim, and it is what the reader checks the claim against.+ printed = f"Last printed{' ' + idle if idle else ''}: {activity}." if activity else ""+ if not activity:+ now = "Running, with nothing printed yet."+ elif doing == "working":+ now = f"Working now. {printed}"+ elif doing == "asking":+ now = f"Stopped with a question on screen, waiting for your answer. {printed}"+ elif doing == "waiting":+ now = f"Not working right now — waiting at its prompt. {printed}"+ else:+ # No confident reading: a pane whose process this caller cannot see, or+ # one still taking the terminal. The evidence stands on its own rather+ # than being dressed up as a claim about what the agent is doing.+ now = printedreturn Recap(headline=condense(headline, HEADLINE_CHARS),detail=_sentences(asked, now),diff --git a/tests/unit/agentic_ide/test_pane_activity_status.py b/tests/unit/agentic_ide/test_pane_activity_status.pyindex 170ba8bf22..41b861f0b4 100644--- a/tests/unit/agentic_ide/test_pane_activity_status.py+++ b/tests/unit/agentic_ide/test_pane_activity_status.py@@ -282,6 +282,37 @@ async def test_the_bell_is_not_widened_with_it(registry: Registry, tmp_path: Patassert notifications._tasked(term) is False+async def test_the_caption_never_contradicts_the_badge(registry: Registry, tmp_path: Path) -> None:+ """The sentence under the pane and the word beside it describe one pane.++ Reported together with the badge itself: the caption said "Working now" for+ a terminal that had been finished for twenty minutes, one line under a badge+ correctly saying it had stopped. It claimed work from "has this pane ever+ printed anything", which is true of every pane that has ever run.+ """+ _session, term = await _pane(registry, tmp_path)+ term.transcript.feed(REST_SCREENS["claude"])+ _watched(registry, term, moves=False)++ state = term.to_dict()++ assert state["activity"] == "waiting"+ assert "Working now" not in state["recap_detail"]+ assert "waiting at its prompt" in state["recap_detail"]+++async def test_the_caption_says_working_when_it_is(registry: Registry, tmp_path: Path) -> None:+ """And the other way round, or the wording would just be pessimistic."""+ _session, term = await _pane(registry, tmp_path)+ term.transcript.feed(REST_SCREENS["claude"])+ _watched(registry, term, moves=True)++ state = term.to_dict()++ assert state["activity"] == "working"+ assert "Working now" in state["recap_detail"]++async def test_the_two_readings_of_one_pane_agree(registry: Registry, tmp_path: Path) -> None:"""The workspace state and the pane-list poll describe the same pane alike.