Repository navigation
fix(native-chat): keep a chat's Failed / Interrupted mark on the worktree card and tab past 30 minutes - #28672
Closed
brennanb2025 wants to merge 1 commit into
Closed
brennanb2025 wants to merge 1 commit into
brennanb2025 wants to merge 1 commit into
Conversation
… tab past 30 minutes A native chat's row is re-derived by its host from the chat's journal, so its Failed / Interrupted / Couldn't confirm mark no longer ages out of the desktop card and tab bar; the next turn or closing the chat clears it. Terminal-agent rows and clean finishes keep the 30-minute window.
Contributor
Author
|
Fixed on main by #28686. |
6 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
When a chat in the native chat view ends badly (you pressed Stop, the agent failed, or Orca couldn't confirm how the reply ended), the worktree card in the sidebar and the chat's tab show a mark for it: Interrupted, Failed, or Couldn't confirm. On desktop that mark quietly disappeared about 30 minutes later, even though nothing about the chat had changed. The agent row under the card and the phone kept showing it. Now the card and tab keep it too, until the chat's next turn changes it or you close the chat.
What Changed
The problem. The desktop worktree card and the tab bar stop trusting an agent's status row once its evidence is 30 minutes old. That rule exists for terminal agents: they report status through hooks, and if the agent process dies without a last report, an old "working" row would otherwise spin forever. Native chat rows don't work that way. The machine running the chat (the "host") rebuilds the row from the chat's saved history every time it changes, and publishes it again after Orca restarts. A settled result like "you stopped this reply" is still true an hour later. But the 30-minute rule applied to it anyway, so:
The mechanism.
structuredHost). The renderer's status bridge for native chats (StructuredAgentSessionStatusBridge) now copies that label onto the row it writes into the renderer's status store. Nothing new is saved to disk and nothing new crosses the wire: the bridge derives the label from a field the host already sends (hostExecutionOwned).isSettledNativeChatVerdict(src/renderer/src/lib/pane-agent-evidence.ts), recognizes a native chat row that is finished and carries a bad-ending result. The worktree card and the tab bar now show a row when it is fresh or passes that check (isAgentStatusShownOnDot).Why
The 30-minute window answers "is this report still current?" For a hook stream that can go silent, age is the only signal. For a native chat row, the host keeps the row current itself, so age says nothing. The chat's next turn or closing the chat is what ends the mark, and both already replace or remove the row. That means nothing new can strand: no flag is stored, and the existing replace and remove paths are what clear it.
Alternatives considered:
structuredHostOwnedflag withstructuredHoston the renderer row. Cleaner in principle, but that flag is also shared with theworktree pswire rows that older and newer Orca versions exchange. Intended: both fields stay. The bridge sets them from the same host field, so they can't disagree.Design choices:
Linked Issue
Replaces part of #25670
Fixes #
Visual Proof
Pending: QA to follow
Testing
StructuredAgentSessionStatusBridge.test.tsx: one test of the whole path, from the host's status, through the bridge and the store, to the worktree card summary and the tab status. A chat stopped more than 30 minutes ago still shows Interrupted on both. A terminal agent's row of the same age still expires. A new turn then replaces the mark with Working. The test fails on main (the tab readsinactiveinstead ofinterrupted) and passes with this change.Existing card, tab-bar and freshness tests pass unchanged.
Platforms: macOS, unit tests only. No platform-specific code. For SSH and remote hosts the bridge runs in the local window either way, and the host field it reads already exists on every host version that publishes native chat status.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)