Bot browsing on a remote machine can't be watched: the machine's screen takes the browser's place

Aperta
#73 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Start in src/components/bot-panel/ComputerTab.tsx and src/components/ComputerPanel.tsx, tracing how the machine screen and browser panel are selected for a bot running on a paired server. Check the browser stream client and the stated panel behavior for guidance. Done means a bot with browsing enabled can view its live browser from the server's page while retaining access to the machine screen.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What happened

A bot that browses on a remote machine (a paired server of your own, or My Cloud) keeps browsing, but the panel never shows it: the machine's screen takes the browser's place.

On This computer the Computer tab shows the bot's live browser — the page, its tab strip (LocalBrowserSection, src/components/bot-panel/LocalBrowser.tsx) — because the page is this computer's. On the server's page it shows that machine's screen instead, and the Browser tab is not in the tab row either.

Where the panel decides:

  • src/components/bot-panel/ComputerTab.tsx:314 — ownScreen = !local || cloudOwned || current === "vm", with local = isLocalHost(runsOnHost(...)) (:187, :304). runsOnHost reads otherServer from the desktop (src/lib/other-server.ts), so a window on a paired server comes out as kind: "vps", local is false, and the screen renders in place of the browser section.
  • src/components/ComputerPanel.tsx:275-278 — the Browser tab exists only when the bot's computer is "browser" or the stored view for that bot says browser; src/lib/computer-panel-view.ts resolves any other stored view to "computer", and the stored view is per origin, so a Browser tab chosen on This computer does not exist on the server's origin.
  • The bot's browser still mounts on whichever server runs the turn. It is gated only on features.browser, bot.browser !== false, bot.computer !== "off" and not the person's own Chrome (server/host/browser.ts:316, :404), and it is streamed at /api/bots/<id>/browser (src/lib/browser-stream-client.ts), so the server's page could render it.

So the browsing is real — its tool lines appear in the chat — but there is no live view of it.

Verified
  • DOM test against the real ComputerPanel: a bot with computer: "local" and features.browser on has no computer-panel-tabs-tab-browser and no browser panel; computer: "browser" shows both. (Temporary test, deleted after the run.)
  • computerPanelTabs({ browser: false }) → ["computer"]; resolveComputerPanelView("browser", { browser: false }) → "computer".
  • runsOnHost({ cloudHome: false, otherServer: "box-1", platform: "darwin" }) → { kind: "vps" }, which isLocalHost rejects, so ownScreen is true.
Steps to reproduce
  1. Pair a server of your own (or move a bot to My Cloud) and leave its browsing on.
  2. Set the bot's computer to that machine, not "Browser only".
  3. Open the bot's Computer tab with the window on the server: no Browser tab (unless it was chosen earlier on that origin), and the machine's screen where This computer shows the bot's live browser.
  4. Give the bot a task that browses: it works — browser tool lines land in the chat — but the page is nowhere in the panel.
Version

0.2.17

Platform

macOS

Engine

No response

Logs or screenshots
Expected: a bot's browser is watchable wherever the bot runs.
Fix direction, not a decision: render the bot's browser section above the machine's screen whenever
`bot.browser !== false` and a browser is open (the stream route is the current origin's, so it already
works from the server's page), or keep the Browser tab in the row for every bot with browsing on
instead of only `computer === "browser"` ones.
Lingua principale
TypeScript
Stelle
277
Fork
27
Merge medio
2h 47m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DuskBotAI/duskbot

Tutte le issue di DuskBotAI/duskbot

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.