Repository navigation
Show live agent browser view from the feature card (#70) - #265
zwanski-start wants to merge 1 commit into
Conversation
Clicking a feature card that an agent is working on now shows that agent's embedded browser view, with a shortcut to the Browsers page, so browser testing can be watched without desktop windows. Browser-view subscriptions in useProjectWebSocket are now reference counted (so the modal and Browsers page don't cancel each other) and are re-sent when the socket (re)connects; previously a subscribe issued before the socket opened, or across a reconnect, was silently lost. The modal also shows IN PROGRESS instead of PENDING for active features. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔍 QA report: ✅ PassedTester: Ken (cubefarm agent, in a fresh session) · Round: 1 · Author: Barbara The feature modal now shows a Live Browser section with the latest screenshot from the agent working on the feature, including features in another feature's batch, plus an 'All browsers' shortcut. The browser-view subscription is now reference-counted and re-sent when the WebSocket opens. Lint and build pass, and with a real backend and a mocked agent WebSocket I confirmed the modal preview, batched-feature matching, that idle features are unchanged, balanced subscribe/unsubscribe messages, and that a reload on the Browsers page now shows the image. The e2e suite could not run because Playwright's Chromium is missing on the QA machine; that is an environment problem, not caused by this PR.
🧪 Commands run
No browser screenshots were taken in this round. Posted by cubefarm · merges automatically once GitHub's checks pass |
Closes #70
Context
Most of what #70 asks for is already on master (commit
9f87f7a, "embed browser windows"). Agents always runplaywright-cliheadless, andBrowserViewServicestreams periodic screenshots of each agent's session over the project WebSocket. These appear on the Browsers page and in the debug panel's Browsers tab. The issue also asked for the browser to be reachable from the feature card, and that part was missing. This PR adds it and fixes a subscription bug I found in the existing streaming code.What changed
FeatureBrowserPreview.tsx,FeatureModal.tsx,layout/Modals.tsx). Clicking the card of a feature an active agent is working on now shows a Live Browser section with that agent's latest screenshot. A batched feature is matched through the agent that owns the batch. The section also has an All browsers shortcut to the Browsers page. Features with no active agent show nothing new.useWebSocket.ts):subscribeBrowserView/unsubscribeBrowserVieware now reference-counted. Before, closing the modal while the Browsers page was mounted would have unsubscribed both.onopen. Before, a subscribe made while the socket was still connecting (e.g. a page reload on the Browsers view) or lost on a reconnect was silently dropped, so no screenshots appeared.Verification
npm run lint: 0 errors. The 6 warnings were already there, none are in changed files.npm run buildpasses.routeWebSocketto send anagent_updateand answerbrowser_view_subscribewith abrowser_screenshot. Results:browser_view_subscribeafter the socket opens and shows the image.Assumptions
🤖 Generated with Claude Code