Repository navigation
Add opt-in child-first arrow routing - #23
Merged
Merged
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
This was referenced Nov 9, 2026
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
Add
Element.HandleNavigationKeys(keys, fn)for node-local handling of arrows left by a focused child, before default scrolling. Preserve child/native/shortcut priority, stop at the nearest declared owner, and respect editing/compound-control/overlay boundaries. Only arrows with no modifiers or Shift are eligible; unsupported declarations panic and empty/nil/omitted registrations unregister. No global capture, new queue, or default opt-in.Testing
CGO_ENABLED=0 go test ./ui ./internal/uimigrate: passed; focused arrow contract also verified red without the route, green with it.CGO_ENABLED=0 go test ./...: all change-related tests pass after API-index regeneration;internal/darwin.TestLocalesfails preferred-language isolation identically on untouched base5c865d27in a separate worktree. No locale source changed.CGO_ENABLED=0build/vet for Darwin, Linux and Windows (arm64), productionmygo_noinspectorvet, and js/wasm vet: passed. No GUI validation.Production sizes in bytes (arm64, trimpath, noinspector, stripped):
-dumpdepplusgo tool nm -sizeconfirms unused navigation implementations are dead-stripped. The small native-only growth comes from the optional dispatch call, committed registration/barrier writes, and type/section alignment; no feature implementation or heavy dependency is retained by non-users. Webview hello is unchanged on all platforms.Tested on:
AI disclosure
Link to Devin session: https://app.devin.ai/sessions/90fc05f0cb694a4292bb80a3a7186778
Open in Devin Desktop: https://app.devin.ai/desktop/session/90fc05f0cb694a4292bb80a3a7186778?variant=devin
Requested by: @tiensonqin