Repository navigation
fix(toolbar): show running subagents on a narrow phone's folded More button - #1450
Merged
Merged
Conversation
On narrow phones (useIsNarrowMobile, <=480px) the toolbar actions, including the Agents button and its running count and spinner, render only while the More menu is open, and any tap outside folds it again. So the running state #1311 added to the Agents badge was hidden there exactly when the user goes back to the composer. The folded More button now carries the Agents badge (same render, same spinner with motion-reduce, same count from the sidebar's running poll) while the session family has running subagents, and its title and label say how many run. An open menu, idle subagents and wider screens are unchanged. The badge markup moves into renderAgentsBadge() so both buttons share it; getFoldedMoreAgentsBadge() decides when it shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #1415.
On a narrow phone (≤480px) the toolbar folds the Agents button into the More menu, and tapping outside folds it again, so the running count and spinner from #1311 couldn't be seen while subagents ran. The chat-area block proposed in #1418 would have shown the same fact twice on wider screens; this keeps the one badge and only puts it where the folded button is.
chat.moreControlsAgentsRunning, en / zh-CN / zh-TW).renderAgentsBadge(), shared by both buttons.getFoldedMoreAgentsBadge()(lib/session-family.ts) decides when it shows. It reads the existingagentsBadge, so there's no new polling or request.Checks:
tsc --noEmit, eslint on the changed files,node --test lib/session-family.test.mjsplus the AppShell and i18n tests all pass. Not checked in a browser yet: worth a look at 375px with a running subagent.🤖 Generated with Claude Code