Show idle state in the top tab bar

Each agent tab now prefixes its label with the same one-rune idle
indicator the sidebar uses (✕ error, ? permission, ◐ thinking, ○ idle,
● working), so the state of every open agent is visible without
opening or focusing each tab. Tab redraws now fire on idle-state
changes in addition to sidebar redraws.
This commit is contained in:
2026-05-18 13:02:35 +01:00
parent 34b41be1df
commit 2fa00ad510
4 changed files with 77 additions and 21 deletions

View File

@@ -829,11 +829,11 @@ func (st *uiState) OnChildSpawned(c *Child) {
st.drawStatusLine()
}
// OnChildStateChanged repaints the sidebar whenever a child's
// idle-state badge flips. Cheap — the badge is the only chrome that
// reflects state today, and drawSidebar bails when the cached frame
// hasn't changed.
// OnChildStateChanged repaints the sidebar and tab bar whenever a
// child's idle-state badge flips. Cheap — both draws bail when the
// cached frame hasn't changed.
func (st *uiState) OnChildStateChanged(string, IdleState) {
st.drawTabBar()
st.drawSidebar()
}