fix(agent-manager): propagate base branch override to active diff source - #12696
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The previously flagged Files Reviewed (2 files)
Previous Review Summary (commit a2b22d0)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit a2b22d0)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (4 files)
The core fix is sound: routing Reviewed by claude-opus-5 · Input: 26 · Output: 7.3K · Cached: 640.1K Review guidance: REVIEW.md from base branch |
fix(agent-manager): propagate base branch override to active diff source
The base branch picker added in #12681 updates its own state and the branch list, but the diff itself keeps comparing against the old base.
WorktreeDiffController.setBase()stored the override and calledSourceController.reactivate(), which rebuilds the active source against the PanelContext captured by the lastactivate(). Nothing re-resolved the base from the override map and pushed it viasetContext(), so the new base only took effect after switching scope or session, or reopening the panel.setBase()now routes through the same activation path used when a diff context is opened, so the base is re-resolved with the override applied and pushed to the source before it rebuilds. Poll vs one-shot fetch mode is preserved, and an override set for a context that is not currently active is stored and picked up the next time that context's diff is requested. The webview message handler also logs activation failures instead of leaving an unhandled rejection.