Repository navigation
Show live agent browser in the feature modal - #321
zwanski-start wants to merge 1 commit into
Conversation
Agents already run Playwright headless and stream screenshots to the Browsers view. This makes the live browser reachable from the feature card as the issue asks: - FeatureModal embeds a Live Browser preview for any agent working on or testing the feature, with a shortcut to the full Browsers view - FeatureCard shows a Live hint when an agent is on the feature - Ref-count browser view subscriptions in useProjectWebSocket so one consumer unmounting no longer stops streaming for the others, and resubscribe after a reconnect - Drop a finished agent's last frame so it doesn't linger as live Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔍 QA report: ✅ PassedTester: Dennis (cubefarm agent, in a fresh session) · Round: 1 · Author: Guido The feature detail modal now has a Live Browser section showing each coding/testing agent's latest frame for that feature, including batched agents matched through featureIds. It shows a placeholder while the agent hasn't opened a browser yet, and the section is hidden when no agent is on the feature. In-progress features now read IN PROGRESS instead of PENDING, cards with an active agent get a 'Live' hint, and 'All browsers' closes the modal and opens the Browsers view with frames still streaming. In a browser test with a mocked project WebSocket, I confirmed the subscription counting, the resubscribe after reconnect, and the removal of finished agents' frames. Lint and build pass, and the change is frontend-only (5 UI files, no backend or schema changes).
🧪 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 the issue asks for is already on master. Agents always run Playwright headless (
server/routers/agent.py,settings.py), so desktop browser windows no longer pop up.BrowserViewServicestreamsplaywright-cli screenshotframes over the project WebSocket to the Browsers view (sidebar, shortcutB) and to the debug panel's Browsers tab, which covers the "dedicated agent page" option.The part still missing was the issue's other option: getting to the browser from the feature card. This PR adds that and fixes two subscription bugs that showed up once a third consumer was added.
Changes
FeatureBrowserPreview(new): a "Live Browser" section in the feature detail modal. It shows the latest frame from each agent (coding or testing) working on that feature, including batched agents matched throughfeatureIds. While an agent is on the feature but hasn't opened a browser yet, it shows a placeholder instead. An All browsers button closes the modal and opens the Browsers view. Screenshots stream only while the modal is open.FeatureModal: renders the preview and now shows an IN PROGRESS status. Before this, in-progress features showed "PENDING".FeatureCard: a small "Live" hint on cards that have an active agent, so users know clicking the card shows the browser.useProjectWebSocket:agent_updatesuccess/error), its last frame is removed so a finished browser no longer looks live.No backend changes.
Verification
npm run lint: 0 errors. The 6 warnings were already on master.npm run build: passes.page.routeWebSocketto send anagent_updatefor feature fix: auto-activate venv in start_ui.sh #1 andbrowser_screenshotframes every 2s afterbrowser_view_subscribe:I did not test this against a real running agent.
Assumptions
playwright-cli, not a URL the UI can load. Streaming screenshots, which the existing service already does, is the practical in-UI equivalent.🤖 Generated with Claude Code