fix(tui): always show the focused agent type in the status bar - #135
Merged
Merged
Conversation
Focusing the root now renders an 'orchestrator' label next to the state equalizer (subagent focus keeps the breadcrumb chain, no duplicates).
Closed
5 tasks
Owner
|
Will be merged. Please note that the branch and agent type are shifting around between orchestrator and subagents, I will check what looks better and then merge it with that single change (presumably either anchoring it or moving the branch to the right, depending on what seems most sensible). Thanks again! |
…mid-CSI The status bar truncates rendered, lipgloss-styled status strings on narrow terminals. The old rune walker counted escape bytes as content and could cut INSIDE a CSI sequence, emitting garbage like "ESC[3..." into the bar. Replace it with ansi.Truncate, which measures the same visible width, keeps sequences intact, and already accounts for the tail width. Review fix cherry-picked from 0a97d2f (truncate helper + view_truncate_test.go only).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update 2026-09-25
New since the original description (
dc8fbf7): the status bar's truncation helper is now ANSI-aware. It truncates rendered, lipgloss-styled status strings on narrow terminals, and the old rune walker counted escape bytes as content — it could cut inside a CSI escape sequence and emit garbage likeESC[3...into the bar. It now usesansi.Truncate: same visible width, escape sequences kept intact.With the root agent focused, the status bar showed no agent identity at all — breadcrumbs only render for subagents, so the orchestrator was anonymous. The status bar now always names the focused agent in the left section:
orchestratorlabelOne-file TUI fix (
internal/tui/view.go): the focused-agent label is computed from the same path walk that builds the breadcrumbs, plusagentTypeForID(main→orchestrator,<type>-subagent-<n>→<type>) and 5 new tests ininternal/tui/statusbar_test.go.Split out of #133 (TUI changes evaluated separately, per review).
Testing
exit 0 — all 18 packages green (15 ok, 3 without test files).
gofmt -lon the touched files: no output (clean)go vet ./internal/tui: clean