Commit Graph
175 Commits
Author SHA1 Message Date
ldm0 abc7de49fa perf(browser): reduce navigation owner round trips
Return the superseded navigation and original decision permit with the existing
admission receipt. Read the current Document URL and the controller's retained
navigation IDs together instead of issuing separate synchronous owner queries.
Keep the controller's retention rule and the owner's stale-permit validation.

Add a native admission/supersession regression and record the command-stage
measurements. Ordinary navigation admissions now use 10 owner calls instead of
14, reducing median command latency by 6.6–18.3% in three matched rounds while
remaining 0.24–0.39 ms behind pinned main.

Validation: root fmt, strict workspace Clippy, 1,443 adjacent tests and all
19,497 default-profile tests pass (13 configured skips, zero retries). CDP,
WebDriver and shared-page probes pass. Retain the Network burst capacity
failure: both parent and candidate close 4/10 bounded runs, with diagnostics
reaching the existing 1,536-observation transport limit. No capacity change or
claim of full Network burst acceptance is included.
2026-09-23 16:56:12 +08:00
ldm0 32b2658f3e refactor(protocol): remove the obsolete deferred document load pipeline 2026-09-23 06:31:56 +08:00
ldm0 f20c1ab6ac refactor(protocol): replace fallback document fixtures with native ownership 2026-09-23 05:53:37 +08:00
ldm0 8ecfaadba6 fix(devtools): keep renderer inspection independent of the browser queue 2026-09-23 05:30:15 +08:00
ldm0 d743043ab7 fix(network): keep native response output and cancellation runnable
Reuse the current native Document binding and existing Log cursors before
preparing live output. Remove the unused network-log forwarding method and
yield ready body pumps and collectors to their Context executor.

Preserve every physical chunk and the existing transport budgets. Add a
cancellation regression and a public 128 MiB burst/Log replay probe; retain
before/after evidence in the acceptance report.

Validation: fmt, strict workspace Clippy, 19,531 nextest passes (13 configured
skips), 48 CDP groups, 165 WebDriver cases, shared-page lifecycle, exact local
wire checks and three concurrent website rounds.
2026-09-23 02:49:57 +08:00
ldm0 7be1fd9b8c perf(browser): batch navigation observations and admission reads
Read navigation responses and commit metadata in one owner turn, and resolve
inherited request headers together. Reuse existing Context capabilities and
exact PageAgentHost sessions; remove unused background subscriptions and idle
followup dialog reads. Preserve physical handle validation and output budgets.

Gate the three delayed Worker cancellation fixtures on actual requests and
transport completion, retaining their semantic assertions and checking joins.

Validated with root fmt, strict workspace Clippy and nextest (19530 passed,
13 configured skips; 91 expected panic pairs unchanged), 60 cancellation runs,
48 CDP groups/536 scenarios, 165 WebDriver cases and shared-page lifecycle.
Pinned local comparisons reduce owner calls from ~18.8k to ~12k; the report
retains the remaining main-relative latency and concurrent Slack open items.
2026-09-23 01:58:17 +08:00
ldm0 30721b1a21 fix(runtime): resume native output after observer shutdown
Keep live Contexts and Page/Worker streams after their protocol transport
closes. Replacement observers start at the existing producer sequence and
receive native state; frozen output and cursor leases from the old observer
cannot cross into the new FIFO. Retired streams remain closed, initial binding
retains its replay contract, and transport budgets are unchanged.

Validate with fmt, strict workspace Clippy, 35 focused and 481 related tests
across three zero-retry iterations, and full nextest (19528 passed, 13
configured skips). Cover websocket owner restart, all Worker stream families,
ServiceWorker recovery without a Window, delayed output/fences and overload.
2026-09-22 23:21:34 +08:00
ldm0 9f339f418d refactor(runtime): settle native output and bound retained history
Settle native resource completion before publishing script results. Bound Page/Worker report histories, remove cumulative output projection and redundant owner queries, and observe native Document retirement. Add reproducible acceptance probes and record unresolved overload and performance limits.
2026-09-22 23:21:34 +08:00
ldm0 43503a0f5d refactor(protocol): finish native producer and command ownership boundaries
Stream remaining original loaders, synchronous XHR, manifest and popup resources with their real identities and metadata. Remove obsolete cross-layer ownership entries and preserve exact command routes for error replies.
2026-09-22 23:21:34 +08:00
ldm0 61d5fb5d4d refactor(network): share response decisions and controlled stream ownership
Unify pre-body response/authentication decisions across Window, Worker, XHR, navigation and controlled responses. Resume or cancel the original physical stream, release old challenges before retry, and preserve partial binary bodies and keepalive lifetime.
2026-09-22 23:21:33 +08:00
ldm0 9a772a23d9 refactor(network): unify Context execution for CSP, preflight and authentication
Replace the abandoned publication-flag migrations with the original request transfer and one ServiceWorker result channel. Preserve admitted bootstrap policy and publish physical CSP, preflight and final authentication phases without buffered auth-only branches.
2026-09-22 23:21:33 +08:00
ldm0 78d4158a01 refactor(worker): own main scripts and preflight transfers in Context
Route dedicated/shared/service main scripts and updates through Context-owned loads. Keep preflight identity and rejected response bodies through retirement and cancellation.
2026-09-22 23:21:33 +08:00
ldm0 869c3d07ae refactor(runtime): own Worker lanes and shared target publication
Own Worker service lanes and late binding, bound retained Worker output and remove redundant identity/event mirrors. Publish actual target creation and retirement to every frontend independently of command origin or discovery.
2026-09-22 23:21:33 +08:00
ldm0 258591383d refactor(worker): publish native fetch, XHR and script transfers
Move Worker fetch, synchronous/asynchronous XHR, script imports and CSP reports onto request-owned native transfers. Stream filtered responses and preserve cancellation, partial bodies, shared-cache consumers and retirement ordering.
2026-09-22 23:21:33 +08:00
ldm0 7138fafbc0 refactor(browser): commit native resource facts and Worker fetch decisions
Commit document, child and Worker network facts at BrowserOwner while retaining renderer FIFO and rejected responses. Recover Worker observation at readiness and bind fetch decisions and initial surfaces to native ownership.
2026-09-22 23:21:33 +08:00
ldm0 104f1a93d0 refactor(browser): own Worker lifecycles and inspection readiness
Admit dedicated, nested, shared and service Workers natively. Bind inspection at readiness, preserve bootstrap ordering and issue replay, and keep Runtime admission and failed navigation retirement tied to native state.
2026-09-22 23:21:33 +08:00
ldm0 5d26120f4e refactor(browser): drive lifecycle and navigation independently of observers
Publish native download, lifecycle, dialog and popup facts. Own initial and cross-document navigation execution and decisions; remove staged capabilities, caller-driven fallback and legacy navigation completion paths.
2026-09-22 23:21:33 +08:00
ldm0 eb450764bb refactor(protocol): share native Browser lifetime across frontends
Project Context, WebContents and Document occurrences across CDP, BiDi and Classic. Share the protocol owner, preserve navigation continuations across adapter turns, and join Worker/resource work at its native shutdown boundary.
2026-09-22 23:21:33 +08:00
ldm0 4300adeec3 refactor(browser): move physical state behind BrowserService handles
Bind document commands, resource work, Worker controls, downloads and retirement to exact native handles. Remove Context-wide mirrors and transfer physical ownership to the independent Core service.
2026-09-22 23:21:33 +08:00
ldm0 caec5956ad refactor(devtools): bind layered dispatch to sessions and projection fences
Make AgentHost dispatch and session ownership explicit. Gate commands on the committed Document projection instead of treating protocol completion as native navigation authority.
2026-09-22 23:21:33 +08:00
ldm0 aa6951109d refactor(browser): admit and commit native navigation transactions
Construct and commit initial and successor Documents through WebContents. Preserve exact cancellation, Context cache and loading policy across response preparation, authentication and interception, and retire failed attempts without destroying the current Document.
2026-09-22 23:21:33 +08:00
ldm0 20ef9d588e refactor(browser): own page collections, permissions and downloads
Move page selection, permissions and document refresh into Context ownership. Separate download policy and observation from execution and artifact lifetime.
2026-09-22 23:21:33 +08:00
ldm0 b1f44e9f98 refactor(devtools): separate inspection bindings from Page ownership
Route Runtime, DOM, CSS, accessibility and IO inspection through exact renderer bindings. Separate inspector replies and replay from Page caches, preserve session teardown isolation, and remove obsolete Page inspection entries.
2026-09-22 23:21:33 +08:00
ldm0 5fd3bbdb36 refactor(browser): own Context storage and effective page policies
Put Window, emulation, request, security and environment policy under Browser ownership. Own Context storage/runtime roots and inherited defaults while retaining per-session DevTools contributions.
2026-09-22 23:21:32 +08:00
ldm0 9ea7a84f00 refactor(browser): own WebContents, Document and navigation identities
Move document lifecycle, loaded state and navigation controllers under stable native WebContents identities. Keep protocol identifiers separate from Browser handles and constrain synthetic identities to tests.
2026-09-22 23:21:32 +08:00
lanyue-llk bcf420f622 revert: undo split PR 640 merges (#734-#740) 2026-09-22 20:02:07 +08:00
mini llk cba79021aa fix(document): parse text responses with consistent decoding (#740)
* fix(parser): preserve text document MIME and encoding semantics

* fix(document): share literal text parsing across child document paths

* fix(document): construct projection parser with the public API
2026-09-22 19:50:42 +08:00
mini llk 011e2268f2 fix(navigation): cancel loading without retiring the active document (#738) 2026-09-22 19:49:18 +08:00
mini llk 1be735d5c5 fix(network): preserve request metadata and response evidence (#737) 2026-09-22 19:45:58 +08:00
mini llk 50a4242b2e fix(input): preserve activation and navigation boundaries (#736) 2026-09-22 19:45:14 +08:00
mini llk c5ac254058 fix(layout): refresh geometry and preserve inline fragments (#735) 2026-09-22 19:42:55 +08:00
ldm0 52fd1d0953 feat(protocol): expose resource runtime storage diagnostics
Expose the canonical resource runtime snapshot alongside the existing runtime id and memory-cache fields. Add a CDP regression that verifies disk-pool allocation and parked-image memory accounting.
2026-09-21 16:47:19 +08:00
ldm0 29283fd86a fix(network): scope CDP header overrides and preserve BiDi byte values
Restore original headers on redirect while preserving current-hop overrides
for authentication retries and keeping Network event identity intact.

Preserve raw BiDi Cookie, Set-Cookie, and extra header values through page,
navigation, and worker policies. Apply CDP's last-value behavior for duplicate
request header names.

Add coverage for header bytes, redirects, authentication, and event sequences.
2026-09-21 05:37:28 +08:00
ldm0 932a7225ac refactor(network): preserve request header bytes across interception
Carry RequestHeaders through navigation, Fetch/XHR, workers, redirects and auth,
with explicit Unicode and ByteString conversions at protocol and WebIDL boundaries.
Share the raw curl header list with WebSocket transport and decode binary response
headers without UTF-8 replacement. Keep header memory charging concrete.

Cover opaque values, UTF-8 overrides, duplicates, redirect/auth continuation and
WebSocket handshakes with byte-level regression tests.
2026-09-21 03:54:12 +08:00
kevin 3560c85f4b Use CommonMark punctuation class and retain compatibility scenarios 2026-09-20 20:50:03 +08:00
kevin 0d91807041 Keep scroll test targets below every viewport 2026-09-20 20:50:03 +08:00
ldm0 3ae44b5150 fix(cdp): preserve navigation failure context at protocol boundaries
Render generic navigation failures with their complete anyhow context chain.
Keep blocked-URL error text canonical through an explicit typed policy cause,
and cover both serialized CDP output and an intercepted blocked navigation.

Replace the offline navigation cause's free-form error text with a typed kind
and a single protocol-text mapping. Keep these policy error types internal and
document that transport failures still use NetworkFetchFailureContext.

Update the unsupported authentication regression to expect preserved context
while retaining the assertion that no retry is issued.
2026-09-20 19:27:31 +08:00
ldm0 81663c6650 refactor(navigation): preserve errors through document loading 2026-09-20 19:27:31 +08:00
ldm0 5be3c7b644 refactor(cdp): preserve typed navigation network errors 2026-09-20 19:27:31 +08:00
ldm0 846b24119a fix(cdp): commit error documents for offline Fetch continuations 2026-09-20 14:15:47 +08:00
ldm0 4ed30be874 fix(fetch): distinguish request header bytes from UTF-8 strings 2026-09-20 14:03:33 +08:00
BibekPathak 8032606abf report offline navigations as network failures, not -32000 2026-09-20 10:54:25 +08:00
BibekPathak f3ef88f6dc fix(cdp): allow loopback navigations under offline emulation 2026-09-20 10:54:25 +08:00
ldm0 0b4c7b10f6 fix(layout): refresh geometry after screen and media changes 2026-09-18 14:29:05 +08:00
ldm0 b74061eb63 test: make worker and frame error checks deterministic
Consume child-frame navigation before the Runtime.enable helper clears
collected events, avoiding an event-ordering race in the Fetch test.

Use a local connection-drop server to trigger nested worker script load
failure, removing external DNS timing from the asynchronous error-event test.
Preserve the constructor, event type, message, and filename assertions and
verify that the fixture receives the expected child script request.
2026-09-18 12:43:03 +08:00
ldm0 b89f09f781 fix(editing): preserve surrogate pairs in text control actions
Normalize native edit endpoints to complete UTF-16 scalar boundaries while preserving selection API code-unit offsets. Cover keyboard deletion, movement, shifted selections, execCommand, and boundary no-ops.

Source: 4417abe223
2026-09-18 12:19:15 +08:00
ldm0 f3c87f394d fix(fetch): bypass interception for local blob and data URLs 2026-09-16 18:54:13 +08:00
ldm0 312b0ffc6b feat(emulation): support worker user agent overrides 2026-09-15 16:54:51 +08:00
ldm0 357dda18e7 fix(editing): enforce maxlength with UTF-16 text offsets
Apply maxlength to user text insertion, preserve complete surrogate pairs,
and keep selection and replacement offsets in UTF-16 units. Cover CDP
input, execCommand insertText, and setRangeText.
Keep keyboard movement and deletion, including execCommand deletion, on
complete surrogate-pair boundaries while exposing UTF-16 offsets.

Source: 3be5eb5e37
2026-09-15 15:35:38 +08:00
ldm0 4d110bd787 fix(emulation): report unsupported worker user agent overrides 2026-09-15 14:46:31 +08:00