Skip to content

fix(toolbar): show running subagents on a narrow phone's folded More button - #1450

Merged
agegr merged 1 commit into
mainfrom
fix/1415-narrow-more-running-mark
Oct 29, 2026
Merged

agegr merged 1 commit into
mainfrom
fix/1415-narrow-more-running-mark

Conversation

@agegr

@agegr agegr commented Oct 29, 2026

Copy link
Copy Markdown
Owner

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.

  • While subagents run and More is folded, the More button carries the Agents badge (same count, spinner and reduced-motion handling) in its corner, and its title/label say how many run (chat.moreControlsAgentsRunning, en / zh-CN / zh-TW).
  • The badge markup moves into renderAgentsBadge(), shared by both buttons. getFoldedMoreAgentsBadge() (lib/session-family.ts) decides when it shows. It reads the existing agentsBadge, so there's no new polling or request.
  • Idle subagents, the open menu and wider screens are unchanged.

Checks: tsc --noEmit, eslint on the changed files, node --test lib/session-family.test.mjs plus 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

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>
@agegr
agegr merged commit db3c6c6 into main Oct 29, 2026
2 checks passed
@agegr
agegr deleted the fix/1415-narrow-more-running-mark branch October 29, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

功能建议:在聊天区显示运行中的子代理及任务说明

1 participant