-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tui): avoid tui shutdown on unrecognized input (#9289)
### Description This PR does 3 things: - Fix run summary from being printed out during watch mode which corrupts the TUI - Adds additional debug logs recording the reason for the TUI shutting down - Fixes bug where `poll` could now return `None` even if input streams were still available The bug came down to: - A crossterm event was received - Translating the crossterm event via `input_options.handle_crossterm_event` returned `None` (This makes total sense, not every terminal event requires a response from the TUI) - This `None` was returned instead of waiting for more input or a tick event - The `while let Some(event) = poll(...)` loop would exit which triggers a TUI shut down ### Testing Instructions `npx create-turbo@latest` and then start up the TUI `turbo dev --ui=tui`, without hitting `Enter` to focus the task hit `q` multiple times and you should see the TUI shut down. Use `turbo` built from this PR and try the same thing. The TUI should not shut down on the press of `q`.
- Loading branch information
1 parent
9375ef9
commit c2190a3
Showing
4 changed files
with
52 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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