Skip to content

Apply novonotes internal changes#44

Draft
satoshi-szk wants to merge 21 commits into
mainfrom
novonotes-internal
Draft

Apply novonotes internal changes#44
satoshi-szk wants to merge 21 commits into
mainfrom
novonotes-internal

Conversation

@satoshi-szk

Copy link
Copy Markdown
Member

No description provided.

satoshi-assistant and others added 21 commits June 16, 2026 23:58
Host applications need close and resize callbacks when embedding foreign plugin editors in detached host windows.
HostWindowHandle stores shared callbacks, so it cannot implement Copy. Removing the Copy derive fixes the Windows CI build while preserving clone-based handle sharing.
…tor-callbacks

Add editor callbacks to host_window
Remove hidden public APIs from run_loop and wxp so the exposed surface matches the intended post/call and explicit channel APIs.

Move run loop test helpers into a dedicated test-utils crate and tighten internal visibility with workspace lints.
Linux and Windows CI build target-specific FFI modules that were not checked on macOS.

Keep the run_loop unreachable_pub cleanup complete across platform backends and include the new test-utils crate in CI formatting.
WebView dispatch now routes through the process-wide run loop API, so the WebView owner must keep the original run loop binding active for its native lifetime.
RunLoopGuard may be the last owner before a plugin DSO is unloaded, so shutdown must unregister native callbacks and drop queued work before returning.
Keep Linux sender cleanup source-based instead of retaining a callback queue, and make inactive handles explicit after shutdown.
Explain why platform shutdown must synchronously unregister native callbacks before plugin DSO unload.
Synchronize platform sender enqueue paths with shutdown so no native callback or queued closure can survive the final RunLoopGuard drop.
…-cleanup

Clean up run loop shutdown callbacks
Plugin hosts need to reserve selected native shortcuts without taking all keyboard input away from WebView-based UIs. The routing policy keeps that choice explicit and lets products update it at runtime.
…api-v2

Add configurable keyboard routing
Route key events and accelerator-style shortcuts through an explicit policy so embedded WebViews can keep application shortcuts while forwarding selected host keys. The policy replaces the older key-only route list and keeps the WebView2/macOS backends aligned.
Child WebViews rely on the wrapper for AppKit accelerator routing. Reparenting only the inner WKWebView would bypass that wrapper after moving the view to another window.
…cleanup

Add configurable keyboard event routing
Some plugin hosts can synchronously bounce a parent-routed keyDown back into the embedded WebView while the original event is still being forwarded. Guarding only that nested dispatch preserves the first host delivery and avoids AppKit recursion that can overflow the main thread stack.
The guard is intentionally narrow, so reviewers and future changes need to understand that it suppresses only synchronous host bounce-back while preserving the first parent-routed event for host shortcuts.
The re-entry guard must only suppress child-wrapper bounce-back. Window WebViews route their first parent delivery to the wrapper itself, so treating every guarded wrapper call as re-entry drops existing parent keyboard routing.
…eentry

Prevent parent-routed keyDown re-entry
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