Repository navigation
feat(tauri): embed native WebKit previews on macOS and Linux - #1301
Merged
Merged
Conversation
Extract owner-fenced child creation, physical bounds, visibility, closure, preview storage and mandatory browser protections into a shared EmbeddedViews registry and Windows adapter. Keep session registrations, events, history, emulation and page leases in BrowserController; macOS and Linux continue using their existing fallback. Register each child before native construction, deny reserved labels without records, and keep navigation refusals ahead of external opening. Create neutral children off-canvas and hidden before security setup, fence concurrent replacements and failed creations by exact identity, clean pending children on renderer reload, and revoke page leases before native hide attempts. Expose the common registry as application state and document adoption by remote project tabs. Validate on Windows with isolated worktree dependencies: dev:prep, cargo check --locked, 22 browser-controller tests, all 312 Rust tests, UI typecheck, 4 native-adapter tests and 29 browser-frame/session-history tests. Preserve the actual Tauri ACL resolution regression and add owner, missing-record, rollback, replacement, reload and failed-hide authority coverage.
Add macOS and Linux adapters to the owner-fenced embedded-view layer without enabling the renderer path. Preview stores share a scoped directory on Linux and a domain-separated, full-profile SHA-256 identifier on macOS; Tauri now requires macOS 14 while Electron keeps 13.5. Vendor complete Wry and runtime crates. GTK children use a lazy per-window overlay and persistent fixed geometry; weak IPC references let destroyed views release. WKWebView media capture is denied per reserved instance at construction, leaving app views unchanged. Embedded remote labels avoid the primary remote notification capability pattern, and explicit storage domains support future remote-tab adoption. Windows locked checks, 313 Rust tests, runtime packaging tests and release builds pass. Native GNOME Wayland/Xwayland trials cover geometry, input routing, lifecycle, isolation and permission/download denial, including an unfixed-bounds negative control. macOS compilation and permission defaults require native CI/OS qualification before enabling its renderer path; no global denial or private API is used.
Import WebViewExt and PermissionRequestExt directly: webkit2gtk 2.0.2 exports its extension traits at the crate root. Qualified the full Linux application with locked cargo check and clippy. All 306 available unit tests pass; the separate real-zsh regression is filtered out because the VM lacks zsh, as allowed by the platform validation plan. Wayland and Xwayland native child-layout trials remain passing.
Run locked Rust check, clippy and tests plus an unsigned no-bundle Tauri build on macOS Intel, macOS ARM64 and Ubuntu 24.04. Keep the existing authorization gate while permitting draft qualification with read-only repository access and no signing secrets. Bundle macOS apps to verify LSMinimumSystemVersion 14.0 and native architecture. Publish an unsigned Linux AppImage with system display libraries for subsequent WSLg trials. Add a runnable workflow contract check covering draft admission, platform matrix and packaging gates; YAML parsing and git diff --check also pass locally.
Both WebKit macOS runners built and tested successfully, including the 14.0 plist check, but lipo treated the trailing binary path as another architecture argument. Put the input first as required by lipo and lock the argument order in the runnable workflow contract test.
Keep macOS and Linux preview navigation attached to native back/forward entries, including redirects and same-document navigation. Retain at most 32 native items and assign monotonic numeric handles rather than matching URLs, so duplicate URLs and forward-history branching remain unambiguous. Read and traverse on the UI thread with registration owner/generation and deadline checks. Release native references on replacement, close and primary-renderer reload. Observe GTK URI/list changes and sample WKWebView history without exposing page script or changing Windows CDP history. Cover identity reuse, stale handles, bounded snapshots and registration fencing with Rust regressions. Add a standalone development-only WebKitGTK trial covering redirects, fragments, pushState, replaceState, native traversal and branching; verified under GNOME Wayland and X11. Validation: cargo check, 315 Rust tests, UI typecheck, 29 browser tests, Linux cargo check and macOS ARM64 adapter compile checks.
Document embedded WKWebView and WebKitGTK browsing, persistent preview storage, native history, overlay masking and the shared embedded-view contract. Keep agent automation and Chromium emulation scoped to Electron and Windows Tauri, and explain remote_view.rs adoption without changing that consumer. Update browser, install and download help in all ten locales, distinguishing Tauri macOS 14+ from Electron macOS 13.5+. Describe macOS user-initiated Paste and per-instance native permission handling in developer documentation without general platform-validation claims. Validation: npm ci --workspaces --include=optional; npm run test:help (31 passed, 28 pages across 10 locales); npm run build:help; git diff --check.
Read GtkFixed layout properties and requested sizes rather than a hidden widget's stale allocation. Tauri sends position and size separately; keeping their retained geometry prevents the second update from moving a freshly registered preview to the window origin. Exercise hidden initial construction and split geometry updates in the native GTK trial. The baseline fails with (0, 0) instead of (100, 80); the fixed trial passes under Wayland and X11. The real Linux app also retains bounds through menus, dialogs, viewport changes and restart.
Publish independent embedding, history, emulation and automation capabilities from local Tauri primary renderers. The UI uses these capabilities instead of the Windows user agent, keeps WebKit Back/Forward ready without emulation, and offers dimensions-only presets with translated tooltips in all ten locales. Register children hidden and resynchronize overlays, clipped geometry and display scale before revealing them. Name the native placeholder accessibly, preserve cleanup and retry behavior, and refuse every WebKit agent-browser action before preview creation while leaving Mission claims available. Validated UI and server typechecks, 317 Rust tests, 31 browser lifecycle tests, 24 server tests, help checks/build, and real Linux/macOS application browsing and persistent storage. The 185-file browser suite was completed across its bounded run and remaining-file continuation; three unrelated timing failures passed on a full rerun of their files (45 passed, one benchmark skipped).
Normalize CRLF to LF immediately after reading the workflow so the WebKit job contract can be parsed on Windows with core.autocrlf enabled. Only the test changes; runtime behavior is unchanged. Validated with node --test .github/scripts/tauri-webkit-workflow.test.cjs (1 test passed).
Merge the current dev runtime set without rewriting branch history. Vendor the complete published Wry 0.57.1 and tauri-runtime-wry 2.12.3 crates and retain the GTK child layout, persistent geometry and weak IPC corrections. Use Tauri's native per-webview permission callback for embedded views, keeping application permissions separate. Preserve dev's Tao/updater corrections, Node/npm maintenance and Electron 45 updates. Resolve installation help in ten locales with Electron macOS 13.5 and Tauri macOS 14 requirements. Windows cargo check and 324 Rust tests pass; UI typecheck, help, workflow, vendor, security and Node runtime checks pass.
Run the same real-engine geometry, native pointer, permission, download and destruction assertions using a dedicated flat-acceleration uinput pointer on KDE Wayland or xdotool in a native X11 session. Keep the existing Mutter-seat path for GNOME. Document prerequisites and retain portable source patches for subsequent vendor qualification. The Linux VM passes Wayland and XWayland under Plasma, and native X11 after installing the available KWin X11 backend. All 314 Linux and 314 macOS Rust tests pass. The macOS WKWebView harness confirms per-instance media denial through the upstream permission callback, application media grants and persistent separate stores.
Full-application trials on macOS and Linux exposed a misleading no-owner error: their backend intentionally has no native-parent automation transport, so browser discovery returned before reaching the WebKit refusal. Publish the WebKit host marker after shell environment resolution and reject browser claims, probes and actions after session ownership validation. Mission-only claims keep their existing path and standalone servers retain their generic unavailable behavior. Cover both available and absent native transports with the same route regressions. The focused automation suites pass all 22 tests, the server typecheck passes, and the bridge contract is documented. Native VM trials exercise the packaged apps and their explicit refusal.
A desktop started from a WebKit-backed conversation can inherit its backend host marker. Supported native transports remain authoritative, so that inherited hint cannot disable Electron browser automation. Add a regression covering both available and absent native transports under the inherited marker. All 23 focused automation tests and the server typecheck pass.
Exercise isolated-world callbacks, targeted native pointer and keyboard events, responder editing and visible PNG capture using the same native source files intended for embedded views. Keep desktop activation and the system pointer unchanged; record event trust and Unicode editing on real WebKit engines before wiring the private browser transport.
Exercise WebKitGTK under an owned KWin Wayland compositor without interrupting an existing Plasma X11 desktop. Record callback JSON, native PNG, pointer observations and independent criteria, keeping drag button state and real select-all behavior as hard gates. Document the native API contract and the AppKit qualification boundary instead of enabling an incomplete adapter in the product.
WebKit reads the global AppKit button mask instead of the NSEvent instance when building native pointer events. Supply the synthetic mask only on the UI dispatch thread, preserve original behavior on other threads and restore the implementation in finally. Verify nested dispatch, exception cleanup and other-thread isolation in the native harness. Route native key equivalents and inactive editing fallbacks to the exact guest, record dispatch paths, and extend observations with mouse enter/CSS hover and trusted editing input types. Keep qualification strict: Linux X11 and isolated KWin Wayland pass; macOS still fails initial pointer hover and contenteditable Enter keydown after the Mod chord, so the candidates remain outside the application build.
Send matching flagsChanged transitions around native chord down/up, scope class modifier state to the UI dispatch thread, and verify exception-safe restoration. Trace fresh native key timestamps, window numbers and flags to distinguish stale modifier state from missing DOM delivery. Prime mouse movement at a separate in-view point with tracking areas installed before the existing target move. Add a diagnostic that omits only the chord while retaining all acceptance assertions. The macOS VM still fails initial pointermove and Enter keydown after the chord; keep the adapters outside the application build and preserve the failing traces for further investigation.
…mits Use WebKit's keyDown text-input handling once instead of unconditionally replaying interpretKeyEvents. Assert exactly one insertParagraph beforeinput/input pair; the standalone macOS Enter diagnostic now passes this condition with a real Enter keydown. Exercise public mouseEntered followed by mouseMoved directly on the guest and log tracking-area activeness without making the window key. Document the remaining background hover and post-Mod-chord DOM-delivery limitations with their precise agent effects. Linux X11 and isolated KWin Wayland pass the strengthened harness; macOS strict full-sequence failures remain visible and the candidates stay outside the application build.
Pipe the backend stdin on Unix and explicitly keep its public browser-automation capability disabled while making the private parent transport available. Reuse native open claims and visible-target resolution across hosts, preserve the Windows protocol path, and fence backend generations and deadlines before dispatch and response. Build the qualified WebKit adapters behind target cfgs, add native navigation completion/failure observers without replacing Wry policy behavior, and bound visible PNG responses with target/document checks. Include an isolated native-parent fixture using the production framing, controller and native adapters, plus transport and UI-subscription regressions. Windows Rust tests and server automation tests pass; real-engine qualification follows on the test VMs.
Allow macOS and Linux previews to complete native OAuth popup round trips through related WebKit views sharing their persistent preview store. Keep popup navigation credential-free HTTP(S), deny site permissions and application capabilities, and dispose owned popup trees with their opener without changing Windows or Electron policy. Save downloads directly to Downloads using sanitized UUID-prefixed names and native no-overwrite behavior. Scope WebKitGTK download signals to their initiating view and convert generated data/blob document requests to downloads. Use asynchronous AppKit sheets for JavaScript dialogs so downloads remain responsive. Add a backend-free production-layer native fixture, Rust filename and authority/lifetime regressions, reproducible vendor patches, developer guidance and help in all ten locales. Validation: 326 Rust tests, four UI adapter tests, two vendor checks, 31 help tests and the help build; real WKWebView and WebKitGTK X11/nested KWin Wayland trials cover OAuth, script and opener cleanup, downloads, dialogs and permission denial.
…covery Handle fragment navigation without a document-completion callback and permit validated navigation to recover an owned guest from an engine error document. Preserve a failed load when WebKitGTK subsequently emits Finished, reject superseding native navigations, and recheck registration/document authority after native getters and queued operations. Fence open claims by absolute deadline and backend generation, then revalidate the UI claim after asynchronous preview creation before publishing it. Decode UTF-8 stdin incrementally and keep desktop capability markers out of the shared daemon environment. Public WebKit automation and emulation remain disabled. The isolated real-engine parent-channel fixture passes 16 checks on macOS WKWebView, Linux GdkX11Display and private KWin GdkWaylandDisplay, including TLS/load failure, deadlines, capture callbacks after hide/close, duplicates and stale responses. Windows passes 328 locked Rust tests; server/UI regressions pass 84 tests and both TypeScript checks. The fixture owns only its child and local servers, with production framing/controller/native adapters and a fixture-supplied shell inventory and UI claim callback.
Route the shared page engine through tree, handle, fixed-function, geometry and native-input operations instead of raw protocol calls. Keep the existing renderer, document-scoped references, serialization and input-provenance behavior. Extract the fixed programs into one authored registry and generate the native Rust resource from it; no program source crosses the private preview channel. CDP adapts the semantic contract for the application, Electron and Windows Tauri. The private begin/send/check/end channel advertises its driver and contract version and validates a closed operation union and argument shapes at both hosts. WebKit binds real target leases/checkpoints and returns structured unsupported results for pending tree/input functionality while public automation remains disabled. Goldens captured from the baseline verify byte-identical plain/marked programs and identical full, scoped, queried and budgeted snapshots. Validation passes 328 locked Rust tests, 114 server/Electron/UI unit tests, 43 real-browser regressions covering preview/input/forms/native frames/history, and server/Electron/UI TypeScript checks.
Bundle dom-accessibility-api under its MIT license for native semantic trees, fixed read functions and weak document-scoped identities. Route private WebKit page reads through native argument dictionaries, with registration and document checks around callbacks; keep public automation disabled. Reuse Electron HTML fixtures and add a headless CDP comparison runner plus the real native-parent semantic harness. Initial Windows Cargo tests (328) and Chromium isolated-world comparisons pass; native engine qualification follows separately.
Keep named WebKit content worlds alive between native calls so document identity survives separate callbacks on WKWebView and WebKitGTK. Retire removed nodes immediately without retaining detached mutation records, fence document-bound leases across recreation, and preserve refs through fragment and History API changes. Qualify the shared Electron fixtures against Chromium CDP and real macOS, Linux X11 and private Wayland guests. Assert rendered control parity, scope/query behavior, secret masking, open-shadow and same-origin frame reads, opaque boundaries and stale-ref rejection. Document the fixed page-world closed-root annotation and the public-DOM limitation for declarative closed roots; public automation stays disabled. Validation: 53 Windows server/automation tests, 43 browser tests, 329 serial Rust tests, server typecheck and all three real-engine semantic harnesses passed. Side-by-side artifacts and native source hashes are retained locally; owned VM Cargo caches were removed.
Capture closed roots weakly at document start and transmit only native StaticRange endpoints to the isolated reader, which checks ShadowRoot brand, exact host and document before issuing refs. Add composed hit testing, frame geometry, fixed form calls and native input routing through the qualified adapters. Fence queued native dispatch by document, registration and deadline; retain admitted input releases on the exact lease for timeout cleanup without retrying mutations. Add shared Chromium/native action scenarios using the extracted Electron fixtures. Chromium action comparisons and server typecheck pass; native qualification follows.
Extend native OAuth popup and safe Downloads-folder behavior to WebView2 and Electron, including blank/named windows and same-origin blob documents. Preserve engine opener relationships and close owned popup trees. Keep camera, microphone, geolocation and notifications denied; route classified permissions through native consent or explicit origin-bound device/source selection and reject unknown requests visibly. Fence Tauri previews and popups away from app IPC, initialization scripts and resource protocols so native browser APIs retain their synchronous semantics. Enable preview drag/drop, Windows browser controls, fullscreen bounds restoration, and focused Electron guest menus/context actions without changing web security, TLS validation or the F6 crash guard. Add translated consent/context labels and help in all ten locales, reproducible vendor patches and real-engine acceptance fixtures. Validation includes the Windows release build, 329 Rust tests, the serial Electron suite, 37 UI/browser tests, help and vendor checks, and Windows/macOS/Linux native trials. Electron prompt remains explicitly unsupported under the no-preload requirement; unidentifiable GTK permission requesters fail closed rather than gaining top-level-origin authority.
Provide a preview-session-only prompt preload with one fixed synchronous channel, owned sender/frame validation and a preload-free app form. Keep app IPC, Node integration, sandbox and permission boundaries intact. Translate the form actions in all ten locales and reuse its scrollable list for device and display choices without a 20-entry ceiling. Attribute GTK pointer-lock consent to its native page-scoped identity and fence delayed answers by document load generation. Add WKWebView native print and beforeunload delegate callbacks, preserving trusted-renderer policy and using the system print operation. Document the consumed WebKit selectors and ship the reproducible vendor patch. Add real Electron prompt/isolation/25-choice acceptance, PDF and hardware probes, native file-drag tooling, and update help in ten locales. Validate 330 Rust tests, focused policy/vendor and UI checks, help, typecheck, desktop fixture builds and both Electron preloads. Fix raw CSS loading in the direct TypeScript native test path; its remote-recovery regression passes on rerun. Qualification is partial: Electron printing, native file drops, complete beforeunload reload/close behavior and effective Wayland pointer lock still require follow-up. Do not infer full cross-engine parity from the successful prompt, native print, PDF and consent trials.
Use weak host associations and native reference-event endpoints for genuine closed roots across isolated worlds, including nested and streamed documents. Validate native root brand, exact host and document before issuing handles. Share shadow-safe selection and recheck readonly/disabled state before special-value mutations. Keep native input fenced before and after dispatch, track pending releases on the exact lease, and preserve the original transport failure instead of continuing a revoked lease. Separate history metadata publication from document navigation fences. Reinstall lifecycle listeners after streaming recreation and retire subframe refs on pagehide. Validation passed: 54 Windows server/automation tests, 43 browser tests, 329 serial Rust tests and server typecheck. Real parent-channel action/read harnesses passed on WKWebView and WebKitGTK X11/private Wayland. Chromium comparisons cover normalized fields, trust, ten-step drags, closed-root/frame actions and queued/admitted timeouts without replay; native sources match 20 recorded hashes. Public automation remains disabled. Document declarative closed-root opacity, initial macOS hover and native Meta-equivalent event differences. Own VM Cargo caches were removed; no shared daemon was stopped.
Measure viewport, scale, native device-scale/layout controls, HTTP and JavaScript user agents, pointer media and GDK touch delivery on owned preview views. Keep experimental controls in the standalone qualification executable, with no public automation activation or JavaScript property overrides.
Keep GTK pointer-lock consent on the owning native surface with a focus-preserving InfoBar, translated native actions, navigation cancellation and the document-generation fence. The compositor now acknowledges the Wayland lock, and Escape releases it without broadening permissions or guest capabilities. Route individual native popup close requests through WebKitGTK try_close, WKWebView tryClose and WebView2 script-window closure so beforeunload Stay retains the document and Leave completes disposal. Add native file-drag sources for Linux, macOS and Windows, origin/PID-fenced Electron dialog answers, and WebView2 beforeunload assertions with live HWND ownership and covered-control checks. Qualify Electron printing with the correct portal display/session bus and a native printed PDF. Exercise real DataTransfer.files and beforeunload navigation/reload/popup-close on the native engines. Update help in ten locales and document the system WebKitGTK 2.52.6 file-drop security restriction without bypassing CVE-2025-13947 protection. Validation: 330 Rust tests, 12 focused policy/vendor checks, 31 help tests, Electron typecheck, native fixture builds and passing real Electron/WebView2 Stay/Leave assertions. Owning-window/opener tree destruction still needs an aggregate beforeunload barrier; the complete no-silent-discard requirement remains open.
Give macOS and Linux previews the six effective CSS viewports and a per-view WebKit mobile identity shared by HTTP and JavaScript. Profile changes and desktop reset reload the owned guest; registration replacement clears state and other previews and the application renderer remain isolated. Fit native geometry and page zoom using the renderer's native scale rather than JavaScript DPR. Serialize native changes off the UI thread, fence profile publication, restore failed configurations, and translate pointer and wheel coordinates through guest zoom. Use the runtime-checked WKWebView density override where available and native GDK touch with compatibility clicks on GTK. Keep native pointer, hover, screen and touch-capability metadata and public WebKit automation boundaries intact. Enable the WebKit viewport menu with translated capability hints and update all ten help locales. Qualify exact dimensions, zoom 150 percent, scale 2, user-agent parity, trusted input, reset, resize, replacement and isolation on WKWebView and GTK X11/Wayland. Windows validation passes 331 serial Rust tests, 30 focused browser tests, UI/server typechecks and 31 help tests; the shared Chromium reporting runner records the native differences.
Invalidate owned preview trees before forced native disposal. Electron tracks the physical owner, opener and document revision, cleans up on accepted owner closure, navigation and renderer loss, and rejects stale popup, menu, prompt and chooser work. Individual user popup closes keep their native beforeunload decisions while cleanup and shutdown bypass descendant unload barriers. Tauri removes complete subtrees atomically, including pending construction, and fences page, navigation, download and permission callbacks by exact creation tokens. Opener document generations prevent delayed popup publication after replacement. Native disposal attempts every selected view, preserves error reporting, and keeps cross-owner records isolated. Enable Electron's subframe preload gate with explicit sandbox, context isolation and page Node access disabled. The separate preview session retains only the prompt preload and fixed synchronous channel. Real-engine checks cover srcdoc and cross-origin frame prompts, isolated page globals, blank popups and the scrollable chooser. Add Rust and Electron lifecycle regressions, native nested-tree acceptance scenarios and focused clipboard/file/context-menu probes. Match the Windows fixture's devtools build feature to production and release modifier flags in the macOS native input helper. Update the current architecture contract and ten-language prompt help. Validation: 332 Rust tests, 16 focused policy/vendor/lifetime checks, 31 help tests, Electron typecheck and native Windows release/Linux/macOS builds. Native teardown trials pass on all four engines; Windows Stay/Leave assertions pass again. Remaining capability qualifications are explicitly tracked in the local evidence matrix rather than treated as demonstrated engine limits. No push or merge.
# Conflicts: # dev-docs/BROWSER_AUTOMATION.md # docs/help/de/browser-sidecars.md # docs/help/en/browser-sidecars.md # docs/help/es/browser-sidecars.md # docs/help/fr/browser-sidecars.md # docs/help/he/browser-sidecars.md # docs/help/ja/browser-sidecars.md # docs/help/ne/browser-sidecars.md # docs/help/ru/browser-sidecars.md # docs/help/tr/browser-sidecars.md # docs/help/zh-Hans/browser-sidecars.md
Expose native driver and device-profile capabilities on macOS and Linux and route the public browser tool through the same authenticated session ownership and parent-channel fences as Windows. Remove host-name refusals while retaining genuine unavailable-host and typed unsupported-operation errors. Integrate current capability documentation in ten languages and preserve native popup, download, permission, dialog and lifetime policies. Add packaged-application qualification using a private OpenCode daemon and deterministic provider issuing actual agent browser tool calls, without touching shared service state.
Select actionable refs rather than label text, wait for atomically reserved downloads to finish, and accept the owned native JavaScript dialog through UI Automation on Windows. Keep each application profile and OpenCode daemon isolated. The Windows release run covers all browser actions, OAuth opener messaging, native download/dialog and PNG through actual native agent tool calls.
Convert the constructed CG wheel event's Y coordinate so eventWithCGEvent yields the window-local Cocoa location expected by direct WKWebView dispatch. The real application qualification catches the mismatch by scrolling a nested region, rather than only the page. Keep private-daemon bridge discovery aligned with the desktop's registry when HOME is isolated, and accept only the owned macOS native dialog through process-targeted Return events. Complete real agent browser actions and preview capability smoke now pass on the macOS application.
Serve the current packaged UI explicitly for debug app qualification, resolve native Linux download folders, and clean up only backend groups carrying the exact qualification app identity. Record native dialog omissions explicitly for page-only diagnostics and require a returned PNG. Run authorized draft Windows native qualification alongside the Linux and Intel/ARM64 macOS jobs, without adding signing secrets or changing authorization. Keep the workflow contract covered by a runnable check.
Give the standalone WebKit example the menu-label state consumed by preview capability policy, and include the native dialog dependency in its bounded qualification manifest. Keep production preview protections active in the example. Record bounded native process-identity diagnostics when a cross-host election child refuses ownership, so Windows CI failures expose their actual precondition rather than an uninformative false result. Preserve all election safety and success assertions.
Give the native parent example an explicit qualification feature and link its trial C/Objective-C adapters when that feature is selected. Normal application builds keep only production adapters. Build the example explicitly in all native WebKit CI jobs instead of relying on incidental Cargo example linkage during unit tests.
Handle focused preview Cmd/Ctrl plus, minus and reset through native WKWebView pageZoom and WebKitGTK zoom-level. Route app zoom-menu commands to that same focused guest before the unchanged primary-window fallback. Keep the user factor separate from fitted mobile-profile zoom, bind native input handlers to view lifetime, and expose no application scripts or IPC in guests. Attach WKWebView context-menu downloads to the navigation download delegate through the native contextMenuDidCreateDownload callback. Reuse the existing sanitized unique Downloads destinations and no-auto-open policy, retaining the change as a focused vendored patch. Replace the invalid fixture image with a generated CRC-valid PNG shared by both fixture servers. Update security regressions to enforce four mandatory permission refusals, fenced classified consent and safe unknown denial. Add native zoom and image-download assertions, build the production native adapters into the capabilities fixture while preserving its Windows manifest, and document focused zoom behavior in the architecture contract and ten help locales. Validation: 340 Windows Rust tests, 65 focused browser/Electron/security/zoom tests and 31 help tests pass. Native macOS, GTK X11 and GTK Wayland trials cover keys and menu zoom with unchanged app scale; macOS also checks primary-focus fallback. Two native macOS image downloads are byte-verified under unique UUID names, GTK image downloads pass on both backends, and the Windows native Save As path completes through the host UUID policy with matching PNG bytes.
Use the fixed WebView2 Page.close protocol command for native popup close requests, preserving the engine's beforeunload decision independently of the site's mutable window.close. Fence queued closure by the exact embedded-view token and keep the callback asynchronous on the UI thread. GTK try_close, WKWebView tryClose and Electron BrowserWindow closure already use native paths. Admit Windows navigation by target identity rather than the current document URL, matching WebKit recovery from about:blank and error documents. Keep destination and final-document HTTP(S) checks, visibility, ownership, deadlines and document identity fences. Make the common guards runtime-generic for HTTP-to-blank-to-HTTP regression coverage against real mock URL state, with dispatch-preflight contract checks for both native adapters. Extend the native Windows close regression to redefine window.close, verify an unarmed popup closes, and assert Stay/Leave on an armed overridden popup. Add a focused accessibility-driven close-only mode and include the same page override in Electron's native acceptance test. Update the current native-close and navigation contracts. Validation: cargo test --locked -- --test-threads=1 passes 341 Windows tests; 65 focused browser/Electron/security/zoom/vendor tests pass. The owned Windows release fixture passes the close-only regression, including the no-op function check, trusted activation, native confirmation, Stay retention and Leave destruction. The initial broader GUI attempt timed out in its reload-state wait; the focused close regression completes and its native evidence is retained locally.
Search composed visible document text alongside semantic labels and field values so split-node phrases satisfy appear waits and keep gone waits pending. Retain captured shadow-root and same-origin frame traversal. Accept hit targets through composed ancestry, including slots and open or captured closed roots, in the shared CDP/WebKit receives program. Qualify the intentional shared fix with trusted host clicks and slot/overlay assertions; retain existing CDP snapshot and event expectations and update only receives program hashes. Validation: 18 server page tests, 13 sequential browser tests including isolated-reader geometry and text regressions, five read-parity fixtures, and shared Chromium action scenarios pass. Native WebKit replay and branch CI are checked separately.
Drive the production waitForText loop through the native WebKit driver and isolated reader in the browser regression. Assert successful appearance, refusal of premature disappearance, and successful disappearance after removal. Validation: the bounded sequential automation-webkit-page browser test passes; the same reader and hit-test fixes were replayed on native WebKitGTK 2.52.6 with trusted open/closed shadow-host clicks.
Keep text-node whitespace when composing WebKit wait text, inserting separators at rendered block, line, hidden and frame boundaries. Traverse slots, shadow roots and same-origin frame documents without splitting inline words. Follow same-origin document frame elements for pointer coverage and associated labels through composed ancestors. Apply the same ancestry to WebKit hidden/disabled checks. Regenerate fixed programs and update only the qualified receives hashes; snapshot goldens remain unchanged. Cover appear/gone polling, inline and slotted words, block/flex/grid/table/list boundaries, iframe-ref native click and scroll, overlay rejection and shadow labels. Server page contracts, read/action comparisons and real WebKitGTK baseline/fixed reproductions qualify the changes.
Assert inherited disabled state on controls inside same-origin frames and assigned slots. These regressions directly qualify the reader's composed-parent traversal alongside iframe aiming and hidden-branch coverage.
Compose affine frame transforms and anchor their translation to native client bounds so rotations, reflections, nested frames and transform origins aim at the same point as inverse hit testing. Clip frame content before mapping and reject unsupported or singular transforms through the typed driver error before scrolling or dispatching input. Regenerate the isolated reader and native header. Cover trusted click, hover, drag and wheel input for rotated, reflected, skewed, translated, ancestor-transformed, nested and top-level targets. The same regression passes on real Linux WebKit and fails against the previous reader by clicking the opposite button. Shared CDP program hashes and snapshot goldens remain unchanged. Update architecture and the download, installation and home help pages in all ten locales to describe native automation on every desktop host and WebKit mobile profile limits. Validate server page tests, affected browser suites, server TypeScript, help tests and the sequential help build.
pascalandr
marked this pull request as ready for review
November 8, 2026 17:49
This was referenced Nov 9, 2026
pascalandr
added a commit
that referenced
this pull request
Nov 14, 2026
## Summary
- Bundle each sandboxed Electron preload independently, inline its
dependencies and retain Electron as the sole external module.
- Load the actual production `dist/preload` files in hidden, sandboxed
Electron views; check preview prompt behavior, absence of
`preload-error`, local/Preferences/remote bridge fences and absence of
page Node access.
- Run the build-and-native regression in PR CI under Xvfb and document
the preload build contract.
## User impact and origin
The two-entry preload build emits `require("./_commonjsHelpers-*.cjs")`.
Electron's sandboxed preload loader refuses that relative require before
either preload can initialize.
Reproduced on `origin/dev` (`1a9b0f9e8`) with the built files:
`browser-prompt.js` fails, and `index.js` fails in local, Preferences
and remote contexts. `window.electronAPI` and the host/context markers
are absent in all three application contexts; the standard preview
prompt override is absent.
The production renderer still loads: a hidden real-Electron check
serving the built renderer displays the home screen, but reports
`host=web`. Native folder dialogs, renderer menu-action
subscriptions/titlebar menu calls, window controls, browser-target
registration and desktop client-state bridges are unavailable. A
Preferences-context renderer loads the ordinary home screen instead of
the Preferences component because its context marker is missing. Remote
windows also lose their restricted notification/microphone/recovery
bridge. Main-process menu construction and backend startup remain
independent; this is not a claim that every native menu item or all
backend functionality is broken.
The second entry was introduced by `185087344` (November 7) and
integrated into `dev` by `296af865a` / #1301 (November 8). The affected
configuration is present in the November 9 dev prereleases
(`v1.1.0-dev-20261109-*`) and remains in the tested dev baseline.
This is only the pre-existing Electron build fix, extracted from
`a6fd382d9`. Remote-preview policy/navigation changes are excluded.
Sandbox, context isolation and page Node restrictions stay unchanged.
Tauri has a separate build path and is untouched.
## Validation
- Node 24.22.3, Windows; all Electron windows hidden and unfocused.
- Red on the original build: 1 failed / 0 skipped, four shared-helper
loader errors; all three application bridges absent.
- `npm run test:preloads --workspace
@neuralnomads/codenomad-electron-app`: production build succeeds; 1
passed / 0 skipped; no preload errors; prompt returns the native answer
and all three application bridges retain their context fences.
- `npm run test:native --workspace
@neuralnomads/codenomad-electron-app`: 7 pretests passed; 340 native
tests passed, 10 skipped, 0 failed.
- `node --import tsx --test
packages/electron-app/electron/main/view-menu.test.ts`: 2 passed / 0
skipped.
- `node --test .github/scripts/binary-build-order.test.cjs`: 3 passed /
0 skipped.
- `npm run typecheck` and the server workspace typecheck: all four
workspace typechecks pass.
- `npm run build --workspace @neuralnomads/codenomad`, then `npm run
build --workspace @neuralnomads/codenomad-electron-app`: both pass,
including required packaged server/npm resources. The built-preload test
passes again against this full build (1 passed / 0 skipped).
UI behavior/source is unchanged; the UI CI suites were not rerun. Linux
execution is wired into PR CI; macOS/Linux local execution is not
claimed. Public-help/i18n updates are unnecessary for this repair of
existing behavior; no user-facing strings or documented workflows
change.
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.
Scope
Native browser previews, agent browser automation parity, and preview capabilities across Electron, Tauri Windows, Tauri macOS and Tauri Linux.
codenomad.browser: open, navigate, snapshot, click, type, select, press, scroll, hover, drag, wait and screenshot through the authenticated backend and fenced native-parent channel.Tauri macOS requires macOS 14 or newer; Electron keeps its own platform baseline.
Host matrix
Qualification
Documented limits
pointerenter; ⌘A selects through the native responder while consuming the main A keydown.Integration
ef69b4085:feat/tauri-webkit-parity.e0d56d428:feat/tauri-webkit-capabilities(d58022b13).3c68ab566; Cocoa wheel correctionecf5751ec.origin/devmerges cleanly with this head. Pushed history is preserved; no force-push or merge intodev.The shared embedded-view layer remains available to remote-tabs work while each consumer retains its own origin/profile/login/pairing/events policy.