From 1fb919c22a2839c4388aa48840e244b6fdd1b709 Mon Sep 17 00:00:00 2001 From: Harry Bayliss Date: Fri, 15 May 2026 15:26:06 +0100 Subject: [PATCH] Keep parent tab highlighted when focus is on a sub-agent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- CHANGELOG.md | 7 +++++++ internal/app/tabbar.go | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4133093..99c19c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ loosely follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Top tab bar now keeps the top-level agent's tab highlighted + when focus is on one of its sub-agents (or on a Processes pane + entry, matching the existing agent-tree behavior). Previously + the tab would lose its highlight as soon as you stepped into a + child agent, even though you were still within that thread. + ## [0.0.2] - 2026-05-15 ### Added diff --git a/internal/app/tabbar.go b/internal/app/tabbar.go index 1294254..7eec361 100644 --- a/internal/app/tabbar.go +++ b/internal/app/tabbar.go @@ -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