Skip to content

fix(editor): configure completion navigation keys#106

Open
ggallovalle wants to merge 1 commit into
ZenNotes:mainfrom
ggallovalle:fix/98
Open

fix(editor): configure completion navigation keys#106
ggallovalle wants to merge 1 commit into
ZenNotes:mainfrom
ggallovalle:fix/98

Conversation

@ggallovalle

Copy link
Copy Markdown

Summary

  • Add an Editor setting for palette/completion navigation keys: Ctrl+N/P, Ctrl+J/K, or both
  • Update panel and wikilink completion hints to reflect the configured mode
  • Keep CodeMirror completion navigation shortcuts from bubbling into global Search Notes while autocomplete is active

Fixes #98

Verification

  • npm run typecheck --workspace @zennotes/app-core
  • npm run test:run --workspace @zennotes/app-core -- palette-nav.test.ts
  • NODE_OPTIONS=--localstorage-file=/tmp/zennotes-vitest-localstorage.json npm run test:run --workspace @zennotes/app-core

Notes

  • npm run build reached TS/web/desktop builds, then failed in the local Go server build because the local Go toolchain/std library versions differ: go1.26.2 compiled packages vs go1.26.4-X:nodwarf5 tool.

@ggallovalle
ggallovalle requested a review from adibhanna as a code owner June 11, 2026 07:24
@ggallovalle

Copy link
Copy Markdown
Author

Manual test plan:

  1. Settings mode: Ctrl+N/P

    • Settings → Editor → Panel navigation keys = Ctrl+N/P
    • In editor, type [[
    • Ctrl+N moves completion down.
    • Ctrl+P moves completion up / stays bounded.
    • Ctrl+J / Ctrl+K do not move.
    • Search Notes must not open.
    • Footer says Ctrl+N/P.
  2. Settings mode: Ctrl+J/K

    • Type [[
    • Ctrl+J moves down.
    • Ctrl+K moves up.
    • Ctrl+N / Ctrl+P do not move.
    • Search Notes must not open.
    • Footer says Ctrl+J/K.
  3. Settings mode: Both

    • Type [[
    • Ctrl+N, Ctrl+P, Ctrl+J, Ctrl+K all navigate.
    • Search Notes must not open.
    • Footer says Ctrl+N/P or J/K.
  4. Slash/date completions

    • Type / at line start.
    • Repeat configured/unconfigured shortcut checks.
    • Expected: configured keys navigate; unconfigured keys do not open global panels.
  5. No autocomplete open

    • Close completion with Esc.
    • Press Ctrl+P.
    • Expected: normal Search Notes opens.
  6. Panels

    • Test Search Notes, Command Palette, Buffer Palette, Outline, Template palette, Vault text search.
    • Configured shortcuts move selection.
    • Unconfigured shortcuts do not move selection.
    • Ctrl+P does not toggle/open Search Notes from inside another panel.
    • Footer hint matches setting.
  7. Edge cases

    • Empty [[zzzz completion.
    • First item + previous key.
    • Last item + next key.
    • Vim mode on/off.
    • Insert mode vs normal mode.
    • Pinned reference editor completion.
    • Template editor completion.

Fail if:

  • Search Notes opens while a CodeMirror completion tooltip is visible.
  • Hint disagrees with setting.
  • Configured keys do not move.
  • Unconfigured keys trigger global panels while completion is visible.

@ggallovalle

Copy link
Copy Markdown
Author

Disclosure: this change was implemented with assistance from an AI coding agent (OpenAI Codex) under maintainer direction and review.

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.

Navigate ui pickers with <C-j> and <C-k>

1 participant