Skip to content

Make saved arrow keys follow every native control - #1318

Merged
trissim merged 2 commits into
mainfrom
work/toad-keymap--P917--workspace-availability
Oct 29, 2026
Merged

trissim merged 2 commits into
mainfrom
work/toad-keymap--P917--workspace-availability

Conversation

@trissim

@trissim trissim commented Oct 29, 2026 •

Copy link
Copy Markdown

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.

  • Two ToAD commits at this checkpoint;3files,+15/-12 against main, including the accepted+2/-0 workspace guard.
  • Paired native change: Give every native arrow control the same saved key preference textual#207,53afce36bc83859c956a37cca86a967663c53c27;5files,+179/-78; merged79a8a6d69eed1d3300b54b12c490bc7d3753ee9c.
  • Saved-settings companion: Carry saved arrow preferences for the P917 keyboard repair agent-comms#3584,1013b069222de401b9da72380e301181f74a2d65;2files,+133/-8. Root owns actual conversion checks and installation; Tristan explicitly owns live keyboard acceptance. Author UI exercises are stopped.
  • Four global arrow preferences replace the two same-title cursor identities and raw controls missing from F1. Controls retain their own movement implementation.

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.

configured both Cursor up rows
the keybinding table still ignored k
one shared arrow setting; stop charging admission per widget

Copilot AI balanced review requested due to automatic review settings October 29, 2026 03:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 trissim changed the title Keep workspace shortcut availability within the active native mode Make saved arrow keys follow every native control Oct 29, 2026
@trissim
trissim marked this pull request as ready for review October 29, 2026 05:50
@trissim
trissim merged commit 485fd79 into main Oct 29, 2026
1 of 3 checks passed
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