Skip to content

fix(tui): isolate blocking work from rendering - #400

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/tui-blocking-work-isolation
Aug 19, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/tui-blocking-work-isolation

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

  • run model, tool, approval, streaming, and compaction futures behind a blocking-pool isolation boundary so non-cooperative work cannot starve terminal input or rendering
  • keep the complete TUI application tick running during foreground work, including file watching, background tasks, connection polling, approvals, overlays, and transient chrome
  • defer Files tree rebuilds received during explorer navigation and apply one coalesced refresh when focus leaves
  • add current-thread regressions proving blocking model, tool, and compaction work cannot delay cancellation

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo test --workspace --all-targets --locked
  • real PTY stress runs of 232 seconds and 332 seconds
  • during active model/tool work: queued prompts, typing bursts, Tab and Shift+Tab navigation, Files navigation, wheel scrolling, F1 overlay, busy-state F4, context-menu mouse events, terminal resizing from 70x20 through 160x50, watcher churn, and cancellation
  • isolated cancellation reached Cancelled in under 200ms

No dedicated UI thread is introduced: Ratatui remains single-owner while potentially blocking work is isolated away from the executor that drives the TUI.

@github-actions
github-actions Bot enabled auto-merge (squash) August 19, 2026 00:26
@github-actions
github-actions Bot merged commit 6299da3 into main Aug 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant