Repository navigation
P1010: derive history Vim scrolling from arrow identities - #1367
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
enabled auto-merge
October 30, 2026 14:00
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
1 commit, 2 files, +1/-3. Delete HistoryWindow's two hand-written Vim direction letters and advance the existing Textual lock from bea0d377 to main 832b0f6d. Textual #213 is already merged (head bdfff5f63acd430264d2a705efd99f2057c619b9, merge c12f573a16ba59b1d75e22ef3593222903ef56d0); #214 adds the shared native-text-key capability at 832b0f6d. This is P1010's Toad companion, not a second implementation of the Textual change.
Before / after
Before:
HistoryWindow(NativeMethodKeys, WorkspaceHosted, MroProjection, VerticalScroll)declared j/k locally at history_anchor.py:644–645, beside its inherited up/down bindings. The two independently editable copies restated the arrow spelling declared by Textual's NavigationKey members.After: the same class and the same action_scroll_up/action_scroll_down overrides remain. VerticalScroll's arrow bindings project through EditingMode/VimMode and NavigationKey, so Vim gets j/k from the arrow identities and Standard does not. HistoryWindow's lazy-boundary preparation remains in those existing action overrides. Its unrelated ctrl+d, ctrl+u and G bindings are unchanged. No wrapper, new state, fallback, event rewrite or compatibility path.
Deleted: two ModeBinding lines in src/toad/widgets/history_anchor.py. Lock change: one line replaced in uv.lock. No edits to keymap.py, question_actions.py, permissions.py or terminal.py; Toad #1338 owns the first three, #1366 owns the Terminal correction. Pair this with #1366 before claiming full text-entry safety or installing the completed navigation workflow.
Slop: MEMB-3; fact = Vim spelling of a vertical arrow; at = history_anchor.py:644–645 before this commit; derive = subclass/base-method; by = Textual NavigationKey members, VimMode.navigation_spellings, Binding.for_mode and inherited VerticalScroll bindings. Paper1 Theorems 4.6/4.7: another widget spelling is outside supply; the arrow declaration supplies it without that copy.
Source evidence
NRA's existing Package/Repository parsed current Textual main 832b0f6d (257 production modules) and Toad main 35770a0 (308 production modules), with zero parse omissions. Retained map enumerates relevant declarations, imports, bases, writes, decisions and consumers. HistoryWindow retains NativeMethodKeys and VerticalScroll; NativeMethodKeys.method_key_owners returns its actual MRO, so the inherited native declarations are retained rather than replaced by the deleted aliases. The existing HistoryWindow scroll overrides still call _scroll_or_prepare before super(). Dynamic aliases, monkeypatches and downstream third-party widgets are not statically proved. No full NRA gate ran locally.
The remaining paired-main copied-letter search currently finds HistoryWindow's two lines and the two question_actions.py definitions owned by #1338. This PR removes the former; it does not pretend the latter disappeared before #1338 lands. Whole-pair zero-copy and live acceptance remain integration work.
Verification and scope
uv lock --upgrade-package textual: resolved 105 packages in 923 ms; only Textual advanced, bea0d377 -> 832b0f6d. Existing shared uv executable; no sync, new venv or installation.Assumed: