brain: Keep Tab responsive while saving
f15f7c86d8a999787eb7629d8c3b8033cf9fcc65
Accept the final hunk and press Tab before the review finishes saving: the commit view ignores the key and stays open. Treat Tab as safe navigation during repository persistence so the history view opens immediately while the save continues in the background. Assisted-by: Codex:gpt-5.6-sol
1 parent
5e9d3fd6
crates/brain/src/session.rs
+3 -0
| 100 | 100 | } |
|
| 101 | 101 | } |
|
| 102 | 102 | ||
| 103 | 103 | /// Returns whether `event` is read-only navigation in this view. |
|
| 104 | 104 | fn allows_navigation_during_persistence(&self, event: &Event<()>) -> bool { |
|
| 105 | + | if matches!(event, Event::Key(Key::Tab)) { |
|
| 106 | + | return true; |
|
| 107 | + | } |
|
| 105 | 108 | match self { |
|
| 106 | 109 | Self::Commits => matches!( |
|
| 107 | 110 | event, |
|
| 108 | 111 | Event::Key(Key::Char('j' | 'k') | Key::Down | Key::Up) |
|
| 109 | 112 | | Event::Mouse(Mouse::Press { |
a.rs
+0 -0