feat(panel): jump to top/bottom with cmd+up/down#114
Merged
Conversation
⌘↑/↓ now jumps the current page to its first/last item, from any scroll position. Hooks into the existing cmdOnly block in panelHandlesKey and dispatches per mode via jumpToEdge: - Events / Sessions / Tickets / Settings / Phrases move the selection to the first/last row — the viewport follows, since each page already scrolls to its selection. - Usage: the client list jumps first/last client; the detail pane (no selection) scrolls the clip view to the top/bottom edge. - Modal/single-purpose screens return false so the keystroke passes through. Adds selectFirst/selectLast helpers to EventStore, Phrases, and PanelNav (settings rows, outcomes index, usage client) and a scrollDetailToEdge analog to scrollDetailBy. Each page footer gains a "Top/Bottom ⌘↑↓" hint. Tests: EventStore first/last (incl. empty) and PanelNav settings-row jumps. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
hiskudin
reviewed
Jul 1, 2026
hiskudin
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the diff. Small, focused, tested — no changes needed from me.
- Dispatch table in
jumpToEdgeis the right shape:.sessionsguardsrenamingPID == nilbefore intercepting (so ⌘↑/↓ passes through into the rename field where it's expected as text-nav), and modal/single-purpose screens fall through thedefaultreturningfalse. - Usage split (
usageDetailFocused→scrollDetailToEdge, otherwise client list first/last) mirrors the existing ↑↓ handling.scrollDetailToEdgeclampsmaxY = max(0, doc.frame.height - clip.bounds.height)correctly for the short-content case. - Empty-store test on
EventStore.selectFirstis a nice touch — assertsselectedID == nilrather than crashing.
Tiny style nit only (not worth a change): selectFirstUsageClient / selectLastUsageClient are semicolon-chained one-liners while selectFirstRow / selectLastRow a few functions later use guarded assignment across lines. Trivially inconsistent.
Ship it.
hiskudin
approved these changes
Jul 1, 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.
Summary
Adds ⌘↑ / ⌘↓ to jump the current page to its first / last item, from any
scroll position — on every list page in the panel.
Changes
⌘↑/↓case in the existingcmdOnlyblock ofpanelHandlesKey,dispatching per mode through a new
jumpToEdge(top:):the first/last row — the viewport follows, since each page already scrolls
to its selection.
(no selection) scrolls the clip view to the top/bottom edge.
post-update) return
false, so the keystroke passes through untouched.selectFirst/selectLasthelpers onEventStore,Phrases, andPanelNav(settings rows, outcomes index, usage client), plus a
scrollDetailToEdgeanalog to the existing
scrollDetailBy.Top/Bottom ⌘↑↓hint.Testing
./build.sh→ Build complete, zero warnings (rebased onto 1.20.3).EventStoreTestsandSettingsRowTestscover the first/last jump helpers(incl. empty-store); run in CI via
swift test.lands on the first/last row, and the Usage detail pane scrolls to its edges.
Related issues
Companion to the Tickets-tab cursor-nav smoothing (#113). No tracked issue.