Repository navigation
Native Vim hints share left/context published-cell activation - #204
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.
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
5 source modules changed; 156 added / 25 removed at the first source checkpoint. One native hint operation becomes two click intents sharing the same acquisition, session and retirement. Zero ToAD popup registries, compatibility aliases, tests, fixtures or dependency pins added. Paired with OpenHCSDev/toad#1305 on P888; keep draft and unarmed pending root review of both heads.
Before / after
HintHost.action_show_hintsowned bothfandctrl+f, but both activated left-click effects. After: the SAME primary callable keepsf;action_show_context_hintsownsctrl+f. Both call one_show_hintsimplementation.HintClick.LEFT=1/RIGHT=3owns descriptions and the transient Escape caption rendered byHintSessionitself. No notification or global title state.DOMNode.primary_activation_targetswas the only declaration boundary. After:DOMNode.activation_targets(region, meta, button=1)selects the existing primary capability or the new default-empty contextual capability.Activation.from_paintandCompositor.activation_targets(button=1)use the SAME exposed published-cell walk, nearest declaring ancestor and identity de-duplication. Default calls remain left-click.PrimaryTargetcould only invoke no-argument callbacks. After: the oneCallbackTargetsupplies keyword-only arguments, but identity remains(widget, bound_callback), never the painted offset.PrimaryActivationstill supplies its existing callable with no arguments;ContextActivationsupplies its bound contextual method and published offset. The old private name and its only constructor reference are deleted, not aliased.StyleTargetdiscarded click intent by passing no event. After: it callsdispatch_style_actionexactly once with a modifier-freeClickcarrying the selected button, current style, and absolute/relative published placement. It does not post another click. Existing availability and decoded-handler equality checks remain; hyperlink identity remains the decoded handler action. ToAD's existingToadApp.dispatch_style_actionstill owns left/open versus right/copy-menu.OptionListpublished numeric option metadata but hint acquisition ignored it. After:option_from_metais the list's shared decoder for physical click, hover, hint acquisition and revalidation.OptionActivationretains the actual Option object; identity is list+Option. Membership and enabled state are answered byoption_enabled; the current exposed cell must still decode to that SAME Option. A removed/reordered/disabled/offscreen item cannot select a different index occupant. Pointer and hint activation shareselect_option(highlight plus existingaction_select), so ordinary OptionSelected/subclass behavior remains owned by the list. Divider and blank cells have no option marker and contribute no target. Both click intents retain OptionList's existing either-button selection behavior.Binding identities and focus
textual.widgets._hints.HintHost.action_show_hintsis unchanged. Its saved per-mode suffixes remain:textual.document._editing.VimInsert,:textual.document._editing.VimNormal, and:textual.document._editing.VimVisual. The new contextual identity istextual.widgets._hints.HintHost.action_show_context_hintswith the same existing mode-derived suffix mechanism. MODE_BINDINGS remains the native/F1 declaration owner. Native custom remaps, BindingsMap precedence, editor consumption and terminal priority are unchanged; no saved settings are rewritten.The session still owns prefix, labels, original focus and retirement. Caption space participates in existing label placement. Screen suspend, resize, blur and selection still retire sessions through their existing owners. Restoration now refuses a focus widget moved to a different screen. No popup-specific lifecycle or persistent ToAD state is added.
Source evidence and scope
Read the supplied
p888-hint-owner-census.jsonat ToAD5fa29f3770a040af4686ede11f8584c6646d55c0and Textualc27e535fe2f05406de3c9e90ac61352f59815bca. Its actual header says 2,065 modules, zero parse errors, not the 877 quoted in the order. Followed the named declarations and consumers in both owned checkouts, plus Core source, using whole-tree rg; retained source closures are/home/ts/.cache/agent-scratch/toad-keymap/p888-hints-source-closure-before.txtandp888-hints-source-closure-after.txtin the same directory. This is static source evidence, not a claim of dynamic resolution or live behavior.IMPL-4: fact=published options have their existing selection effect; at=old
_activation.py:39/_option_list.py:722,804; derive=base-method; by=OptionList's metadata/selection owner. The missing native capability is implemented instead of adding a ToAD menu registry. IDEN-2: one hint method used to stand for both requested click intents; each callable now has one meaning.Known producer family:
_get_option_renderemits the option index on content/padding; SelectionList'srender_lineemits that same marker on its toggle gutter. The divider emits none. The numeric paint format is unchanged, including ToAD SelectionOptionList's existing hover consumer. OptionSelected continues through native SelectionList/Select/command-list and ToAD menu owners; no synthetic result or menu index roster was added.Verification / remaining qualification
python -m py_compilecompleted with exit 0 for all five native modules and ToAD's CommsRow module./home/ts/.local/share/agent-comms/current/bin/pythonand PYTHONPATH pointing at BOTH owned source roots. Imported CallbackTarget, ContextActivation, PrimaryActivation, StyleTarget, HintClick/Host/Session, OptionActivation/List and ToAD CommsRow. No application was instantiated or started. The first optional import used Core's shared venv and stopped immediately on missingrich; that attempt was not counted as a pass. No environment or installed package was changed.Assumed: root accepts and lands Textual before the paired ToAD change, combines sibling Textualize#1303 without dropping its paint/availability work, retains Textualize#1304's eventual DeclaredField import migration, and owns all further test caller work and live acceptance.