Repository navigation
Opt in to shared native Vim editing and navigation - #664
Merged
Merged
Conversation
# Conflicts: # pyproject.toml # uv.lock
# Conflicts: # src/toad/widgets/session_tabs.py
# Conflicts: # src/toad/screens/historical_sessions.py
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
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.
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.
Opt-in native Vim editing, navigation and hints
Merged, installed by Codex, and hints/copy/navigation verified in the actual app: Toad main
e8716b963a02f0844d4696ed6d5eb6e35b3a9dbf, pinned Textual18f4e7a67403d56846ef5abf55c93e3e0639be33(Textual main merge2d3aecb5106db6e0048d8b8ec21a9837f6d7f64b). Current main's CLI changes retained by ordinary conflict-free merge.Installed acceptance (10603)
Real
~/.local/bin/toad, plain st on isolated :278, published e871/Core2209/native6468 runtime; no source overlay. Existing running toad-ui-2 saved history, copied opt-in config, no model input or new participant. Menu hint reopening visibly went 2→0→2→0→2 at 250 ms intervals. Hint a opened the real export dialog; with its two hints visible, a pointer click focused the path Input and focus remained there in a later capture. Hint s cancelled the dialog without exporting. These close the two prior preview coverage gaps.Visual 0/w/v/e selected beta and y copied exactly beta to the isolated system clipboard. Native Home/Shift+End and Ctrl+C copied the whole draft without clearing it. Edit/undo restored it. Ctrl+U/D navigated saved history, G returned latest, i returned to editing. Own original empty draft restored before Ctrl+Q; frontend/ACP/pool/display all closed, participant retained.
Evidence:
.artifacts/vim/live-installed-e871-normal/OWNER, menu-cleared/reopened-{1,2}.png, dialog-active-at-click.png, dialog-click-focus{,-settled}.png, visual-word-selection.png, copied-word.txt, native-selected-copy.png, copied-native-selected.txt, vim-page-{up,down}.png. The workspace-active-at-click image has no labels and is not used as active-hint proof. Initial inherited-PATH failed launch and mistaken Ctrl+A/Home assumption are retained separately, not passed off as successes. No automated tests, performance claim, forced scheduler interleaving or exhaustive Vim/IME claim.Single-owner hint repair (10285)
The old duplication was stupid: Screen kept a session pointer alongside native children, while HintSession repeated its targets in three collections. HintHost now supplies the three Screen hint methods through C3 and queries direct native children. The session pointer and targets/choices arrays are deleted; each label owns its target and its existing Static content supplies its key. Activation owns decoding exposed paint; the compositor retains published-geometry ownership.
Also removed a real bad dependency: the supposed immediate focus restoration used Widget.focus(), which queues a callback. HintSession now uses Screen.set_focus() immediately, so restoration does not enqueue a later overwrite of pointer focus.
Before/after source queries:
.artifacts/vim/owner-repair-{before,after}.txt, 283 Toad / 254 Textual modules, no parse omissions. Imports and actual Screen/Workspace C3 hooks were checked. Shepherd reviewed this change in 10382. Original receiving commands were rerun: both still exit 1 with the installed heuristic checker; results remain inowner-repair-{toad,textual}-ratchet.json. Slop-census owns the separate checker correction; no thresholds, exemptions or product spelling changed to hide counts.Plain st/:278 source preview using the existing running toad-ui-2 saved session, without model input: hints appeared; Settings removed them and return left no stale hints; reopening produced one visible label set; clicking the prompt left it visibly focused. This is not an installed-launcher check or a forced click/late-callback race. Screenshots in
.artifacts/vim/live-owner-repair/, especiallyhints-settled.png,settings-painted.png,modal-physical-return.png,reopen-valid-escape-immediate.png,actual-click-settled.png. Initial read-only remote observations preceded the instruction to stop that inspection; later checks used only physical keys/pointer and screenshots. Early fast Escape/f sequences were ambiguous under the native 100 ms ESC delay; the separated-key run is retained too. No zero-ratchet or installed-app claim.Earlier implementation and verification
Paired with OpenHCSDev/textual#134. Integration head: Toad
8c264fb0478354def9089ff8234eaef0f4cec79f, pinned Textual9a18a0f0fe41a2d5edde25f9e2371de1c3877559in both project and lock metadata. Normally merged mainb28e368c6, including #668. The sole conflict was the HistoricalSessions import block: kept main's Contents migration and the shared Toad ModalScreen import. Broad editor checks were on4a374eb89; the latest exact pair also has source-candidate modal-retirement verification, described below. The #668 merge itself has static/import preservation evidence, not archive acceptance. The size-review gate is deleted. Per 10261, Codex merges and installs this Vim pair FIRST, before the separate Forms changes (#670/#135). Source review of this pair is closed; normal-launcher behavior after installation remains unverified.Ownership
ui.vim-keysremains default false. Enabled prompts start Insert; Normal Enter does not submit. The native TextArea retains its original document, selection and EditHistory, including across tab returns.ApplicationAction; native action namespaces belong to the declarations. Navigation borrows the existing scroll/latest/focus/tab effects. No second key engine or maintained action roster.PromptTextArea.can_enter_shellconsumessubmission_allowed, so Normal/pending modes and active popups cannot enter shell. Paste never invokes the key action. Prompt remains the shell_mode owner.action_copy, not another clipboard implementation.Source evidence
Existing refactor-audit Package census: 283 Toad / 254 Textual modules, zero parse omissions. Before/after evidence under
.artifacts/vim/{owners-before,admission-before,owners-final}.txt;.artifacts/vim/main-668-merge.txtcompares main's definitions with the merged source: no main functions removed, all #668 preparation/category/destination functions unchanged, only previously reviewed Vim key/cancel and shared scroll delegations differ; selection and activation family searches are alongside them. Includes imports, inheritance, declarations and consumers. Computed callbacks, genericavailableattributes and binding/MRO resolution require semantic reading and physical verification, not AST inference.Owner searches:
rg -n 'def can_enter_shell|class CopyOrClearInputAction|from textual.screen import ModalScreen' src/toad: one eligibility declaration, one Ctrl+C arbitration action, one native-modal import at the shared base.rg -n 'editing_mode:|_word_pattern' ../textual-vim/src/textual: one active TextArea reactive declaration plus its explicit retained-state transfer field; word regex owned by DocumentNavigator.Physical source-candidate verification
Plain st on owned isolated display :278, copied configuration, configured native provider and a fresh fork of saved history. This is not installed-PATH acceptance.
openai-codex/gpt-6.1-sol, returnedVIM9142, and became Ready. Normal Enter kept the draft. Active f/r-pending cancellation used the existing confirmation; the g check cancelled queued input only. Evidence:.artifacts/vim/live-native/andnative-acceptance/.v; Insert selection copied exactlyretained; unselected Ctrl+C cleared; undo restored a cleared draft. Normal/pending!did not enter shell, pasted leading!remained text, physical Insert!entered shell.head -n 1process and its output; the child exited. No navigation/hint interception while terminal-focused.Latest screenshots/clipboard bytes:
.artifacts/vim/live-final-controls/; ordinary-profile literal-key/clear checks:live-ordinary/. Failed exploratory captures remain preserved. Literal!catand an early terminal probe reached the verification agent before shell entry/focus was established; both attempts and replies are retained, not replayed. Original uncertainaand older UNKNOWN inputs remain untouched. Olderlive-native/st.logcontains fourfree(): invalid pointerwarnings while the app remained usable; latestlive-final-controls/st.loghas none. Raw logs retained, no causal attribution claimed.Earlier mount-pointer correction (9292, replaced above)
Screen now calls native mount, records custody before awaiting it, and focuses afterward only if custody still matches, the session is not disabled, and this is App.screen. Native Screen.is_current includes visible modal backdrops, so it is not the active-screen authority. No new flag or competing retirement path.
Exact latest source pair, existing running toad-ui-2 participant, plain st/:278, no new agent or model input: before F2, one focused HintSession / 46 labels; while Settings was active, Workspace custody null / zero sessions / zero labels; after Escape returned, still null/zero/zero and focus was not a HintSession. Evidence:
.artifacts/vim/live-hint-custody-final/{states.jsonl,hints-before-modal.png,modal-open.png,modal-return.png}. Before/after source census:hint-custody-{before,after}.txt, 283 Toad / 254 Textual modules, zero parse omissions. No forced mount/suspend interleaving claimed. Preview closed afterward; existing participant and blocked goal untouched.Delivery order (10261)
This pair goes first: Toad #664
8c264fb0478354def9089ff8234eaef0f4cec79fand Textual #1349a18a0f0fe41a2d5edde25f9e2371de1c3877559. The previous Forms-first instruction is superseded. Forms is not required for this Vim change; its remaining source defects stay with its existing owner.Codex owns merging current main normally, retaining the current Core/schema changes, and building the resulting exact pair into a fresh output path. Do not downgrade the installed application to an older base or replay the uncertain build. Provider inputs remain untouched.
The required installed journey covers ordinary-profile literal keys; enabled Insert/Normal submission; native copy/paste/undo; popup and terminal key handling; hints across modal open/return; cancellation through the existing confirmation; and retained draft/mode/history on tab return. The earlier app observations above are source previews, not proof that the normal launcher works after installation.
Remaining boundary
Ready for Codex integration and installation, followed by normal-launcher verification. No automated tests, fixtures, fake responses, synthetic apps, build or installation performed by this worker. No frame-time/performance acceptance, full IME composition, true oldest-history gg, full Vim, arbitrary widget activation, or exhaustive stale-target/stream/retirement matrix claimed. Hints cover declared primary/style targets; they do not invent effects for every native control.