Repository navigation
fix(browser): keep new tabs accessible during their first navigation - #150233
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 3:08 PM ET / 19:08 UTC (Revision 2). ClawSweeper reviewWhat this changesThe Chrome extension reconciles lagging tab metadata with confirmed navigation events so newly created tabs remain accessible during their first navigation, with regression coverage and documentation. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix that current main does not contain. No introduced correctness or security defect was found, and the related merged work addresses different races. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s Chrome extension receives browser commands through an authenticated relay. Its tab-access owner combines Chrome metadata, navigation events, and user access controls to decide which tabs can receive commands and appear in discovery. flowchart TD
A[Authenticated browser commands] --> B[Tab access owner]
C[Chrome tab snapshots] --> D[Navigation reconciliation]
E[Native root navigation events] --> D
D --> B
F[Pause and selected group controls] --> B
B --> G[Debugger commands]
B --> H[Accessible tab discovery]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +6, Tests +61, Docs +1. Total +68 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep navigation reconciliation in the existing document-provenance owner, with current access controls governing both command execution and discovery. Do we have a high-confidence way to reproduce the issue? Yes, through a controlled source-backed sequence: commit the destination before Chrome’s about:blank snapshot catches up, then complete navigation access checks. The supplied regression reports this failure before the fix; this review did not execute it or reproduce the natural CI timing. Is this the best way to solve the issue? Yes. Reusing the existing native-root reconciliation for access reads and discovery is a narrow repair that avoids another eligibility policy, retries, or configuration surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f0a8b6d9abfc. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Reconcile lagging Chrome tab reads and discovery with the native root commit so initial navigation stays accessible. Keep pending URL, tab identity, and existing access checks intact. Cover acknowledgement and discovery through the relay command handler in both access modes. Related: #150158, #133490.
ab8d0f3 to
a5e1bce
Compare
|
Merged via squash.
|
…penclaw#150233) Reconcile lagging Chrome tab reads and discovery with the native root commit so initial navigation stays accessible. Keep pending URL, tab identity, and existing access checks intact. Cover acknowledgement and discovery through the relay command handler in both access modes. Related: openclaw#150158, openclaw#133490.
Related: #150158, #133490, #149820.
What Problem This Solves
Fixes an agent-created extension tab intermittently losing access during its first navigation. The motivating Chromium CI failure returned HTTP 500 with
Page.navigate: tab … access was revokedwhile opening a tab in Selected tabs mode, before the later pause/revoke step.User Impact
Normal navigation keeps new tabs available in either access mode. This changes relay/access behavior without changing the extension UI, configuration, or permission rules.
Why This Change Was Made
The native root-frame commit can retire initial-blank admission before Chrome's tab metadata catches up. A fresh
tabs.getor discovery snapshot can still reportabout:blankwith the confirmed destination inpendingUrl; the access owner then rejects its own navigation or drops the tab from discovery. The existing revision guard only catches a commit that overtakes the individual read.Reuse the existing native-root snapshot reconciliation for access reads and discovery. It applies only to the same tab with a pending URL matching the recorded native root commit. Identity, group, incognito, access epochs, explicit blank events, and attachment retirement keep their existing checks.
The access-policy modules predate #149820. This reproduces a product race matching the CI error; it does not establish that refactor as the introducing change or prove the CI run's exact internal scheduling.
Evidence
OPENCLAW_BROWSER_EXTENSION_E2E=1 node scripts/run-vitest.mjs extensions/browser/chrome-extension/bootstrap.chromium.test.ts.tab 101 access was revokedmessage; both pass afterward. Four missing/different-destination negative cases pass. The regression also checks continued discovery and subsequent commands.git diff --checkpassed.node scripts/check-changed.mjsstops at lint declaration preparation because this nested worktree resolves a candidate@types/events/package.jsonthrough the parent checkout'snode_modules. The same native lint command fails on unchangedmodules/tab-eligibility.js. Moving the checkout was outside the authorized worktree scope; no boundary guard was disabled. CI needs to complete lint from its isolated checkout.origin/mainand current open/recently merged PR searches for bootstrap, revoke, paused tab, tab access, and relay: no covering fix found.