feat(browser): add autonomous native previews - #666
Conversation
59b106f to
36e39fb
Compare
36e39fb to
8b6a471
Compare
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/33243527867 Artifacts expire in 7 days.
|
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/33243527867 Artifacts expire in 7 days.
|
8b6a471 to
adfc03f
Compare
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/33871760485 Artifacts expire in 7 days.
|
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/33878676695 Artifacts expire in 7 days.
|
1 similar comment
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/33878676695 Artifacts expire in 7 days.
|
Expose session-scoped browser open, navigate, snapshot, click, type, and screenshot actions through the existing authenticated CodeNomad automation adapter. Reuse the shared native request transport and session ownership fencing from Developer Automation instead of restoring a separate plugin or route. Implement isolated persistent browser previews in Electron and Windows Tauri with hardened popup, permission, download, navigation, deadline, and stale-reference handling. Keep preview registration and open claims scoped to the owning CodeNomad session across windows. Add the session preview UI, native adapters, localized labels, browser-specific architecture documentation, and focused Electron, Tauri, server, and UI coverage. Developer Automation launch, CDP feedback, and lifecycle code remain in DEV-v2 and are not duplicated here.
Apply rustfmt to the new browser command and navigation wiring in main.rs. No behavioral changes.
Create an agent-requested preview before switching the active session so Tauri never registers the previous workspace preview under the new session. Ignore transient registrations that are still loading another URL. Allow failed or closing claim owners to release browser-open ownership and redistribute the request to another local window in both Electron and Tauri. Prevent the failed owner from immediately reclaiming the same request. Fence Electron click dispatch against navigation before every mouse event, matching Tauri. Add focused regressions for claim transfer, stale click refs, and stale Tauri page-load expectations.
Route renderer commands, navigation, events, client-state flushes, and zoom through the primary Tauri Webview instead of requiring a WebviewWindow. Native window operations now derive the parent Window explicitly, and focus/menu targeting ignores browser child webviews so an open preview cannot displace the CodeNomad renderer. Route agent-requested previews through the active instance when restored tabs expose the same OpenCode session more than once. Use Chromium's selectAll editing command and virtual key metadata before replacement typing in both desktop hosts, preserving clear semantics in WebView2. Add Tauri, Electron, and UI regressions, run the browser adapter test in PR CI, and remove a redundant wall-clock assertion from the registration-contention test while retaining its behavior assertions. Validated with repeated 146-test Tauri runs, the 204-test Electron native suite, desktop typechecks, a release Tauri build, and packaged WebView2 open/navigate/snapshot/type/click/screenshot actions.
6290822 to
47a56f2
Compare
Summary
codenomad.browserthrough the authenticated project-local Developer Mode adapter now present ondevScope
Developer Mode launch, CDP feedback, restart, lifecycle, and shared native transport live on
dev. This PR adds browser previews and browser-specific extension points; it does not restore a separate browser plugin, route, launcher, or V1 runtime.The branch remains temporarily stacked on #671 (
fc206729) so its Linux automation-registry test isolation is present until #671 is squash-merged. The final rebase will retain only the four browser commits.Validation
cargo fmt --all -- --check,cargo check, andgit diff --checknpm run build:tauri6290822f72efb9a666cc64176eb244746caecbd3, SHA-25645B1FB4834109988099611C8A82BF7DCD64660D03041F4A5950D70A09C7FD094open,navigate, accessibilitysnapshot, replacementtype,click, and PNGscreenshot{ enabled: true, active: true }, managed CLIready, exact OpenCode session restored, andcodenomad.inspect/codenomad.screenshotoperational while the child preview is openNotes
The Linux cross-target check was not run manually because the local environment lacks
x86_64-linux-gnu-gcc; the PR workflow covers Linux and Tauri Linux builds.