Repository navigation
fix(tui): show the session list spinner for background shell commands - #51811
Closed
kernel-oops wants to merge 1 commit into
Closed
kernel-oops wants to merge 1 commit into
kernel-oops wants to merge 1 commit into
Conversation
The session list spinner covered a running turn and running subagents, but not background shell commands, so a session running a long command in the background (a full test suite, for instance) looked idle in the list while its own footer showed "1 shell". The list now uses a sessionActive helper that also counts background shells belonging to the session or its subagents. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RG8UhiogA1Ho2eZRx8tn2y
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Contributor
Author
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
Fixes #51810
Type of change
What does this PR do?
The session list's spinner checked
session.statusfor the session and its family, so background shell commands never counted. The prompt footer already counts them (viadata.shell), which is why a session can show1 shellinside while looking idle in the list.This adds a small
sessionActivehelper inutil/session.tsthat treats a session as active when it or any session in its family has a running turn or a background shell (data.shell.listBySession), and uses it for the list's gutter spinner. Shells are looked up across the locations the TUI has loaded, the same data the footer uses.How did you verify your code works?
test/util/session.test.tsfor the helper: running turn, running subagent, background shell, and a background shell started by a subagent (and one belonging to an unrelated session, which must not count).bun test test/util/session.test.ts test/cli/tui/dialog-session-list.test.tsx test/feature-plugins/prompt-footer.test.tsxandbun run typecheckinpackages/tui; Prettier check on the changed files.Screenshots / recordings
The change is the presence of the existing list spinner for a session running only a background shell; no new UI.
Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01RG8UhiogA1Ho2eZRx8tn2y