aboutsummaryrefslogtreecommitdiff
path: root/CHANGELOG.md
diff options
context:
space:
mode:
authorIgor Soarez <igor@soarez.org>2026-08-29 22:59:29 +0100
committerIgor Soarez <igor@soarez.org>2026-10-14 12:19:26 +0100
commitcfa0b6f854e7f15717db385df0e43f974a4b1e67 (patch)
tree661c6aa9f5168c74f28a8c694a73381a2d9d0d25 /CHANGELOG.md
parent681ea9d0b3b89bec1ad8c57ef79ae2d4d82ef49b (diff)
fix(setup): skip local-browser precondition for every remote target
The pre-flight check only skipped isBrowserRunning() when BU_CDP_HTTP was set, so a machine with no local browser failed /browser-setup with 'No browser instance running' before discovery ever dialed the built-in castle default. Resolve the target the same way discovery does and skip the local-process check whenever it resolves remote — env var, /browser-target choice, or default. A resolved local target still requires a local browser, and an unreachable remote still fails loudly in step 4.
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 12b4738..4fefe5f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ All notable changes to pi-browser-harness will be documented in this file.
### Fixed
+- **`/browser-setup` no longer demands a local browser when the target is remote.** The pre-flight check enumerated local Chromium processes unless `BU_CDP_HTTP` was set, so a machine with no local browser failed setup with "No browser instance running" even though the fork's built-in default (castle) was reachable. The precondition is now skipped whenever `resolveCdpTarget` resolves to a remote target — env var, `/browser-target` choice, or the built-in default.
- **`pi -p` exits after using browser tools.** The client's socket to the daemon is kept open across sessions by design, and in non-interactive mode it was the last handle keeping Node alive, so a print-mode run that had connected to the browser printed its answer and then hung until killed. The socket no longer holds the event loop; in-flight requests keep their own timers, so nothing awaited is affected. (#39)
- **`browser_download` no longer redirects the user's own downloads for good.** `Browser.setDownloadBehavior` was sent without a `browserContextId`, which Chrome applies to its default context — the one the user's own tabs are in — and the override lives on the browser connection, which the daemon keeps open across pi sessions. Every later download in that Chrome, the user's own included, went to the tool's temp directory, and nothing undid it when the session ended. The tool now takes `restore: true` to reset the behavior, and a clean session shutdown restores the default whenever this session's override is still in force (a killed session cannot, so call `restore: true` as soon as you are done).
- **Browser state is no longer appended to the session on every callback.** Every ownership change, every `session_tree` event (even one that merely restored the entry already on the branch) and every shutdown appended a `browser-harness-state` entry, so the append-only session file and Pi Web's `+N custom` chain grew without bound. A snapshot is now written only when it differs from the last one persisted or restored; tab order does not count as a difference. (#26)