Repository navigation
Fix: eliminate visible repaint flicker when switching agents and workspaces - #143
Merged
Merged
Conversation
Make closing an already-closed workspace picker a no-op, preventing tab selection from focusing the previous agent before the intended one. Poll top-level chrome for actual status/tip changes instead of rerendering all agents every 300ms. Let the root propagate workspace and resize changes once rather than subscribing each nested view to the same events. Skip unchanged Git-header renders. Retain standalone workspace subscriptions, deferred focus, dimming, and per-session streaming refresh.
Reproduce three failures on the prior implementation: unnecessary closed-picker refocus, two transitions per tab selection, and six idle agent-body rebuilds over 750ms. Verify no extra idle rebuilds after the fix, one repaint per agent on focus, and refresh only when awaiting-input state changes. All 54 focused workspace and transcript checks pass on net8.0 and net10.0. Record the behavior and regression evidence under Unreleased.
Cache session entry arrays until append or clear, and preserve transcript partitions when the entry snapshot is unchanged. Keep transient status and mutable tool and agent activity live. Add regressions for long histories, clear, preview updates, expansion, and late agent replies.
Enable RazorConsole synchronized output so terminals supporting DEC mode 2026 present completed frames together during pane dimming and workspace switches.
Suppress intermediate registry notifications while updating workspace visibility and restoring pane focus. Preserve nested transition batching and add a regression asserting one notification with final visibility and focus state.
Buffer output only between synchronized-frame markers, then deliver the completed frame together. Preserve terminal capabilities and normal output, handle fragmented markers, bound buffering, and close interrupted frames on shutdown. Verify identical ANSI output through the actual RazorConsole live canvas for a large-to-blank transition, plus workspace and routing regressions.
Keep Tesey's ACP client, RazorConsole upgrade, and Codex ACP entries under Unreleased. Add rendering highlights, frame-delivery evidence, and accurate targeted and full-suite validation history.
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.
Summary
Switching agents or workspaces could make the CLI feel sluggish. The most noticeable case was moving from a workspace with three agents to a blank workspace: users could watch a black sweep clear the screen from top to bottom.
This PR makes those transitions smoother by delivering each completed screen update together and removing unnecessary redraws. The updated build was tested interactively, and the visible black sweep was confirmed resolved in the user's terminal.
What improves
How it works
The CLI previously delivered screen updates in many small pieces. This change collects a completed frame and sends it to the terminal in one write, with synchronized-output controls that ask supporting terminals to present it together.
Workspace switching now sends one completed change notification instead of three. Status and Git indicators refresh only when their values change, and unchanged conversation history is reused. Background sessions, streamed replies, tool expansion, and keyboard focus retain their existing behavior.
Validation
Changelog and scope
The changelog is updated under
[Unreleased], preserving Tesey's ACP client (#140), the RazorConsole upgrade (#141), and Codex ACP support (#142).These improvements apply to native and ACP panes in the MandoCode CLI. Visual results can vary by terminal, particularly where synchronized output is unsupported. Cross-terminal performance measurements remain future work.