Repository navigation
Make saved arrow keys follow every native control - #1318
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
trissim
marked this pull request as ready for review
October 29, 2026 05:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
P917 continuation, AI-generated by toad-keymap (OpenAI Codex). Same issue and same PR as the accepted workspace guard; this now includes the user's reproduced all-arrow failure instead of declaring victory on one prompt.
1. Store availability: accepted earlier checkpoint
ApplicationAction→VimWorkspaceAction→all tab/sidebar movement siblings inherit the same guard. Native current_mode must be workspace BEFORE workspace_screen is resolved. Store legitimately has no initialized workspace stack. Screen identity and focused live-mode eligibility remain unchanged; no second flag, exception handler or eager workspace creation.
Actual earlier sourcec285 controls: mounted StoreScreen returns false without exception; workspace Normal K switches tabs, Insert K remains text, counted2K does not switch. Capped/scrolled INSERT/NORMAL/STANDARD badges, prompt history/draft and F1 Reset were accepted with explicit limits. Store/workspace were two launches, not a continuous transition. Full record:
/home/ts/.cache/agent-scratch/toad-keymap/p917-installed-reset-history/RESULT.md.2. One arrow setting across native controls
Before: KeymapCatalog captured only opted-in callable/action declarations. TextArea.action_cursor_up and CursorUpAction were separate settings with identical titles. Raw DataTable/Tree/List/Menu arrows had no invocation ID and were omitted.
After: KeymapCatalog consumes DOMNode.binding_defaults, the same native raw+nominal projection as dispatch. Textual Binding.make_bindings decodes the declared input identity once; Binding/BindingsMap project the shared UpKey/DownKey/LeftKey/RightKey identity into the actual mode. Toad Action.bindings_for uses that owner rather than supplying another input ID. No per-widget hjkl list, cursor forwarders, synthetic arrow events or second keymap.
Native wrapped movement, modal logical movement, focused method overrides, availability, arity and history/selection remain with their existing owners. The paired native remap overlay preserves distinct native alternatives, deduplicates equal aliases and handles explicit empty/absent overrides as before.
3. F1 cannot hide the global arrow setting
KeyInvocation owns previous-focus visibility. Local commands still use the enabled focused IDs; NavigationKey keeps global arrow preferences visible even from a focus lacking vertical movement. KeymapScreen asks that owner instead of privately reconstructing visibility. Reset remains removal of an override, not an empty override.
Actual installed reproducer
Current installed runtime58645c2af / ToAD8e8c962e7 / Textuale7a48c59; real saved-session CLI in ordinary st/Xvfb, retained copy of sessions and actual user config. Actual Settings→Standard displays STANDARD; prompt k/j navigates genuine history and restores draft918. Sidebar k fails while Up works until a second same-title preference is saved. After BOTH Up rows show up,k, F1's own DataTable still ignores k while Up moves it (34–37). Actual Normal o does nothing (43/44); real Vim is a separate root-owned implementation decision, not patched one key at a time here.
Record:
/home/ts/.cache/agent-scratch/toad-keymap/p917-installed-reset-history/current-remap/RESULT.md. Original user settings were not modified. Owned frontend/display stopped; artifacts retained. No provider submission, synthetic app, new environment or automated ToAD test.Source evidence and install dependency
Before map reuses refactor-audit Package/Repository:308ToAD+256Textual modules,2557classes,1987relevant syntactic sites,45arrow candidates,0parse omissions. Candidates include unrelated literals; dynamic dispatch/MRO need semantic reading and real controls, not syntax counts.
Initial paired source check compiled8modules and imported actual KeymapCatalog:113invocations, exactly one row per arrow, owned by the four native key declarations. No author suite, ratchet or pytest run. Paired Textual has landed. Root must advance the ToAD lock and install the coherent source before live acceptance; this checkpoint does not pretend the old lock loads new code.
Stored arrow preference IDs change. Core#3584 implements the ONE-TIME installer conversion: ten retired TextArea/Input/CursorAction identities map to the actual four NavigationKey declarations; identical ordered choices collapse, conflicts refuse before writes, and unrelated rows/key order are preserved. Both retired arrow identities and the old Vim boolean are converted together in memory before one complete validation and one atomic publication. Root's first proof passed current settings/idempotence/conflict/preservation; the corrected mixed-old-input case awaits root's rerun and installation. No permanent old-name aliases or load-time converters are introduced. Author executed no conversion and touched no live settings. An interrupted scratch copy-conversion tool returned UNKNOWN and left no log or destination; it was not replayed.
Still open
After root installs, Tristan will try F1 save/reopen h/j/k/l across prompt, Input/MaskedInput, sidebar/tree/list/table/menu/modal; genuine history/draft edges, Reset and mode isolation. No further author screenshot sequence. Whole K2–K7 remains open; actual Neovim replacement is separately owned by vim-engine under P928. This source delivery does not claim Vim o works.
Assumed: public native current_mode transitions initialize the stack before activation; native binding state/action contracts remain with each control. Actual corrected behavior, merged state and installed state are separate claims.