Skip to content

Fix TUI left/right arrow navigation direction#451

Merged
wesm merged 4 commits intomainfrom
fix/tui-left-right-arrows
Mar 6, 2026
Merged

Fix TUI left/right arrow navigation direction#451
wesm merged 4 commits intomainfrom
fix/tui-left-right-arrows

Conversation

@wesm
Copy link
Collaborator

@wesm wesm commented Mar 6, 2026

Summary

  • Rename all findPrev*/findNext* nav functions so Prev = older (lower ID, higher array index) and Next = newer (higher ID, lower array index), matching the id DESC sort order of the queue
  • Swap handlePrevKey/handleNextKey definitions to match the corrected naming
  • Update key bindings so j/left → prev (older) and k/right → next (newer)
  • Update pagination auto-navigate calls in handlers_msg.go to use renamed functions
  • Update all arrow key test expectations across queue, review navigation, and log navigation tests

🤖 Generated with Claude Code

The nav functions findPrevViewableJob/findNextViewableJob (and their
promptable, loggable, and fix variants) were named opposite to their
actual behavior relative to review IDs. Since the queue is sorted by
id DESC, scanning higher indices means older (lower ID) reviews and
scanning lower indices means newer (higher ID) reviews.

Rename all find{Prev,Next}* navigation functions so Prev = older
(lower ID, higher index) and Next = newer (higher ID, lower index).
Update key bindings so j/left → handlePrevKey (older) and
k/right → handleNextKey (newer). Update all tests to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@roborev-ci
Copy link

roborev-ci bot commented Mar 6, 2026

roborev: Combined Review (164b4bb)

Verdict: The commit successfully standardizes TUI navigation semantics, and no issues of Medium severity or higher were identified.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

handleNextKey uses nextIdx, handlePrevKey uses prevIdx.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@roborev-ci
Copy link

roborev-ci bot commented Mar 6, 2026

roborev: Combined Review (e5dea43)

Verdict: The code is clean; no medium, high, or critical issues were found by the review
agents.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

…onvention

The list-position naming (prev=lower index, next=higher index) was
opposite the chronological convention used by all other find* nav
functions. Swap names so findPrevVisibleJob scans toward older (higher
index) and findNextVisibleJob scans toward newer (lower index).

Also fix local variable names throughout handlers so prevIdx is always
returned by findPrev* and nextIdx by findNext*.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@roborev-ci
Copy link

roborev-ci bot commented Mar 6, 2026

roborev: Combined Review (94a1e5a)

Verdict: All agents
agree the code is clean, with no medium, high, or critical severity issues found.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

Covers the gap flagged in review: verifies pgdown moves toward older
(higher index) and pgup moves toward newer (lower index), including
skipping hidden jobs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@roborev-ci
Copy link

roborev-ci bot commented Mar 6, 2026

roborev: Combined Review (0024ce6)

Verdict: The provided commits cleanly refactor TUI navigation and semantics without introducing any medium or higher severity issues.

All agents agree the code is clean.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@wesm wesm merged commit 49dc4fb into main Mar 6, 2026
8 checks passed
@wesm wesm deleted the fix/tui-left-right-arrows branch March 6, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant