fix(ui): show queued/waiting state for tools blocked by concurrency safety#1178
Merged
Conversation
…afety When multiple subagents are dispatched and one must wait for another to finish (e.g., a read-only FileFinder followed by a read-write GeneralPurpose), the second tool previously appeared to be
ef6935e to
c56ebeb
Compare
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.
Problem
When multiple subagents are dispatched in a single turn and one must wait for another to finish (e.g., a read-only
FileFinderfollowed by a read-writeGeneralPurpose), the second tool previously appeared to be "running" while it was actually stuck in the tool pipeline queue. Both cards showed the same animated spinner, causing user confusion about which agent was actually executing.Root Cause
The backend already tracks
QueuedandWaitingtool states and emits corresponding events, but the frontend event handler (ToolEventModule) ignored these events. Every tool card therefore transitioned directly frompreparingtorunning, with no visual distinction for queued work.Changes
Frontend
QueuedandWaitingevents, updating the tool card status to'queued'/'waiting'.'queued'and'waiting'to theLOADING_SHIMMER_STATUSESset and thestatusunion type.queued→ "Queued" andwaiting→ "Waiting".Clockicon (instead of animated dots) for queued/waiting tools so users can visually distinguish "waiting" from "executing".FlowItem.statusunion with'queued'and'waiting'.en-US,zh-CN, andzh-TW.Agent Prompt
GeneralPurposeis for write-heavy tasks only. Read-only research should preferExploreorFileFinder, which can safely run in parallel.Verification
cargo check -p bitfun-core— passpnpm run type-check:web— passpnpm run i18n:audit— passBefore / After
Related
Fixes user-reported issue where two simultaneously visible subagents appeared parallel but only one was actually executing.