Skip to content

[Bug] Unify the visible desktop browser and agent browser tools#254

Open
fettpl wants to merge 4 commits into
sybil-solutions:mainfrom
fettpl:p1/issue-236-unified-browser-surface
Open

[Bug] Unify the visible desktop browser and agent browser tools#254
fettpl wants to merge 4 commits into
sybil-solutions:mainfrom
fettpl:p1/issue-236-unified-browser-surface

Conversation

@fettpl

@fettpl fettpl commented Jul 19, 2026

Copy link
Copy Markdown

Summary

  • Replaces the desktop-only Electron <webview> path with the same CDP screencast surface used by agent browser tools, so the visible pane and tool calls observe and control one page.
  • Removes the retired webview capability and guest-attachment path while retaining the DNS-pinned browser policy supplied by [Security] Enforce DNS-pinned browser policy across redirects and subresources #252 for navigation, redirects, and subresources.
  • Routes visible navigation, location, viewport, mouse, keyboard, and file-link behavior through the managed browser host without restoring file:// access.
  • Keeps browser state in a feature-local external store whose Effect-owned polling lifecycle survives page/tab changes without replaying cached URLs.
  • Serializes explicit navigation requests in issue order and settles the toolbar location only from the first poll begun after the latest navigation completes, including immediate redirects, failures, queued requests, and remounts.
  • Adds focused regressions plus real-Chromium red-to-green frame acceptance for the shared visible/tool page.

Closes #236

Depends on #252, whose exact browser-network-policy commit is the base of this branch.

Root cause

The desktop rendered an Electron webview while agent browser tools controlled a separate managed Chromium page. An initial unification attempt also let older navigation requests mutate the shared host after newer intents and used an exact-URL latch that could suppress a legitimate redirect forever. The final implementation has one host-authoritative surface, ordered explicit mutations, and a poll-settlement barrier rather than URL equality.

Validation

  • Focused [Architecture] Use one protected browser surface for users and agents #236 frontend regressions: 17/17 passed.
  • Independent temporary race reproductions: 3/3 passed for failed A followed by B, three queued navigations with a middle failure, and unsubscribe/remount during a queued sequence.
  • Real-Chromium browser request acceptance: 2/2 passed with decoded red A and green B frames.
  • Full integration suite: 32/32 passed.
  • npm --prefix frontend run check:quality passed.
  • npm run check passed.
  • A fresh independent P0/P1 review approved exact SHA a9457a041b9f50bd5da98f3c466ec2f904a8db4c with no blocking findings.
  • Production desktop:dist completed successfully, including ZIP and DMG generation. Local signing was skipped because no valid trusted signing identity was available; release signing behavior is unchanged.
  • The canonical /Applications/Local Studio.app was replaced, registered, and relaunched. Its persisted embedded port was 65002 and /api/desktop-health returned HTTP 200 with ok:true after cleanup.
  • Generated desktop artifacts were removed and the shared reinstall lock was released; the worktree remains clean.

UI changes

The desktop browser pane now renders the managed CDP screencast used by agent tools. Navigation and input remain visible in that same pane, and project files continue to open through the existing Files/canvas viewers rather than browser file:// access.

Acceptance criteria

  • The visible desktop pane and agent browser tools use one protected managed page.
  • Navigation from either surface converges in the other without replaying cached URLs.
  • Concurrent explicit navigations preserve user issue order and latest intent.
  • Immediate redirects and failed navigation recover from post-settlement host state.
  • The retired webview capability and guest attachment path are removed.
  • Focused, integration, quality, full-repository, independent-review, and installed-desktop health gates pass.

Risks / rollout notes

Workflow state

The exact-head fork workflows require maintainer approval before jobs can execute:

@fettpl
fettpl requested a review from 0xSero as a code owner July 19, 2026 08:22
@fettpl

fettpl commented Jul 19, 2026

Copy link
Copy Markdown
Author

@0xSero CI and Security for the independently approved exact head a9457a041b9f50bd5da98f3c466ec2f904a8db4c are waiting for upstream workflow approval: CI and Security. This head passed the full repository and pre-push gates, independent P0/P1 review, production packaging, canonical reinstall, and desktop health 200. Please approve the workflows and review when convenient.

@fettpl
fettpl force-pushed the p1/issue-236-unified-browser-surface branch from c996c84 to a9457a0 Compare July 20, 2026 09:25
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.

[Architecture] Use one protected browser surface for users and agents

1 participant