Repository navigation
Conversation
Adds Alt+ArrowUp / Alt+ArrowDown keyboard shortcuts to navigate between plan questions without reaching for the mouse. Alt modifier avoids conflicts with normal cursor movement within the text input. Also adds tooltip hints to Previous/Next buttons showing the shortcuts. Fixes pingdotgg#528
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI 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 |
Only reset the composer when the active pending question changes. Previously the effect depended on the whole pending progress object, so editing the answer retriggered the effect and forced the cursor to the end on every keystroke. That broke left/right arrow movement and click-to-reposition in question-answer mode. Also keeps the earlier Alt+↑ / Alt+↓ keyboard navigation improvement. Fixes pingdotgg#528
|
closing this for now because it does not follow our contribution guidelines: for ui changes, please include clear before/after screenshots, and a short video if the change depends on motion or interaction details. feel free to update the pr with that context and reopen it. |
The sidebar's PR badge abbreviates for its narrow column, so on the working page "+14", "10", or a bare layer count was hard to read. The badge takes an optional full-text style that the page uses: "pingdotgg#529 +13", "pingdotgg#10", and "3 stacked". The sidebar keeps its compact text. Threads with only a branch or legacy linked PR now get a tag too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Fixes the broken cursor behavior in the plan question flow, where editing an answer could force the cursor back to the end on every keystroke and make left/right arrow navigation or click-to-reposition feel broken.
Also adds keyboard shortcuts for moving between questions without reaching for the mouse.
Root cause
The composer reset effect in
ChatView.tsxwas keyed on the entire pending progress object.Because
activePendingProgress.customAnswerchanges on every keystroke, the effect re-ran while typing and called:setComposerCursor(activePendingProgress.customAnswer.length)setComposerTrigger(...)That continuously shoved the cursor to the end of the answer in question mode.
Fix
apps/web/src/components/ChatView.tsxResult
In question-answer mode:
Testing
npx vitest run apps/web/src/pendingUserInput.test.ts apps/web/src/session-logic.test.tsFixes #528
Note
Preserve cursor position while answering plan questions in
ChatViewand add Alt+↑/Alt+↓ navigation shortcuts in ChatView.tsxLimit the composer reset
useEffectdependencies toactivePendingProgress?.activeQuestion?.id,activePendingQuestionIndex, andactivePendingUserInput?.requestId, and handle Alt+ArrowUp/Alt+ArrowDown in the composer key handler; add shortcut tooltips to pending-question buttons in ChatView.tsx.📍Where to Start
Start with the composer reset
useEffectandonComposerKeyDownhandler in ChatView.tsx.Macroscope summarized 732d906.