Skip to content

feat(browser): open the bot's closed browser for yourself, without the bot - #183

Merged
httpsphl merged 1 commit into
mainfrom
feat/browser-open-for-owner
Oct 5, 2026
Merged

httpsphl merged 1 commit into
mainfrom
feat/browser-open-for-owner

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 5, 2026

Copy link
Copy Markdown
Owner

The owner asked to open a bot's closed browser just to look and use it themselves, without waking the bot or sending it anything (spec 21.2, 21.7, 21.8, 21.10).

What changes

  • Daemon
    • browser.start {botId} comes from the connection watching that bot and answers at once.
    • In the background it starts the bot's browser through the same path as browser_open, then opens the last page it showed.
    • The last page is the active tab's address, kept in memory per bot from page changes, never about:blank.
    • It is refused while the bot or its crew is paused. An open browser stays as it is.
  • App
    • "Abrir para mim" sits on the closed overlay, or under the mascot when there is no picture.
    • It calls browser.start, then browser.take as soon as the state is open, so it lands in the owner's hands.
    • The note under the button says the bot is not woken or told, and that once given back the browser rests again.
  • Giving back
    • It does not tell the bot unless the bot has an open request for help, same as before.
    • The sweep rests it after 20 s.

Tests

  • Real Edge (tests/browser_owner_open.rs):
    • the bot opens /login and closes the browser;
    • the owner can't open it without watching; once watching, it opens on /login;
    • take and release work;
    • a paused bot is refused.
  • App: the button opens the browser in the owner's hands on the last page, sends nothing to the bot, and the browser is given back.

Manual

  • On a real bot whose browser closed (WhatsApp Web, for example), press "Abrir para mim". The page should come back logged in and nothing should appear in the bot's chat. Give it back and see it rest after about 20 s.

A closed browser now has "Open it for me". browser.start brings up the
bot's browser without the bot, which is neither woken nor told, on the
page it showed last (kept in memory per bot), and the app takes it into
the owner's hands as soon as it is open. Given back, it rests again as
after anything the owner does outside a turn. Refused while the bot or
its crew is paused.
@httpsphl
httpsphl enabled auto-merge October 5, 2026 00:31
@httpsphl
httpsphl merged commit 7d76e7a into main Oct 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant