Skip to content

TUI - Remove agent badges from ordinary chat replies - #4996

Draft
krissetto wants to merge 1 commit into
docker:mainfrom
krissetto:remove-reply-badges
Draft

krissetto wants to merge 1 commit into
docker:mainfrom
krissetto:remove-reply-badges

Conversation

@krissetto

@krissetto krissetto commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

I don't think these badges are super useful, so here's a PR to remove 'em and make the TUI that tiny bit less noisy

Agent changes stay visible through the transfer_task and handoff cards and the return transition, which keep their badges (e.g. "A->B").

Inside a collapsed reasoning block, completed transfer_task and handoff calls no longer fade out, so the boundary stays visible without having to expand the block.

Feel free to close the PR if in disagreement


before:

Screenshot 2026-11-21 at 23 11 07

after:

Screenshot 2026-11-21 at 23 09 34

Copilot AI balanced review requested due to automatic review settings November 22, 2026 00:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Agent transitions are displayed inaccurately: forced handoffs lose visible attribution, including in restored sessions, while rejected handoffs persist as apparent successful switches.

2 open issues
What changed in this PR

This PR reduces visual noise in the TUI by removing agent badges from ordinary replies while retaining them on agent-transition cards.

Changes:

  • Removes reply and reasoning badges, simplifying message construction and rendering.
  • Keeps transfer and handoff cards visible in collapsed reasoning blocks.
  • Updates sidebar spinner tracking and regression tests for agent transitions.
File Description
pkg/​tui/​page/​chat/​runtime_events.go Routes agent metadata through sidebar event handling.
pkg/​tui/​components/​transcript/​transcript.go Removes previous-message plumbing from view creation.
pkg/​tui/​components/​sidebar/​sidebar.go Tracks spinner ownership across handoffs and transfers.
pkg/​tui/​components/​sidebar/​agent_spinner_test.go Tests spinner ownership through agent transitions.
pkg/​tui/​components/​reasoningblock/​reasoningblock.go Removes badges and preserves collapsed transition cards.
pkg/​tui/​components/​reasoningblock/​reasoningblock_test.go Tests badge removal and persistent transition cards.
pkg/​tui/​components/​messages/​stream_cancel_boundary_test.go Updates message construction in cancellation tests.
pkg/​tui/​components/​messages/​messages.go Removes badge-selection logic and updates view construction.
pkg/​tui/​components/​messages/​messages_test.go Tests badge-free replies and restored transition cards.
pkg/​tui/​components/​message/​message.go Removes sender badges and simplifies rendering offsets and caching.
pkg/​tui/​components/​message/​message_test.go Updates tests for the simplified constructor.
pkg/​tui/​components/​message/​bench_test.go Updates benchmarks for the simplified constructor.
pkg/​tui/​components/​message/​append_content_test.go Updates streaming-content tests for the simplified constructor.

Review effort: Balanced

Comment thread pkg/tui/components/message/message.go Resolved
Assistant replies and reasoning blocks no longer render an agent badge.
Agent changes stay visible through the transfer_task and handoff cards
and the return transition, which keep their badges. Inside a collapsed
reasoning block, completed transfer_task and handoff calls no longer fade
out, so the boundary stays visible without expanding the block.

Signed-off-by: Christopher Petito <chrisjpetito@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 22, 2026 01:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Handoff guards hide genuine agent transitions in delegated tasks and completion-hook routes, leaving replies attributed to the wrong agent after reply badges are removed.

2 open issues
2 resolved since last review

Review effort: Balanced

)

func (p *chatPage) observeHandoffAgent(sessionID, agent string) tea.Cmd {
if p.streamCancelled || p.streamDepth == 0 || p.isSubSessionEvent(sessionID) || agent == "" {
Comment on lines +29 to +30
p.handoffAgent = msg.ToAgent
if msg.Phase == types.ForceHandoffPhase {
@aheritier aheritier added area/tui For features/issues/fixes related to the TUI status/needs-triage For issues that need to be triaged labels Nov 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tui For features/issues/fixes related to the TUI status/needs-triage For issues that need to be triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants