Skip to content

Show the devbox browser in the main view - #4740

Closed
chrisakinrinade wants to merge 2 commits into
masterfrom
cursor/devbox-browser-main-view-818b
Closed

chrisakinrinade wants to merge 2 commits into
masterfrom
cursor/devbox-browser-main-view-818b

Conversation

@chrisakinrinade

@chrisakinrinade chrisakinrinade commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

The devbox browser takes over the center of the instance, the same way an open file or diff does, instead of living in the side panel. A Browser button in the instance header opens it for boxes that run a browser, and Back to session returns to the conversation. The view starts in control, and fullscreen uses the browser's own fullscreen API so the noVNC canvas stays mounted and the stream does not reconnect.

view=browser is mutually exclusive with an open file or change. The button and the view both stay behind the DevboxBrowser feature flag, so a shared ?view=browser link does not start VNC while the flag is off. The flag still defaults to off. Turning it on waits on a real session against a browser-enabled box on the dev cluster, which this environment cannot reach (no cluster credentials).

Opening the browser unmounts the conversation. The unsent prompt and its attachments are kept per session and restored on Back to session. The same store covers a file or diff taking that view.

Gateway and KAS tests cover the VNC hop that differs from the terminal: the binary WebSocket subprotocol and binary frames round-trip through ProxyStream. The deployment operator's running code is unchanged, so the agent was not redeployed.

Part of PROD-5479

Test Plan

  • go test for go/deployment-operator/pkg/devbox/gateway/core (TestProxyStream, including the new VNC upgrade) and go/kubernetes-agent/cmd/kas/kasapp (TestDevbox_StreamProxy, including the binary subprotocol).
  • yarn vitest --run src/components/workbenches/workbench/devboxes (including DevboxBrowserView.test.tsx and composer tests that a draft, with attachments, survives unmount and is dropped after a successful send).
  • yarn tsc --build in js/console.
  • Not run: a live noVNC session. The flag stays opt-in until that passes.

Test environment: https://console.plrldemo.onplural.sh/

Checklist

  • I have added a meaningful title and summary to convey the impact of this PR to a user.
  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have deployed the agent to a test environment and verified that it works as expected (required only when changing agent code).

Plural Flow: console

Open in Web Open in Cursor 

The browser replaces the center column the way an open file does, behind
the DevboxBrowser flag and a box with browser enabled. Back to session
clears the view, and fullscreen uses the native Fullscreen API so the
noVNC session stays connected and starts in control.

Gateway and KAS tests cover the binary WebSocket subprotocol on the VNC
stream. The flag stays off until that stream is confirmed on a dev cluster.

Co-authored-by: Chris Akinrinade <chrisakinrinade@users.noreply.github.com>
@chrisakinrinade
chrisakinrinade requested review from a team as code owners November 25, 2026 21:41
@linear

linear Bot commented Nov 25, 2026

Copy link
Copy Markdown

PROD-5479

@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 3/5 · Fix the missing browser feature gate and draft loss before merging.RetriggerView in GreptileConfidence Score: 3/5

[Medium impact] The change affects the browser experience within the devbox instance workflow.

Fix the missing browser feature gate and draft loss before merging.

Findings

  1. P1 Browser ignores the feature flag ▶
  2. P1 Opening Browser discards drafts ▶

Summary

Moves the devbox browser from the side panel into the main view.

  • The devbox browser now fills the instance’s main view.

Tests were not run. UI capture was blocked by missing frontend dependencies and the lack of a live console/devbox session.

Reviews (1) · Last reviewed commit: "feat: show the devbox browser in the mai..." · Reviewed by Greptile

Comment on lines +239 to +245
{live && browserOpen ? (
<DevboxBrowserView
api={api}
live={live}
browserEnabled={!!instance.devbox?.browser}
onClose={closeBrowser}
/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Browser ignores the feature flag

Opening ?view=browser on a live, browser-enabled instance starts VNC even when DevboxBrowser is off. Only BrowserButton checks the flag; the route checks Devboxes, and browserOpen comes directly from the URL. Shared links therefore bypass the opt-in, and disabling the flag leaves an open browser running. Check DevboxBrowser before mounting DevboxBrowserView.

Comment on lines +239 to +245
{live && browserOpen ? (
<DevboxBrowserView
api={api}
live={live}
browserEnabled={!!instance.devbox?.browser}
onClose={closeBrowser}
/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Opening Browser discards drafts

Clicking Browser now discards any unsent message and attached files. This branch unmounts DevboxThreadPane, while DevboxComposer keeps its draft only in local state. Previously, opening the browser in the side panel left the conversation mounted. Back to session now returns to an empty composer. Save the draft outside the replaced view, or keep the conversation mounted while the browser is open.

A view=browser link was starting VNC even with DevboxBrowser off, because
only the header button checked the flag. The main view now checks it too.

Opening the browser unmounts the composer. The unsent prompt and its
attachments are stored by session and restored when the conversation
comes back, including after a file or diff takes the same view.

Co-authored-by: Chris Akinrinade <chrisakinrinade@users.noreply.github.com>
@michaeljguarino

Copy link
Copy Markdown
Member

did you try an e2e test w/ this?

@cursor

cursor Bot commented Nov 25, 2026

Copy link
Copy Markdown

No live end-to-end run. This environment has no kubeconfig, kubectl, or Plural CLI, so I could not open a browser-enabled box on plrl-dev-devbox.

What did run:

  • Gateway TestProxyStream: a VNC upgrade returns Sec-WebSocket-Protocol: binary, and a binary frame is echoed back through ProxyStream.
  • KAS TestDevbox_StreamProxy: the same binary subprotocol and frame survive the KAS WebSocket upgrade.
  • Frontend Vitest for the devboxes folder, including the main-view, fullscreen, and draft-restore cases, plus yarn tsc --build.

The DevboxBrowser flag is still off by default because of that missing cluster check. A real noVNC session on a fat image with browser: true is the remaining proof, mostly that Xvfb, x11vnc, and Chromium are in the image and the subprotocol still negotiates outside the unit tests.

@chrisakinrinade

Copy link
Copy Markdown
Contributor Author

did you try an e2e test w/ this?

@michaeljguarino nope, not yet. Will do in a sec

@chrisakinrinade chrisakinrinade added the enhancement New feature or request label Nov 25, 2026 — with Cursor
@chrisakinrinade

Copy link
Copy Markdown
Contributor Author

Plural deploy this

@plural-copilot plural-copilot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promotes sha-1f6c203 for the requested deployment via GitOps PR https://github.com/pluralsh/plrl-up-demos/pull/3820.

@michaeljguarino

Copy link
Copy Markdown
Member

if you want you can merge it into my open pr which is actively being tested in plrldemo

@cursor

cursor Bot commented Nov 26, 2026

Copy link
Copy Markdown

Merged this into #4742 (devbox-truncate-ingest-titles), the open pull request on plrldemo.

useDevboxPanel was the one conflict. The pull-request highlight from that branch stays, and so does view=browser from this one. This pull request stays open. The browser is still behind the DevboxBrowser flag, which defaults to off.

@michaeljguarino

Copy link
Copy Markdown
Member

merged this into the work done here: #4742

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants