Skip to content

refactor(tui): remove redundant agent-switch and thinking-level toasts#3266

Merged
dgageot merged 1 commit into
docker:mainfrom
dgageot:worktree-board-19c9a10227e39797
Jun 26, 2026
Merged

refactor(tui): remove redundant agent-switch and thinking-level toasts#3266
dgageot merged 1 commit into
docker:mainfrom
dgageot:worktree-board-19c9a10227e39797

Conversation

@dgageot

@dgageot dgageot commented Jun 26, 2026

Copy link
Copy Markdown
Member

Two toast notifications in the TUI were firing on actions whose result is already visible in the interface without them. The "Switched to agent" success toast appeared every time the user switched the active agent, even though the chat view header immediately reflects the new agent. The "✻ Thinking: low" info toast appeared on every thinking-level cycle, even though the sidebar already shows the current effort level. Neither notification added information the user couldn't already see.

Both toasts have been removed from handleSwitchAgent and handleCycleThinkingLevel in pkg/tui/handlers.go. All other behavior is unchanged: the underlying state mutations, keybindings, and visual indicators in the chat and sidebar remain exactly as before.

No breaking changes. The only observable difference is the absence of those two transient pop-ups.

Both actions already provide visual feedback elsewhere in the UI (the
chat view reflects the active agent, and the sidebar shows the current
thinking-effort level), so the success toasts were redundant noise.
@dgageot dgageot requested a review from a team as a code owner June 26, 2026 11:56

@docker-agent docker-agent 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.

Assessment: 🟢 APPROVE

Clean refactor that removes two redundant toast notifications. Both and correctly preserve their error paths, state mutations, and return semantics. The simplification in and the in are both valid Bubble Tea patterns with no behavioral regression.

@docker-agent docker-agent 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.

Assessment: 🟢 APPROVE

Clean refactor that removes two redundant toast notifications. Both handleSwitchAgent and handleCycleThinkingLevel correctly preserve their error paths, state mutations, and return semantics. The tea.Batch simplification in handleSwitchAgent and the return m, nil in handleCycleThinkingLevel are both valid Bubble Tea patterns with no behavioral regression.

@aheritier aheritier added area/tui For features/issues/fixes related to the TUI kind/refactor PR refactors code without behavior change labels Jun 26, 2026
@dgageot dgageot merged commit 5129a29 into docker:main Jun 26, 2026
10 checks passed
@dgageot dgageot deleted the worktree-board-19c9a10227e39797 branch June 26, 2026 12:11
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 kind/refactor PR refactors code without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants