Skip to content

TUI - stop rendering agent name badges in the chat - #4991

Closed
krissetto wants to merge 1 commit into
docker:mainfrom
krissetto:remove-chat-agent-pills
Closed

krissetto wants to merge 1 commit into
docker:mainfrom
krissetto:remove-chat-agent-pills

Conversation

@krissetto

@krissetto krissetto commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

I don't think these are super useful, so here's a PR to remove those and make the TUI that tiny bit less noisy and remove a little bit of logic from the code.

Feel free to close the PR if in disagreement, i guess they could be somewhat useful for in-session handoffs


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 21, 2026 17:46
@krissetto krissetto changed the title TUI - stop rendering agent name pills on every message TUI - stop rendering agent name badges Nov 21, 2026
@krissetto krissetto changed the title TUI - stop rendering agent name badges TUI - stop rendering agent name badges in the chat Nov 21, 2026

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.

🟢 Approval recommended

No active review issues block the change removing agent-name pills from the TUI.

No open issues 🎉

What changed in this PR

Removes agent-name pills from assistant messages and reasoning blocks to reduce visual noise in the TUI, while preserving sender metadata and delegation-transition badges.

Changes:

  • Removes badge rendering and previous-message tracking used to decide badge visibility.
  • Simplifies rendering caches, code-block offsets, and reasoning-header hit testing.
  • Updates tests and the chat snapshot for the badge-free layout.
File Description
pkg/​tui/​components/​transcript/​transcript.go Removes previous-message plumbing from view creation.
pkg/​tui/​components/​reasoningblock/​reasoningblock.go Removes agent badges and fixes the header position at line zero.
pkg/​tui/​components/​reasoningblock/​reasoningblock_test.go Removes obsolete badge-rendering tests.
pkg/​tui/​components/​messages/​messages.go Removes badge-selection logic and previous-message arguments.
pkg/​tui/​components/​messages/​messages_test.go Checks badge-free streamed and restored messages, metadata, and layout.
pkg/​tui/​components/​message/​message.go Removes sender pills and simplifies rendering caches and code-block offsets.
e2e/​tui/​testdata/​chat_basic_math.golden Updates the expected chat layout without the agent pill.

Review effort: Balanced

@krissetto
krissetto marked this pull request as ready for review November 21, 2026 17:49
@krissetto
krissetto requested a review from a team as a code owner November 21, 2026 17:49
@aheritier aheritier added status/needs-triage For issues that need to be triaged area/tui For features/issues/fixes related to the TUI labels Nov 21, 2026
@rumpl

rumpl commented Nov 21, 2026

Copy link
Copy Markdown
Member

Can you show screenshots with before/after please?

@aheritier aheritier left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for cutting down the visual noise in the chat. I’d keep ordinary replies badge-free, but preserve a transcript cue when control changes hands and there’s no visible handoff row.

Comment thread pkg/tui/components/message/message.go Resolved
@krissetto
krissetto force-pushed the remove-chat-agent-pills branch from 4355f1e to 1acd2d4 Compare November 21, 2026 22:11
Copilot AI balanced review requested due to automatic review settings November 21, 2026 22:11
@krissetto
krissetto force-pushed the remove-chat-agent-pills branch from 1acd2d4 to 009b6e5 Compare November 21, 2026 22:15

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 attribution boundaries can disappear when a parent resumes after a forwarded child reply or when a running transfer is cancelled after the child has replied.

2 open issues

Review effort: Balanced

Comment thread pkg/tui/components/messages/messages.go Resolved
Copilot AI balanced review requested due to automatic review settings November 21, 2026 22:16
@krissetto

krissetto commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Can you show screenshots with before/after please?

@rumpl added some basic screenshots in the PR desc

... I’d keep ordinary replies badge-free, but preserve a transcript cue when control changes hands and there’s no visible handoff row.

@aheritier made the changes suggested, and ensured the handoff tool call remains outside reasoning blocks even if it happens during reasoning so it's easier to notice.

now let me see what the bots have to say

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

The attribution filter mishandles tool-only handoff chains and stale delegation matches after returns, causing duplicate attribution rows or suppressed new handoff boundaries.

4 open issues

Review effort: Balanced

@krissetto
krissetto force-pushed the remove-chat-agent-pills branch from 009b6e5 to bcbc4ed Compare November 21, 2026 22:30
Copilot AI balanced review requested due to automatic review settings November 21, 2026 22:30

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 attribution still advances on failed transfers and loses visible transition anchors in transition-only histories, producing misleading or missing speaker labels.

2 open issues
4 resolved since last review

Review effort: Balanced

@krissetto
krissetto force-pushed the remove-chat-agent-pills branch from bcbc4ed to e52a267 Compare November 21, 2026 23:06
Copilot AI balanced review requested due to automatic review settings November 21, 2026 23:06

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

Speaker attribution is lost in embedded multi-agent transcripts and when recovery removes transfer rows that provide child-agent cues.

2 open issues
2 resolved since last review

Review effort: Balanced

Comment thread pkg/tui/components/messages/messages.go Resolved
Signed-off-by: Christopher Petito <chrisjpetito@gmail.com>
@krissetto
krissetto force-pushed the remove-chat-agent-pills branch from e52a267 to 889407b Compare November 21, 2026 23:21
Copilot AI balanced review requested due to automatic review settings November 21, 2026 23:21

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

Speaker transitions are incorrectly created for whitespace-only replies and remain stale after reasoning is removed, leaving misleading attribution boundaries in the message view.

2 open issues
2 resolved since last review

Review effort: Balanced

Comment on lines +63 to +65
if i == len(m.messages)-1 && i > 0 {
prev := m.messages[i-1]
if prev.Type == types.MessageTypeAgentTransition && prev.Content == agentName {
Comment on lines +1809 to +1810
if boundary := agentattribution.Boundary(m.messages, msg.Sender); boundary != nil {
return tea.Batch(m.addMessage(boundary), m.addMessage(msg))
@krissetto

Copy link
Copy Markdown
Contributor Author

these bots are not behaving. will reopen a cleaner solution to this

@krissetto krissetto closed this Nov 21, 2026
@aheritier

Copy link
Copy Markdown
Collaborator

maybe we should remove copilot @krissetto @rumpl It's very nitpicking cc @dgageot

@krissetto

Copy link
Copy Markdown
Contributor Author

I'm honestly surprised Gordon isn't around here 😉

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.

4 participants