Commit 41ed015
authored
🤖 Cmd+2 returns focus to Review tab (#338)
## Summary
Pressing Cmd+2 (Ctrl+2 on Windows/Linux) while already on the Code
Review tab now returns keyboard focus to the panel, enabling immediate
keyboard navigation without clicking.
## Implementation
Uses a simple prop trigger pattern:
- `RightSidebar` increments `focusTrigger` counter when Cmd+2 is pressed
on active Review tab
- `ReviewPanel` watches trigger and calls `.focus()` on panel ref
- Hunk selection is preserved (doesn't jump to first hunk)
## Behavior
- **Cmd+1**: Switch to Costs tab
- **Cmd+2**: Switch to Review tab (or refocus if already active)
- **j/k/↑/↓**: Navigate between hunks (after panel has focus)
- **m**: Toggle hunk read/unread
- **Space**: Expand/collapse hunk
## Why This Matters
Code review with keyboard is faster when you can instantly return focus
from chat input to the review panel. Previously, you had to click on the
panel or tab through UI elements.
_Generated with `cmux`_1 parent 5aefd57 commit 41ed015
File tree
2 files changed
+23
-2
lines changed- src/components
- RightSidebar/CodeReview
2 files changed
+23
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
182 | 185 | | |
183 | 186 | | |
184 | 187 | | |
| |||
192 | 195 | | |
193 | 196 | | |
194 | 197 | | |
195 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
196 | 204 | | |
197 | 205 | | |
198 | 206 | | |
199 | 207 | | |
200 | 208 | | |
201 | | - | |
| 209 | + | |
202 | 210 | | |
203 | 211 | | |
204 | 212 | | |
| |||
337 | 345 | | |
338 | 346 | | |
339 | 347 | | |
| 348 | + | |
340 | 349 | | |
341 | 350 | | |
342 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
274 | 276 | | |
275 | 277 | | |
276 | 278 | | |
| 279 | + | |
277 | 280 | | |
| 281 | + | |
278 | 282 | | |
279 | 283 | | |
280 | 284 | | |
| |||
322 | 326 | | |
323 | 327 | | |
324 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
325 | 336 | | |
326 | 337 | | |
327 | 338 | | |
| |||
633 | 644 | | |
634 | 645 | | |
635 | 646 | | |
| 647 | + | |
636 | 648 | | |
637 | 649 | | |
638 | 650 | | |
| |||
0 commit comments