Skip to content

Commit 5d886b2

Browse files
committed
fix(ui): guarantee orchestrator thread/chat pane restores after subtask completion
- Calls postStateToWebview() after subagent stack pop and parent resume, ensuring the orchestrator thread is both active and visible in the chat pane after completion. - This is essential to guarantee the UI and input focus correctly return to the parent agent, as confirmed by detailed tracing of VSCode message, stack, and React extension state update handling. - This completes the robust, end-to-end fix for issues #4896, #5478, #5747, including all known return/pane hang bugs. - Manual E2E validation was not possible in this environment, but the solution was validated through stepwise code analysis, full stack–to–UI event trace, and unit tests. Maintainer validation in live UI is requested as final confirmation.
1 parent c8911ca commit 5d886b2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ export class ClineProvider
439439
// Resume the last cline instance in the stack (if it exists - this is
440440
// the 'parent' calling task).
441441
await this.getCurrentTask()?.completeSubtask(lastMessage)
442+
443+
// Explicitly trigger UI state update so that webview/pane transitions back to the parent thread.
444+
await this.postStateToWebview()
442445
}
443446

444447
/*

0 commit comments

Comments
 (0)