Repository navigation
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Contributor
There was a problem hiding this comment.
Looks good. I ran the new e2e test against the change (it passes) and against the base project-avatar-state.ts (it fails because tab B gets no progress indicator), and typecheck passes in packages/app.
The new check reads the reactive shell store. Exited and deleted shells are removed from that store, and the status === "running" filter covers exited shells in the first list, so the indicator won't stick. It also matches how the TUI already treats running shells (shell-tab.tsx), so a long-running dev server keeping the indicator on is consistent.
Public API: unchanged.
No concerns.
This branch has not been deployed
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.
Issue for this PR
Closes #56660
Type of change
What does this PR do?
The session icon (titlebar tab, home row) shows the progress indicator while a session or one of its subagents is running, but not while a background shell is.
useSessionTabAvatarStateonly counts session status and pending inbox items. A background shell is not a session, and its parent goes idle when the turn ends, so the icon drops back to the avatar while the shell keeps running.busynow also counts a running shell fromdata.shell.listBySession(id). It runs for every session in the family, so a shell started by a subagent keeps the parent's icon busy too. The shell store drops a shell onshell.exitedandshell.deleted, and thestatus === "running"check covers an exited shell that arrives in the initial list.Two things to know. A long-lived shell, like a dev server, keeps the indicator on until it exits. And shells come from the locations the app has loaded, so one that was already running in a project the app has not synced yet shows up once that project syncs or a live event arrives.
How did you verify your code works?
shell.exitedevent clears it. It fails ondev(tab B never gets the indicator) and passes with this change. Dropping thestatus === "running"check makes it fail on the exited-shell tab.packages/app:PLAYWRIGHT_PORT=4310 bun run test:e2e:built -- e2e/regression/tabs.spec.ts -g "background shell". It passed 10 of 10 at 5 workers with no retries.bun run checkpasses.Screenshots / recordings
Before: tab B has a running shell and tab C's subagent has one, but both show the avatar.
After: both show the progress indicator. Tab A, whose shell already exited, keeps its avatar.
Checklist