Skip to content

feat(tui): show pausing/paused state for /pause#3156

Merged
aheritier merged 1 commit into
docker:mainfrom
dgageot:worktree-board-34a8675cb3e51c12
Jun 17, 2026
Merged

feat(tui): show pausing/paused state for /pause#3156
aheritier merged 1 commit into
docker:mainfrom
dgageot:worktree-board-34a8675cb3e51c12

Conversation

@dgageot

@dgageot dgageot commented Jun 17, 2026

Copy link
Copy Markdown
Member

The /pause command interrupts the run loop at the next iteration boundary, blocking it until resumed with /pause again. However, users can't currently see that this has happened—the TUI remains responsive to input, but there's no visual feedback indicating that the agent has been paused or is in the process of pausing.

This change adds visual state indicators to improve that experience. It introduces a PausedEvent emitted by the runtime when the run loop blocks at an iteration boundary, an isPaused() helper for checking pause state, and a three-state machine (None, Pausing, Paused) tracked per session in the TUI. The handleTogglePause function drives state transitions, and pause-related text is rendered directly in both the resize handle and lean-mode status views.

Users now see "Pausing… (finishing current request)" during the transient pause window, and "⏸ Paused (/pause to resume)" once the agent has fully stopped, making the pause action's effect clear and actionable.

@dgageot dgageot requested a review from a team as a code owner June 17, 2026 14:07
@aheritier aheritier added area/tui For features/issues/fixes related to the TUI kind/feat PR adds a new feature (maps to feat: commit prefix) labels Jun 17, 2026
@docker-agent

Copy link
Copy Markdown

PR Review Failed — The review agent encountered an error and could not complete the review. View logs.

@docker-agent

Copy link
Copy Markdown

PR Review Failed — The review agent encountered an error and could not complete the review. View logs.

@aheritier aheritier merged commit ad98587 into docker:main Jun 17, 2026
8 checks passed
pull Bot pushed a commit to TheTechOddBug/cagent that referenced this pull request Jun 18, 2026
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/feat PR adds a new feature (maps to feat: commit prefix)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants