Repository navigation
fix(app): correct background subagent status - #42944
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes how subagent tool parts are classified and rendered in the app/session timeline: it prevents active foreground subagents from being mislabeled as “background”, and keeps the progress indicator active only while the referenced background child session remains non-idle. It also adds regression coverage to lock in the intended labeling and indicator behavior.
Changes:
- Refines “background subagent” detection for task/subagent tool parts to match the intended semantics (completed tool part while child session is still running).
- Updates the “running”/spinner state for background subagent cards to follow the child session’s live
session_statusrather than the tool-part completion state alone. - Extends Playwright regression coverage to assert correct foreground labeling and that the background progress indicator stops when the child becomes idle.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/session-ui/src/components/message-part.tsx | Adjusts task/subagent background detection and ties the running indicator to child session status. |
| packages/app/e2e/regression/session-timeline-notices.spec.ts | Adds regression assertions for foreground “(background)” labeling and background progress indicator start/stop behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jinhuang712
pushed a commit
to jinhuang712/opencode
that referenced
this pull request
Sep 26, 2026
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
taskbackground metadata behaviorTests
bun run typecheckinpackages/session-uibun run typecheckinpackages/appbun run typecheck:e2einpackages/appplaywright test e2e/regression/session-timeline-notices.spec.ts(6 passed)