NS8 slice: Add current-file search and in-buffer navigation #48

Closed
opened 2026-06-21 09:12:12 +00:00 by tmk241 · 1 comment
Owner

OBJECTIVE: Search within the current buffer using the KEYMAP.md prompt grammar and navigate results without leaving a permanent split.

AUTHORITY: Parent #43; KEYMAP.md Search and navigation; req: input/001-007, ui/001-002, coding/001, testing/001-004.

AGENT AUTHORITY:

  • Delivery authority: local-commit
  • Tracker authority: this issue may be commented and closed when acceptance passes; parent #43 may be commented/checklisted.
  • Handoff state: committed clean, tracker commented/closed.

PARENT: #43 via explicit issue link and parent checklist.

SCOPE: Prompt mode, current-file search index/result state, visible highlights or result status, next/previous navigation, cancellation/restore, replay tests.

BOUNDARIES: Do not implement project-wide search here except shared prompt primitives if necessary. Do not add regex language unless already a small standard primitive; literal search is sufficient if documented by the rail.

ACCEPTANCE:

  • / or Space s f enters a current-file search prompt.
  • Submitting a query highlights or otherwise marks matches and moves to the first match.
  • n and N or mobile rail aliases move next/previous and wrap predictably.
  • Empty query, no matches, multi-byte UTF-8 text, very long lines, and cancellation are handled visibly.
  • Search state does not corrupt selection, dirty state, or cursor history.

VERIFICATION:

  • zig build test
  • Headless/replay tests for match, no match, wrap, cancel, UTF-8, long-line, and dirty-buffer interactions.
  • zig build v1-smoke

BLOCKERS: none.

OBJECTIVE: Search within the current buffer using the KEYMAP.md prompt grammar and navigate results without leaving a permanent split. AUTHORITY: Parent #43; KEYMAP.md `Search and navigation`; req: input/001-007, ui/001-002, coding/001, testing/001-004. AGENT AUTHORITY: - Delivery authority: local-commit - Tracker authority: this issue may be commented and closed when acceptance passes; parent #43 may be commented/checklisted. - Handoff state: committed clean, tracker commented/closed. PARENT: #43 via explicit issue link and parent checklist. SCOPE: Prompt mode, current-file search index/result state, visible highlights or result status, next/previous navigation, cancellation/restore, replay tests. BOUNDARIES: Do not implement project-wide search here except shared prompt primitives if necessary. Do not add regex language unless already a small standard primitive; literal search is sufficient if documented by the rail. ACCEPTANCE: - `/` or `Space s f` enters a current-file search prompt. - Submitting a query highlights or otherwise marks matches and moves to the first match. - `n` and `N` or mobile rail aliases move next/previous and wrap predictably. - Empty query, no matches, multi-byte UTF-8 text, very long lines, and cancellation are handled visibly. - Search state does not corrupt selection, dirty state, or cursor history. VERIFICATION: - `zig build test` - Headless/replay tests for match, no match, wrap, cancel, UTF-8, long-line, and dirty-buffer interactions. - `zig build v1-smoke` BLOCKERS: none.
tmk241 added the sliceready-for-agentgoal labels 2026-06-21 09:12:12 +00:00
Author
Owner

Completed in commit 70ef989 (Add current file search).

What changed:

  • Added current-file search prompt mode with direct / and canonical Space s f paths.
  • Added literal in-buffer match indexing, first-match selection, n/N next/previous navigation with wrap, no-match status, cancellation, UTF-8 search, and long-line coverage.
  • Made the leader grammar orthogonal with KEYMAP.md: Space w is write/save and Space s opens a search rail; Space s f is current-file search.
  • Updated launcher/help/mobile acceptance tests from the old Space s save shortcut to Space w.

Verification:

  • zig fmt src/leader.zig src/tui.zig src/main.zig src/mobile_acceptance.zig && zig build test
  • zig build
  • zig build v1-smoke
  • zig build run -- --help
  • zig build run -- src/main.zig
  • redgate lint /opt/repositories/mim/REQUIREMENTS.md && redgate health /opt/repositories/mim/REQUIREMENTS.md

Notes:

  • Project-wide search remains scoped to #49. This slice is current-file search/navigation only.
Completed in commit 70ef989 (`Add current file search`). What changed: - Added current-file search prompt mode with direct `/` and canonical `Space s f` paths. - Added literal in-buffer match indexing, first-match selection, `n`/`N` next/previous navigation with wrap, no-match status, cancellation, UTF-8 search, and long-line coverage. - Made the leader grammar orthogonal with KEYMAP.md: `Space w` is write/save and `Space s` opens a search rail; `Space s f` is current-file search. - Updated launcher/help/mobile acceptance tests from the old `Space s` save shortcut to `Space w`. Verification: - `zig fmt src/leader.zig src/tui.zig src/main.zig src/mobile_acceptance.zig && zig build test` - `zig build` - `zig build v1-smoke` - `zig build run -- --help` - `zig build run -- src/main.zig` - `redgate lint /opt/repositories/mim/REQUIREMENTS.md && redgate health /opt/repositories/mim/REQUIREMENTS.md` Notes: - Project-wide search remains scoped to #49. This slice is current-file search/navigation only.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tmk241/mim#48