Files
BrowserSkill/apps/extension
Qiaochu HuandClaude 2dad162a87 fix(extension): retry console capture when a domain enable fails
`enableConsoleDomains` marked the tab in `consoleDomainsAttemptedTabs`
before issuing `Runtime.enable`/`Log.enable` and swallowed any errors,
so a transient failure (e.g. a restricted page during attach)
permanently disabled console capture for that tab: every later
`ensureConsoleCapture` was a no-op and the agent silently got an empty
console buffer with no indication that capture was broken.

This was inconsistent with `enableNetworkDomain`, which records the tab
only after `Network.enable` succeeds (and is explicitly tested as
"retries and surfaces failures"). Bring `enableConsoleDomains` in line:
mark the tab only after both domains enable successfully, so a later
`ensureConsoleCapture` can recover from a transient failure. Renamed
the flag `consoleDomainsAttemptedTabs` -> `consoleDomainsEnabledTabs`
to match `networkDomainsEnabledTabs` and reflect the new semantics.

Attach remains best-effort (it still succeeds when a domain can't be
enabled). Adds a regression test asserting `ensureConsoleCapture`
retries after a failed enable; it fails (no retry) on the previous code.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-22 20:12:51 +08:00
..
2026-06-22 17:36:26 +08:00
2026-06-22 17:36:26 +08:00
2026-06-22 17:36:26 +08:00
2026-06-22 17:36:26 +08:00
2026-06-22 17:36:26 +08:00