Skip to content

Comments

fix(tui): resolve UI freezes during streaming and tool execution#570

Merged
bug-ops merged 2 commits intomainfrom
fix/499-tui-freeze
Feb 19, 2026
Merged

fix(tui): resolve UI freezes during streaming and tool execution#570
bug-ops merged 2 commits intomainfrom
fix/499-tui-freeze

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 19, 2026

Summary

  • Prioritize user input via biased tokio::select! and batch agent events with try_recv() drain loop to reduce draw calls per event burst
  • Cache rendered message lines (syntax highlighting + markdown + word wrap) per message, invalidating on content change, resize, and toggle events
  • Add RenderCache with content-hash keying and try_recv_agent_event() to App

Changes

File Change
crates/zeph-tui/src/lib.rs Biased select + agent event drain loop
crates/zeph-tui/src/app.rs RenderCache struct, try_recv_agent_event(), invalidation in event handlers
crates/zeph-tui/src/widgets/chat.rs Cache lookup/store in render path

Test plan

  • 1834 workspace tests pass (0 failures)
  • cargo clippy --workspace -- -D warnings clean
  • cargo +nightly fmt --check clean
  • 11 new unit tests for RenderCache and try_recv_agent_event
  • Manual: verify responsive input during fast LLM streaming
  • Manual: verify responsive input during parallel tool execution

Closes #499,Closes #500,Closes #501

@github-actions github-actions bot added bug Something isn't working rust size/L documentation Improvements or additions to documentation and removed bug Something isn't working labels Feb 19, 2026
Batch agent events with biased tokio::select! to prioritize user input,
and cache rendered message lines to eliminate redundant syntax
highlighting and markdown parsing per frame.

Closes #499, #500, #501
@github-actions github-actions bot added the bug Something isn't working label Feb 19, 2026
@bug-ops bug-ops enabled auto-merge (squash) February 19, 2026 00:11
@bug-ops bug-ops merged commit accf934 into main Feb 19, 2026
22 checks passed
@bug-ops bug-ops deleted the fix/499-tui-freeze branch February 19, 2026 00:19
bug-ops added a commit that referenced this pull request Feb 19, 2026
* fix(tui): resolve UI freezes during streaming and tool execution

Batch agent events with biased tokio::select! to prioritize user input,
and cache rendered message lines to eliminate redundant syntax
highlighting and markdown parsing per frame.

Closes #499, #500, #501

* docs: update TUI guide, performance notes, and changelog for freeze fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation rust size/L

Projects

None yet

1 participant