Repository navigation
Show the devbox browser in the main view - #4740
chrisakinrinade wants to merge 2 commits into
Conversation
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>
[Medium impact] The change affects the browser experience within the devbox instance workflow. Fix the missing browser feature gate and draft loss before merging. FindingsSummaryMoves the devbox browser from the side panel into the 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 |
| {live && browserOpen ? ( | ||
| <DevboxBrowserView | ||
| api={api} | ||
| live={live} | ||
| browserEnabled={!!instance.devbox?.browser} | ||
| onClose={closeBrowser} | ||
| /> |
There was a problem hiding this comment.
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.
| {live && browserOpen ? ( | ||
| <DevboxBrowserView | ||
| api={api} | ||
| live={live} | ||
| browserEnabled={!!instance.devbox?.browser} | ||
| onClose={closeBrowser} | ||
| /> |
There was a problem hiding this comment.
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>
|
did you try an e2e test w/ this? |
|
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 What did run:
The |
@michaeljguarino nope, not yet. Will do in a sec |
|
Plural deploy this |
There was a problem hiding this comment.
Promotes sha-1f6c203 for the requested deployment via GitOps PR https://github.com/pluralsh/plrl-up-demos/pull/3820.
|
if you want you can merge it into my open pr which is actively being tested in plrldemo |
|
Merged this into #4742 (
|
|
merged this into the work done here: #4742 |
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=browseris mutually exclusive with an open file or change. The button and the view both stay behind the DevboxBrowser feature flag, so a shared?view=browserlink 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
binaryWebSocket subprotocol and binary frames round-trip throughProxyStream. The deployment operator's running code is unchanged, so the agent was not redeployed.Part of PROD-5479
Test Plan
go testforgo/deployment-operator/pkg/devbox/gateway/core(TestProxyStream, including the new VNC upgrade) andgo/kubernetes-agent/cmd/kas/kasapp(TestDevbox_StreamProxy, including the binary subprotocol).yarn vitest --run src/components/workbenches/workbench/devboxes(includingDevboxBrowserView.test.tsxand composer tests that a draft, with attachments, survives unmount and is dropped after a successful send).yarn tsc --buildinjs/console.Test environment: https://console.plrldemo.onplural.sh/
Checklist
Plural Flow: console