Repository navigation
Carry saved arrow preferences for the P917 keyboard repair - #3584
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.
|
debt-tools at 2ac5760, every finding: |
trissim
enabled auto-merge
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
AI-generated by toad-keymap (OpenAI Codex). Core companion for the SAME P917 keyboard issue: OpenHCSDev/toad#1318 and OpenHCSDev/textual#207. This does not move P917's primary repository.
Before / after ownership
Before: ToadKeyMode(Carry) directly owned saved-settings file access, retired Vim-boolean rewriting, complete target validation and publication. New native arrow IDs made old per-widget rows undecodable. Its no-change branch also tried decoding complete settings before a later arrow carry could rewrite them.
After:
ToadSettingsCarry.carry derives every concrete settings rewrite from ToadSettingsCarry.members_with(ToadSettingsCarry), applies those existing methods to ONE in-memory document, then decodes COMPLETE ToadSettings once before the single AtomicFile write. Both historical Carry identities remain. Either member's first call completes both transformations; later member calls report zero changes. There is no handwritten rewrite roster, intermediate file write or ordering assumption. SavedSettings.resources(self.files), files.location(resource) and require_confined select and confine the actual live/practice resource; there is no guessed configuration path.
Retired input declarations
PreviousArrow derives replacement membership from its declared subclasses. Each subclass declares its old input identities and the actual current NavigationKey class; the new ID derives from current().key_identity(). No current widget roster or hand-written new ID strings.
TextArea/Input prefixes are textual.widgets._text_area.TextArea and textual.widgets._input.Input; CursorAction prefix is toad.widget_actions. Input's two horizontal declarations also changed identity; omitting them would strand valid saved settings. MaskedInput inherits the Input declaration. Shift-selection and unrelated invocations retain their identities.
Preservation and refusal
PreviousInvocationId is accepted only by this retired-input decoder. Current KeyInvocationId admission still uses the real current catalog. Key order, modes, unrelated override rows and all unrelated JSON are preserved. First arrow occurrence retains its row position; later identical arrow+mode choices collapse. Different ordered key tuples refuse with the arrow/mode and both choices, before publication. Existing current arrow IDs participate in the same collision check.
No retired settings input means0changes; a second successful pass is therefore0changes and performs no write. Missing settings file is also unchanged. Explicit empty keys remain an explicit unbinding, not Reset. No user config was edited by the author.
Source evidence / actual remaining proof
Retained refactor-audit map:588Core production modules+19cutover modules+308ToAD+256Textual,8203classes,4321relevant syntactic sites,0parse omissions. Native map baseline ise7a48c59; changed native53af source is separately compiled/imported, not pretended to be that old snapshot. Dynamic discovery/order and real filesystem behavior are not established by AST.
Author source checks compiled both changed carry modules and imported the actual paired source: exactly10old→4new identities, writer_owned=(SavedSettings,), exactly2concrete settings rewrite members derived from the registry, no arrow-before-mode prerequisite. Logs:
/home/ts/.cache/agent-scratch/toad-keymap/p917-arrow-carry-source.log(first head) andp917-arrow-carry-both-source.log(correction). No automated tests, per-head ratchets, migration execution, controller, fake app or provider input by author.Root's first actual confined-copy proof passed dry run/no write, apply, second-pass zero, conflict refusal with original bytes intact, and exact unrelated-field/ordered-row preservation on Tristan's current config. It exposed the mixed older input: retired arrow IDs plus ui.vim-keys and no key-mode. The first head validated before the second transformation; complete conversion now precedes validation. Root's diagnostic is retained as p917-carry-proof-diagnostic.log, with the original settings hash unchanged.
Root owns rerunning the actual copy proof on the corrected head, including both retired inputs, before installation. Tristan owns actual live keyboard acceptance. Textual#207 must be available to the target runtime before this new carry is imported.
Assumed: previous editable-keymap files use the ten actual retired IDs listed above, with current mode encoding; invalid/unknown unrelated settings refuse complete target decoding instead of being discarded. Both supported retired input forms are converted together; this is not an exemption from full target validation.