Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

fix: download and scroll

Boschf66dd5108b53
diff --git a/internal/bridge/action_pointer.go b/internal/bridge/action_pointer.go
index 37b8a426..9dff9beb 100644
--- a/internal/bridge/action_pointer.go
+++ b/internal/bridge/action_pointer.go
@@ -145,6 +145,13 @@ func (b *Bridge) actionScroll(ctx context.Context, req ActionRequest) (map[strin
if req.NodeID > 0 {
return map[string]any{"scrolled": true}, ScrollByNodeID(ctx, req.NodeID)
}
+ if req.Selector != "" {
+ node, err := firstNodeBySelector(ctx, req.Selector)
+ if err != nil {
+ return nil, err
+ }
+ return map[string]any{"scrolled": true}, ScrollByNodeID(ctx, int64(node.BackendNodeID))
+ }
scrollX := req.ScrollX
scrollY := req.ScrollY
diff --git a/internal/handlers/download.go b/internal/handlers/download.go
index 354f04ca..d1688591 100644
--- a/internal/handlers/download.go
+++ b/internal/handlers/download.go
@@ -254,7 +254,15 @@ func (h *Handlers) HandleDownload(w http.ResponseWriter, r *http.Request) {
}
maxDownloadBytes := h.Config.EffectiveDownloadMaxBytes()
- validator := newDownloadURLGuard(h.Config.DownloadAllowedDomains)
+ // Download allowlist: prefer the explicit per-feature list, but fall
+ // back to the unified security.allowedDomains (surfaced on the runtime
+ // config as IDPI.AllowedDomains). This way operators only need to
+ // configure trusted domains once.
+ allowed := h.Config.DownloadAllowedDomains
+ if len(allowed) == 0 {
+ allowed = h.Config.IDPI.AllowedDomains
+ }
+ validator := newDownloadURLGuard(allowed)
if err := validator.Validate(dlURL); err != nil {
httpx.Error(w, 400, fmt.Errorf("unsafe URL: %w", err))
return
diff --git a/skills/pinchtab/SKILL.md b/skills/pinchtab/SKILL.md
index edb1d5d2..6c986178 100644
--- a/skills/pinchtab/SKILL.md
+++ b/skills/pinchtab/SKILL.md
@@ -224,6 +224,8 @@ Rules:
- Re-snapshot immediately after `click`, `press Enter`, `select`, or `scroll` if the UI can change.
- To discover valid dropdown values, snapshot with `filter=interactive` first — the output shows `<option>` elements with their `value` attributes. Then use `select` with the exact value.
- If a click opens a JS dialog (`alert`, `confirm`, `prompt`), pass `"dialogAction": "accept"` or `"dialogAction": "dismiss"` on the click action body. The dialog is auto-handled in a single call. Without this, the click hangs until `/tabs/TAB_ID/dialog` is called from a parallel request, and a pending dialog wedges subsequent `/snapshot` and `/text` calls.
+- For the `scroll` action via HTTP, use `"scrollX"` / `"scrollY"` for pixel deltas, or `"selector"` to scroll an element into view. Example: `{"kind":"scroll","scrollY":1500}` or `{"kind":"scroll","selector":"#footer"}`. The `x`/`y` fields are target viewport coordinates, not scroll deltas.
+- The download HTTP endpoint (`GET /download?url=...` or `GET /tabs/TAB_ID/download?url=...`) returns JSON `{contentType, data (base64), size, url}`, not raw bytes. Decode `data` with base64 to get the file. Only `http`/`https` URLs are allowed. Private/internal hosts are blocked unless listed in `security.downloadAllowedDomains`.
### Export, debug, and verification