Keep parent tab highlighted when focus is on a sub-agent
The top tab bar compared against focusedID, so stepping into a sub-agent dropped the parent tab's highlight even though the user was still inside that thread. activeAgentID already walks the parent chain to the top-level root for the sidebar's agent tree — reuse it for the tab strip too.
This commit is contained in:
@@ -24,7 +24,11 @@ func (st *uiState) drawTabBar() {
|
||||
}
|
||||
st.mu.Lock()
|
||||
palOpen := st.palette != nil
|
||||
focus := st.focusedID
|
||||
// Highlight the top-level agent tab even when focus has stepped
|
||||
// into a sub-agent (or a Processes pane entry). activeAgentID walks
|
||||
// the parent chain to the root, so the user always sees which tab
|
||||
// their current thread belongs to.
|
||||
focus := st.activeAgentID
|
||||
st.mu.Unlock()
|
||||
if palOpen {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user