feat(desktop): add scroll to bottom for terminal#653
Conversation
Add Cmd+Shift+Down hotkey and context menu option to quickly jump to the bottom of terminal output. Useful for returning to current prompt after scrolling through command history. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR adds a "Scroll to Bottom" terminal action: new hotkey (meta+shift+down), context-menu item, terminal callback registration/unregistration, and wiring through the terminal-callbacks store so panes can invoke scroll-to-bottom behavior. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User
participant UI as TabPane / ContextMenu
participant Store as TerminalCallbacksStore
participant Terminal
participant XTerm
rect rgb(240,248,255)
Note right of Terminal: Terminal lifecycle registers callback
Terminal->>Store: registerScrollToBottomCallback(paneId, callback)
end
alt Keyboard shortcut pressed (meta+shift+down)
User->>Terminal: press hotkey
Terminal->>Terminal: hotkey handler checks focus
Terminal->>XTerm: xterm.scrollToBottom()
else User selects context menu item
User->>UI: click "Scroll to Bottom"
UI->>Store: getScrollToBottomCallback(paneId)
Store-->>UI: return callback
UI->>Terminal: invoke callback()
Terminal->>XTerm: xterm.scrollToBottom()
end
rect rgb(240,255,240)
Note right of Terminal: Terminal unregisters callback on teardown
Terminal->>Store: unregisterScrollToBottomCallback(paneId)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
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 |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
* feat(desktop): add scroll to bottom for terminal Add Cmd+Shift+Down hotkey and context menu option to quickly jump to the bottom of terminal output. Useful for returning to current prompt after scrolling through command history. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * style: fix biome formatting for terminal-callbacks --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Summary
scrollToBottom()methodImplementation
SCROLL_TO_BOTTOMhotkey definition to shared hotkeysTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.