fix(tui): derive tab busy state from execution only - #47666
Open
opencode-agent[bot] wants to merge 3 commits into
Open
fix(tui): derive tab busy state from execution only#47666opencode-agent[bot] wants to merge 3 commits into
opencode-agent[bot] wants to merge 3 commits into
Conversation
Completed user shells enqueue synthetic context without waking the model. Do not count this deferred context as active tab work; preserve busy indicators for running sessions and pending user or control items.
Inbox admission, delivery, and item type do not describe execution. Follow the existing family execution status and cover retained input, terminal outcomes, reconnect snapshots, optimistic submission, and attention states.
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.
Summary
Make the tab spinner follow execution, not pending inbox contents. The production change is one line:
A completed
!shell stores its output for the next model prompt without starting execution. Other inputs can also remain queued while idle, including after an execution fails or is interrupted. Neither inbox presence nor message type reliably indicates execution. This replaces the earlier synthetic-item filter entirely.Shell output, input delivery, execution, family membership, unread state, and question/permission indicators are unchanged.
State coverage
Regression tests use the real client event projection and tab controller:
Also audited the execution lifecycle: execution-owned setup, LLM streaming, foreground tool/permission/question waits, retries, compaction, and session movement remain inside the same running period. Intermediate step completion does not end it. Existing client and Core tests cover these status/lifecycle paths.
Behavior and boundaries
!shells, detached shell jobs, and automatic title generation have separate lifecycles. They do not by themselves make model execution busy.Checks
bun typecheckinpackages/tuipassed.git diff --checkpassed; focused lint has no errors (two existing warnings on unchanged lines).edaa6ae9ffb549cf8880cfc389bcb91e49026d38: completed!printfstays idle; a subsequent model response shows the spinner while running and clears it on completion; empty-output shells and verbose exit-7 output at 60×24 stay idle. Shell commands were real and model output was simulated.Requested by: @rekram1-node (Aiden via Slack)