fix: restore PR #426 g/G navigation reverted by #419 rebase - #428
Merged
Conversation
PR #426 (g/G navigation in incident viewer) was silently reverted when PR #419's rebase resolved a conflict by keeping only the #419 side. CI could not catch it because the feature and its test were removed together. This restores all three changes verbatim from PR #426. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
Problem
PR #426 added g/G (top/bottom) keyboard navigation to the incident viewer and fixed the
getlintMakefile target. It merged successfully, but PR #419's rebase resolved a conflict by keeping only
the #419 side, silently dropping all three #426 changes. CI could not catch the regression because
the feature code AND its test were removed together — a consistent, green tree.
Approach
Surgical restoration of the exact changes from PR #426, verified line-by-line against
gh pr diff 426 --repo clcollins/srepd. No modifications, no adjacent changes.Changes restored
pkg/tui/msgHandlers.go— twocaseblocks inswitchIncidentFocusModehandlingdefaultKeyMap.Top/Bottomto callGotoTop()/GotoBottom()on the incident viewer viewport.pkg/tui/model_test.go—TestIncidentViewer_TopBottomcovering the above navigation.Makefile— line 71 of thegetlinttarget changed from@which golangci-lintto$(BIN_DIR)/golangci-lint, ensuring the project-local binary is used.Revert checks
Deleted the two
caseblocks fromswitchIncidentFocusMode, confirmedTestIncidentViewer_TopBottomFAILS, restored:After restoring the code:
Test evidence
make lint: 0 issuesgo test ./pkg/tui/... -count=1: PASSmake test-raceforpkg/tui: PASS (86.7s)cmdtest failure onorigin/main(unrelated to this PR)Per-file verification against PR #426
Makefile@which golangci-lint→$(BIN_DIR)/golangci-lintpkg/tui/model_test.goTestIncidentViewer_TopBottompkg/tui/msgHandlers.goswitchIncidentFocusModeTesting this live
make build./dist/srepd_linux_amd64_v1/srepd --devG— EXPECT: viewport scrolls to bottomg— EXPECT: viewport scrolls to topVisual validation
tui-mcp was not available in this environment (headless container). The test
TestIncidentViewer_TopBottomexercises the exact key dispatch and viewportoffset assertions that verify the feature works correctly.
🤖 Generated with Claude Code