Skip to content

BACK-536 - Add wrapNavigationToSearch config to opt out of the boundary search handoff - #770

Closed
kossakovsky wants to merge 1 commit into
MrLesk:mainfrom
kossakovsky:tasks/back-536-wrap-navigation-to-search
Closed

BACK-536 - Add wrapNavigationToSearch config to opt out of the boundary search handoff#770
kossakovsky wants to merge 1 commit into
MrLesk:mainfrom
kossakovsky:tasks/back-536-wrap-navigation-to-search

Conversation

@kossakovsky

Copy link
Copy Markdown

Summary

In the TUI, pressing j on the last row or k on the first row (or k at the top of the focused detail pane) hands focus to the search input. The wrap is deliberate (back-399), but it surprises vim-style navigation: j/k are expected to stay inside the list, and / and Ctrl+F already focus search directly.

This adds an opt-out config key that keeps today's behavior by default:

  • wrapNavigationToSearch (boolean, default true), available through backlog config get/set/list and documented in ADVANCED-CONFIG.md
  • when false, the handoff stops in the task list, the detail pane, and the kanban board (including empty columns)
  • with the handoff disabled, boundary navigation falls back to the circular wrap both views used before back-399 (introduced in task-248)

Related Issue or Task

Closes #768

Backlog task: BACK-536

Task Checklist

  • I have created a corresponding task in backlog/tasks/
  • The task has clear acceptance criteria
  • I have added an implementation plan to the task
  • All acceptance criteria in the task are marked as completed

Testing

  • bunx tsc --noEmit — passed
  • bun run check . — passed (323 files)
  • bun test — 1670 passed + 2 intentional skips / 0 failed (187 files)
  • new coverage: wrap-disabled cases in task-viewer-boundary-navigation.test.ts, resolveBoardBoundaryToSearch cases in board-ui.test.ts, and a config get/set/list round-trip for the new key

…ry search handoff

In the TUI, pressing j on the last row or k on the first row (or k at the
top of the focused detail pane) hands focus to the search input. The wrap
is deliberate (back-399), but it surprises vim-style navigation: j/k are
expected to stay inside the list, and / and Ctrl+F already focus search
directly. Add an opt-out config key, wrapNavigationToSearch (default
true), that keeps today's behavior by default and, when false, stops the
handoff in the task list, the detail pane, and the kanban board
(including empty columns). With the handoff disabled, boundary navigation
falls back to the circular wrap both views used before back-399.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kossakovsky
kossakovsky force-pushed the tasks/back-536-wrap-navigation-to-search branch from 5b8481a to 3a4486f Compare July 22, 2026 14:13
MrLesk added a commit that referenced this pull request Aug 7, 2026
Closes #768. Supersedes #770's config-key approach per maintainer
decision.

At list/board boundaries, `j`/`k` previously handed focus to the search
input (deliberate in BACK-399, surprising for vim users). Decided
behavior, no new config key: `j`/`k` now stop at boundaries (no wrap, no
handoff) while the arrow keys keep the search handoff, on the task list,
the detail pane, and the board including empty columns; `/` and Ctrl+F
are unchanged.

Implementation splits the shared bindings into arrow/vim families with
one shared boundary resolver; the board's two screen handlers collapse
into one (net −23 lines in board.ts). Filter popups and pickers keep
circular wrap for both families.

Verification: behavior tests driven by real key events with a mutation
control (forcing vim to hand off fails 5 tests), plus real-PTY passes on
all surfaces whose control scripts fail against pre-fix main. Full suite
1951 pass / 0 fail. Independently reviewed with no blocking findings,
including a fork-source analysis confirming no double-scroll in the
detail pane and intact picker wrapping.
@MrLesk

MrLesk commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Alex's agent: Closing this one — the underlying request (#768) shipped on main via #866, but with a different shape than proposed here: rather than adding a config key, j/k now simply never enter the search input at boundaries while the arrow keys keep the handoff, so both vim and regular users get sensible behavior with no new configuration surface. Thanks for the clean implementation and for offering to rescope — the boundary-site map in your diff was genuinely useful when building the shipped version.

@MrLesk MrLesk closed this Aug 7, 2026
@kossakovsky
kossakovsky deleted the tasks/back-536-wrap-navigation-to-search branch August 11, 2026 17:09
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.

[Feature]: Option to disable the boundary jump into the search input (vim-style j/k)

2 participants