Skip to content

Finish native key declarations through shared navigation - #211

Merged
trissim merged 6 commits into
mainfrom
work/toad-keymap--central-declarations
Oct 30, 2026
Merged

trissim merged 6 commits into
mainfrom
work/toad-keymap--central-declarations

Conversation

@trissim

@trissim trissim commented Oct 29, 2026 •

Copy link
Copy Markdown

P917 central declarations — continuation, not full delivery

5 commits relative to current main; 23 files, +323/-168. Current correction checkpoint: be56a702991559106b36a0071eeae06a1ca84328, rebased onto bea0d377b (#212 genuine editing-engine integration). Same P917 issue and same paired ToAD Textualize#1338. This checkpoint is published work, not ready for whole-head acceptance: the remaining raw binding policy and ToAD migration below are still being implemented.

Shared declaration owner

Before: navigation composed its own family projection alongside DOM/native method declarations, while ToAD retained another composer and registry. After this Textual checkpoint: DOMNode accumulates the actual class-declared families in subclass-first MRO order once at class construction and projects them through the shared declaration path. Navigation's separate composer and per-call family walk are deleted. The ToAD consumer migration is still required; this does not claim that its second registry is already gone.

KeyDeclaration registers subclasses at their declaration and derives concrete members by abstractness. The overlap contract remains type[KeyDeclaration] at all three sites; no bare type, Any, or fictitious mypy failure justifies weakening it. The unfinished ToAD Menu producer must join this existing family, not broaden its consumers.

Horizontal family, native effects

Before: RadioSet and Tabs separately repeated left/right defaults, descriptions and priority. After: HorizontalCursorCommand owns CursorLeft/CursorRight beside the vertical family; MovesHorizontalCursor composes that declaration. Tabs retains its native stepping bodies under action_cursor_left/right. RadioSet binds those operations to its existing up/down stepping implementations. Both copied RadioSet MethodBinding assignments and both Tabs decorators are deleted.

The orphan RadioSet/Tabs key-table strings are deleted rather than extended with another handwritten key roster. Remapping is shown by the actual catalog, not a stale CSS docstring.

Native method declarations and caller closure

MethodBinding.declare owns ordinary EditingMode defaults and accepts description, priority, availability and visibility metadata. Native Input, TextArea, Tree, Button, Collapsible, Switch, ToggleButton and Select callers no longer restate ordinary mode policy. Link declares its visible Enter operation directly rather than reassigning its own method.

Tabs rename callers are migrated in the actual tabbed-content, animation and snapshot-app sources. The command palette calls the existing native selection/cursor operations directly; its string getattr dispatcher and swallowed AttributeError are deleted. A collapsed Select admits navigation to open its overlay; an expanded Select yields to that overlay.

Main integration

The rebase conflict was the obsolete hand-built Vim implementation in document/_editing.py: main had already deleted it. Main's actual engine-capability file was retained, so this PR does not resurrect VimInsert/VimNormal or their removed registry. The older P917 registry deletion is already satisfied by that main deletion.

Source evidence and remaining work

  • Retained source inventory: 309 ToAD modules + 256 Textual modules, zero parse omissions at that captured revision; 30 Textual declaration sites are not 30 proved live tables. Original raw constructor count was 34 (4 ToAD + 30 Textual), not 32.
  • Before rebase, the correction compiled 21 changed paths and native class/default projection exposed inherited raw scrolling bindings beside nominal navigation. That is an unfinished competing route, not a passed routing control.
  • On this exact rebased head, all 23 changed Python paths compile. No modules were imported and no tests, checker, App/controller, profile, provider input or installation was run for that compilation.
  • Current git diff --stat origin/main...HEAD: 23 files changed, 323 insertions(+), 168 deletions(-).

Remaining on this same pair: delete actual inherited raw-scroll/nominal coexistence; finish remaining production base/editor/table/demo declarations; migrate ToAD Action registry/composer and Welcome/Workspace method declarations; repair window-family availability and the generic application base; complete nominal Menu producers/catalog/selection and all real callers; author the requested controls UNRUN. The dirty ToAD Menu source is preserved while P974 repairs public dirty-checkout transfer from the closed P903 allocation. No second source copy or shell write bypass.

Permissions j/k behavior requires explicit closure on ToAD Textualize#1338: answer selection versus prior diff navigation must be preserved or documented; this Textual checkpoint does not settle that UX.

Qualification owed by integration owner

Run one necessary matched selection for both exact source heads, then the actual installed saved-session journey: dropdown/overlay navigation, permissions and captured-block menus, sidebar/tree/table, focused native Input/TextArea printable text, selection/history edges, missing override versus explicit-empty versus Reset, and mode/focus eligibility. Retain the genuine engine integration and P932/P939 lifecycle contracts. Existing prompt/F1 evidence is narrower than this family.

Tristan tests the installed keyboard after root integrates and installs the coherent pair. No new author screenshot sequence, automated controller, provider submission, settings mutation, performance improvement, full K2–K7 acceptance, or merged/installed claim is made here.

Assumed: native stepping and method override behavior survive the shared declaration projection; compilation cannot establish that. Root's real controls and installed keyboard journey must establish it.

removed the key table attached to CSS
the stylesheet is no longer moonlighting as a keyboard manual

Copilot AI balanced review requested due to automatic review settings October 29, 2026 22:26

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 force-pushed the work/toad-keymap--central-declarations branch from 84fce1c to be56a70 Compare October 30, 2026 03:16
@trissim
trissim merged commit 40873a8 into main Oct 30, 2026
1 check 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