Add ctrl navigation to cmux theme picker#60
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds Ctrl-N/Ctrl-P one-row navigation to the cmux theme picker in both normal and search modes, and fixes a pre-existing bug where
Confidence Score: 5/5Safe to merge — the change is tightly scoped to key-event dispatch in the theme picker TUI and does not touch any file I/O, config writing, or network paths. All three changes are consistent with the surrounding code patterns: Ctrl-N/P in normal mode follow the same if-chain style as existing navigation keys; the search-mode handlers correctly use break :search to skip text_input.update() and are ordered before the fall-through path; and the kp_page_down fix corrects a copy-paste error. down() and up() both guard against empty filtered lists, and applyCmuxSelectionForCurrentTheme() has its own early-return guard, so the new call sites are safe. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
KP[Key Press received]
KP --> ModeSwitch{self.mode}
ModeSwitch --> Normal[".normal"]
ModeSwitch --> SearchLabel["search: block"]
Normal --> CtrlN_Norm{"Ctrl-N?"}
CtrlN_Norm -- yes --> Down1_N["self.down(1)\napplyCmuxSelection()"]
CtrlN_Norm -- no --> ArrowDown{"j / + / ↓ / kp_down / kp_add?"}
ArrowDown -- yes --> Down1_N
Normal --> CtrlP_Norm{"Ctrl-P?"}
CtrlP_Norm -- yes --> Up1_N["self.up(1)\napplyCmuxSelection()"]
CtrlP_Norm -- no --> ArrowUp{"k / - / ↑ / kp_up / kp_subtract?"}
ArrowUp -- yes --> Up1_N
Normal --> PgDown{"page_down / kp_page_down?\n[FIXED: was kp_down]"}
PgDown -- yes --> Down20["self.down(20)\napplyCmuxSelection()"]
SearchLabel --> ESC{"Escape?"}
ESC -- yes --> Normal_mode["self.mode = .normal\nbreak :search"]
ESC -- no --> CtrlN_S{"Ctrl-N?"}
CtrlN_S -- yes --> Down1_S["self.down(1)\napplyCmuxSelection()\nbreak :search\n(stays in search mode)"]
CtrlN_S -- no --> CtrlP_S{"Ctrl-P?"}
CtrlP_S -- yes --> Up1_S["self.up(1)\napplyCmuxSelection()\nbreak :search\n(stays in search mode)"]
CtrlP_S -- no --> TextInput["text_input.update()\nupdateFiltered()\napplyCmuxSelection()"]
Reviews (1): Last reviewed commit: "Add ctrl navigation to cmux theme picker" | Re-trigger Greptile |
Summary
Validation