Fix TUI left/right arrow navigation direction#451
Conversation
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: Combined Review (
|
handleNextKey uses nextIdx, handlePrevKey uses prevIdx. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined Review (
|
…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: Combined Review (
|
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: Combined Review (
|
Summary
findPrev*/findNext*nav functions so Prev = older (lower ID, higher array index) and Next = newer (higher ID, lower array index), matching theid DESCsort order of the queuehandlePrevKey/handleNextKeydefinitions to match the corrected namingj/left→ prev (older) andk/right→ next (newer)handlers_msg.goto use renamed functions🤖 Generated with Claude Code