feat(tui): add g/G keybindings to scroll messages view#2528
Merged
dgageot merged 2 commits intodocker:mainfrom Apr 27, 2026
Merged
Conversation
Pressing 'g' on the focused messages view jumps to the very top, and 'G' jumps to the very bottom, mirroring the existing home/end behavior. Both keys are wired into the existing scrollToTop / scrollToBottom cases, so no new code paths are introduced. Assisted-By: docker-agent
- Test g/G with empty messages (should not panic) - Test g/G during inline edit mode (should type into textarea, not scroll) These tests ensure the keybindings work correctly in all scenarios. Assisted-By: docker-agent
trungutt
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Vim-style scroll keybindings to the messages view in the TUI:
gjumps to the very top of the messages viewGjumps to the very bottomBoth keys are wired into the existing
case "home"/case "end"cases inhandleKeyPress, reusing the existingscrollToTop/scrollToBottompaths — no new code paths are introduced. The keys only act when the messages view is the focused panel; otherwise they are forwarded to the editor (sog/Gtyped during inline edit mode go into the textarea as expected).Tests
TestKeyGAndShiftGScrollMessagesView— verifiesgjumps to the top andGjumps to the bottom when the messages view is focused.TestKeyGAndGWithEmptyMessages— verifiesg/Gare safe (no panic) with an empty message list.TestKeyGAndGDuringInlineEdit— verifiesg/Gare typed into the textarea during inline edit instead of triggering scroll.All tests, lint (
golangci-lint run ./...), andgo vetpass cleanly.