Skip to content

feat(tui): add wrap-around navigation to all menus and move modes - #332

Merged
sirmalloc merged 1 commit into
sirmalloc:mainfrom
iamvkosarev:feat/wrap-around-navigation
Apr 24, 2026
Merged

sirmalloc merged 1 commit into
sirmalloc:mainfrom
iamvkosarev:feat/wrap-around-navigation

Conversation

@iamvkosarev

Copy link
Copy Markdown
Contributor

Summary

  • Enable circular cursor movement across all TUI menus and lists — pressing up at the first item wraps to the last, and pressing down at the last wraps to the first
  • Also applies to move/reorder modes, allowing items to be moved cyclically through list boundaries
  • No existing PR covers this functionality

Changes

  • List.tsx — change wrapNavigation default from false to true, enabling wrap-around for all <List>-based menus (MainMenu, InstallMenu, PowerlineSetup, etc.)
  • input-handlers.ts — replace Math.max/Math.min clamping with wrap-around logic in handleNormalInputMode, handleMoveInputMode, and handlePickerInputMode
  • PowerlineSeparatorEditor.tsx — wrap-around for separator list navigation
  • LineSelector.tsx — wrap-around in line move mode

Test Plan

  • 789 tests pass (10 new), TypeScript and ESLint clean
  • New tests cover wrap boundaries for: normal mode (up/down), move mode (up/down), picker categories (up/down), picker widgets (up/down), and top-level search (up/down)

Enable circular cursor movement across all TUI menus and lists —
pressing up at the first item wraps to the last, and pressing down
at the last wraps to the first. Also applies to move/reorder modes,
allowing items to be moved cyclically through the list boundaries.

Added 10 unit tests covering wrap-around boundaries for normal
navigation, move mode, picker categories, widgets, and top-level search.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@sirmalloc
sirmalloc merged commit c5a209b into sirmalloc:main Apr 24, 2026
3 checks passed
@sirmalloc

Copy link
Copy Markdown
Owner

Nice! I like it. I'll publish it in the next release.

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.

2 participants