Commit 4ad692d
committed
fix(cli): fix input history navigation after mode changes (e.g., feedback mode)
- Add isNavigatingRef flag to prevent useEffect reset during cross-mode navigation
- Allow Ctrl+V paste in feedback mode by whitelisting it in keyboard-actions.ts
- Fix logic order in chat-input-bar.tsx to check suggestion menus before history
- Eliminate code duplication by having useEffect call resetHistoryNavigation()
- Add comprehensive unit tests for cross-mode history navigation (40 tests)
Fixes the bug where users couldnt navigate through input history with
up/down arrow keys after changing modes (entering/exiting feedback mode,
bash mode, etc).1 parent be34f79 commit 4ad692d
File tree
5 files changed
+760
-21
lines changed- cli/src
- components
- hooks
- __tests__
- utils
5 files changed
+760
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
| 750 | + | |
| 751 | + | |
751 | 752 | | |
752 | 753 | | |
753 | 754 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | 129 | | |
135 | 130 | | |
136 | 131 | | |
137 | 132 | | |
138 | 133 | | |
139 | 134 | | |
140 | 135 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
146 | 139 | | |
147 | | - | |
148 | | - | |
149 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
150 | 148 | | |
151 | 149 | | |
152 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| |||
0 commit comments