Skip to content

Comments

fix(tui): prevent event reader thread termination on mouse events#614

Merged
bug-ops merged 1 commit intomainfrom
fix/tui-event-reader-freeze
Feb 19, 2026
Merged

fix(tui): prevent event reader thread termination on mouse events#614
bug-ops merged 1 commit intomainfrom
fix/tui-event-reader-freeze

Conversation

@bug-ops
Copy link
Owner

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

Summary

  • Fix TUI freeze caused by mouse click/drag/move events killing the event reader thread
  • CrosstermEventSource::next_event() returned None for non-scroll mouse events and unhandled crossterm events (FocusGained/FocusLost/Paste), which terminated the EventReader::run_with_source() loop
  • Replace None with AppEvent::Tick to keep the reader thread alive

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --workspace -- -D warnings
  • cargo nextest run --workspace --lib --bins (2014 passed)
  • Manual verification: TUI remains responsive after mouse clicks

… events

CrosstermEventSource::next_event() returned None for mouse events other
than scroll (click, drag, move) and for unhandled crossterm events
(FocusGained, FocusLost, Paste). Since EventReader::run_with_source()
exits its loop on None, any mouse click killed the event reader thread,
making the TUI unresponsive to all keyboard input.

Return AppEvent::Tick instead of None for ignored events to keep the
reader thread alive.
@github-actions github-actions bot added rust bug Something isn't working size/XS labels Feb 19, 2026
@bug-ops bug-ops enabled auto-merge (squash) February 19, 2026 19:10
@bug-ops bug-ops merged commit a249a3b into main Feb 19, 2026
20 checks passed
@bug-ops bug-ops deleted the fix/tui-event-reader-freeze branch February 19, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working rust size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant