Fix stale subagent indicators with completion flag and startup sync#231
Merged
rockfordlhotka merged 1 commit intomainfrom Apr 2, 2026
Merged
Fix stale subagent indicators with completion flag and startup sync#231rockfordlhotka merged 1 commit intomainfrom
rockfordlhotka merged 1 commit intomainfrom
Conversation
Subagent activity-log entries in _activeActivityLogs were never closed when subagents completed because the Phase 2 synthesis reply was PrimaryFinal (clearing only the primary progress key). Indicators persisted until the next user message triggered SetProcessing(true). Additionally, the singleton ChatStateService retained stale entries across page reloads with no way to reconcile against actual agent state. Two-pronged fix: - Add IsCompletion flag to AgentReply so SubagentResultHandler's Phase 1 completion bubble immediately closes its activity log entry - Add ActiveStatusRequest/Response message pair so the Blazor UI can query the agent for running subagents on startup and reconcile stale indicators (removing dead ones, seeding live ones) Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
IsCompletionflag toAgentReplyso subagent completion bubbles immediately close their activity log entries (spinner + header badge). Previously, the Phase 2 synthesis reply wasPrimaryFinalwhich only cleared the primary progress key, leaving subagent indicators stuck until the next user message.ActiveStatusRequest/ActiveStatusResponsemessage pair lets the Blazor UI query the agent for actually-running subagents on startup, clearing stale_activeActivityLogsentries that survive in the singletonChatStateServiceacross page reloads, and seeding indicators for subagents that started before the UI connected.Test plan
dotnet test RockBot.slnx— all 833 tests pass (0 failures)🤖 Generated with Claude Code