Commit Graph
9850 Commits
Author SHA1 Message Date
Karl Seguin 58622ef7c4 Merge pull request #3571 from lightpanda-io/nikneym/playwright-id-track
`cdp`: answer inspector commands on the session that sent them
2026-09-28 12:36:44 +08:00
Karl Seguin e79c85a587 Merge pull request #3653 from staylor/fix/stylesheet-important-cascade
Honor !important when cascading tracked stylesheet properties
2026-09-28 12:23:02 +08:00
Karl Seguin 9aa748616b Simplify Inspector.Session ownership
Since AttachedSession is already heap-based, it's inspector_session is at a
fixed address and thus can own the session.

Also, hook in some noop callbacks on deinit.
2026-09-28 12:18:33 +08:00
Karl Seguin 46d16e229e Store !important as priority
Encode the !important'ness of a rule into its priority (we have the bit to
spare). This keeps the !important calculation the build-side, not the read side
and is more consistent with how the StyleManager generally works.

CSSStyleDeclaration `getPropertyValue` is now !important aware. Whereas before
an inline value would always win, it now cedes to an !important stylesheet rule
2026-09-28 11:55:34 +08:00
Karl Seguin ce46f90f1c Merge pull request #3657 from onnimonni/fix/input-select-email
webapi: input select() must not throw for email/number
2026-09-28 10:35:38 +08:00
Karl Seguin a9738c7df5 Merge pull request #3660 from lightpanda-io/nikneym/iframe-set-sandbox
`iframe`: add sandbox setter
2026-09-28 09:55:04 +08:00
Karl Seguin a844e38826 preserve correctsendKeys() behavior for webdriver 2026-09-28 09:49:13 +08:00
Karl Seguin 38e8957639 Merge pull request #3665 from lightpanda-io/orderfile-regen
orderfile: regenerate the hot-code profile
2026-09-28 09:18:46 +08:00
github-actions[bot] d0c8a24334 orderfile: regenerate the hot-code profile
hot set 16948KB resident at 4KB fault-around: 21493 text, 22328 rodata symbols
2026-09-28 01:08:30 +00:00
Karl Seguin 389c0826e9 Merge pull request #3642 from lightpanda-io/click-wait-networkidle
tools: wait for networkidle after an action-triggered navigation
2026-09-28 08:00:36 +08:00
Karl Seguin 111fd35258 have httpclient own idle time 2026-09-28 07:33:06 +08:00
Karl Seguin 895b967259 Merge pull request #3629 from lightpanda-io/nikneym/text-encoder-encode-into
`TextEncoder`: add `encodeInto`
2026-09-28 07:07:17 +08:00
Karl Seguin 8a31f29b8a Merge pull request #3634 from lightpanda-io/v8-wakeup
perf: v8 task wakeup
2026-09-28 07:07:02 +08:00
Karl Seguin 831af0ca37 cleanup code, re-use new helper 2026-09-28 06:46:27 +08:00
Karl Seguin 52cb8cf47b disable poll (0) if there's a foreground task 2026-09-28 06:36:30 +08:00
nikneym 8ede89217a cdp: update tests 2026-09-28 01:29:12 +03:00
nikneym 56cb4205ae cdp: sessions own their inspector session
`Inspector` now supports several sessions; `startSession` allocates one (the V8 channel keeps its address) and `stopSession` frees it. They all connect to the same context group so every session see every context.

`BrowserContext.session_id` stays the primary session's id for the many event call sites.
2026-09-28 01:27:40 +03:00
nikneym 736be5b35b cdp: answer inspector commands on the session that sent them
Playwright's `browserContext.newCDPSession` must get its response on that session, not the primary one. Playwright keys its pending callbacks by session, finds none for that id, and throws
"Assertion error", which takes the whole process down.

Addresses #1838 and #1839.
2026-09-27 23:43:10 +03:00
nikneym 395550488a iframe: add sandbox setter 2026-09-27 14:45:47 +03:00
Onni Hakala 54b61fbc1e webapi: input select() must not throw for email/number
select() delegated to setSelectionRange(), which throws InvalidStateError
for input types where the selection API doesn't apply (email, number,
date, ...). Per spec select() never throws.

email and number still have selectable text, so they now keep the
internal selection/caret: select() + Input.insertText replaces the
value like Chrome. This is what Playwright's locator.fill() does, which
failed with 'locator.fill: undefined' on type=email.
2026-09-27 13:39:15 +03:00
nikneym 690adc28a8 TextEncoder: add encodeInto
Also reworks `TextEncoder#encode` to use `v8__String__WriteUtf8`.
2026-09-27 13:15:30 +03:00
Scott Taylor 5b1bb1bc78 Respect important declarations in tracked CSS cascade 2026-09-26 23:55:06 -04:00
Karl Seguin 6cd05967ed Merge pull request #3652 from lightpanda-io/orderfile-regen
orderfile: regenerate the hot-code profile
2026-09-27 09:36:51 +08:00
github-actions[bot] baea3fc12b orderfile: regenerate the hot-code profile
hot set 16928KB resident at 4KB fault-around: 21514 text, 22326 rodata symbols
2026-09-27 01:10:20 +00:00
Karl Seguin d69b5418db Merge pull request #3650 from lightpanda-io/cli-error-ergonomics
cli: report usage errors once, accept -h, show tips only on a terminal
2026-09-27 08:06:03 +08:00
Karl Seguin 162e73e1c1 log command on failed sniff 2026-09-27 07:23:20 +08:00
Karl Seguin 727724bf85 Merge pull request #3646 from lightpanda-io/same-page-reload
Don't skip navigation when page isn't loaded (or had error loading)
2026-09-27 07:12:40 +08:00
Adrià Arrufat 9c55b6040a Merge pull request #3651 from lightpanda-io/drop-orcarouter
agent: drop the OrcaRouter provider
2026-09-27 00:10:57 +02:00
Adrià Arrufat a6df7b04d0 agent: drop the OrcaRouter provider
zenai no longer ships the OrcaRouter preset. It still works as an
OpenAI-compatible endpoint via OPENAI_BASE_URL + OPENAI_API_KEY.
2026-09-26 23:58:30 +02:00
Adrià Arrufat 1f582d4674 cli: report usage errors once, accept -h, show tips only on a terminal
A flag given without its value, or an extra positional, failed with
only `FATAL exit err=MissingArgument`, not naming the flag. The parser
now logs which flag is missing its value or which argument is extra,
with a hint pointing at the command's help, and a missing fetch URL is
caught while parsing, next to run's missing script. Since each of these
is logged where it's found, main exits without the generic `exit` line.

`-h` works wherever `--help` does, instead of being taken as a URL.

The --obey-robots tip is for a person at a terminal, so it's skipped
when stderr isn't one; scripts capturing stderr no longer get it on
every run.
2026-09-26 23:52:34 +02:00
Adrià Arrufat 1068e8893d runner: use activity.total() after the merge with main
d77c6fb1c dropped the total_network_activity local.
2026-09-26 22:17:07 +02:00
Adrià Arrufat 0e98f7accc Merge remote-tracking branch 'origin/main' into click-wait-networkidle 2026-09-26 22:16:33 +02:00
Adrià Arrufat bf0d69f33b runner: hold networkidle on live activity, not the CDP latch
The .networkidle/.networkalmostidle wait conditions read
Frame._notified_network_idle, the one-shot latch behind CDP's lifecycle
event. Once a frame has been idle it stays .done, so waiting on it after
an action that loads a popup or navigates an iframe resolved at once.

Track instead, per Runner, how long the network has been idle and meet
the condition once that has held for 500ms. The frame latch stays for
the CDP events.
2026-09-26 21:48:32 +02:00
Adrià Arrufat b9d8b39c68 Test that a same-url read re-navigates after a failed navigation
The failed frame's url already matches, so markdown/tree with that url
used to return the error placeholder page instead of navigating again.
2026-09-26 21:36:11 +02:00
Karl Seguin 81278de250 Don't skip navigation when page isn't loaded (or had error loading) 2026-09-26 07:52:19 +08:00
Karl Seguin 64b14b23e6 Merge pull request #3639 from lightpanda-io/goto-pending-connection
Don't resolve a navigation queued on a free connection as loaded
2026-09-26 07:21:44 +08:00
Karl Seguin 989ad39a47 Merge pull request #3628 from lightpanda-io/iterative-axnode
mem: AXNode tree/query walks iterative, isIgnore linear
2026-09-26 06:12:45 +08:00
Karl Seguin e4e95cf3cb Merge pull request #3627 from lightpanda-io/recycling-allocator
mem: replace slab allocator
2026-09-26 06:06:39 +08:00
Adrià Arrufat b2fb908e06 tools: wait for networkidle after an action-triggered navigation
`.done` waits for full quiescence, which a page running ads or polling
never reaches, so every navigating click ran its 10s budget out and gave
up. On hostelworld.com one click cost 10,141ms against 2,705ms waiting
for networkidle, with both producing an identical page: same URL, same
5023 nodes, same 2403 characters of text.

The same navigation issued as a `goto` costs 1.2-2.2s, because `goto`
defaults to `load`. `load` alone is not enough for a caller that reads
the DOM next, though: on that page it yields 961 nodes against
networkidle's 5023.

Closes #3641
2026-09-25 16:29:51 +02:00
Pierre Tachoire 6f18cfcae7 Merge pull request #3632 from lightpanda-io/robots-log-level
ops: downgrade error.RobotsBlocked to warn (from err)
2026-09-25 15:17:22 +02:00
Adrià Arrufat d77c6fb1ca Don't resolve a navigation queued on a free connection as loaded
The easy-handle pool is shared by every client in the process. When other
sessions hold all of it, a new navigation's request sits in pending_queue,
but Runner resolved a frame still in `.pre` as soon as in-flight activity
was zero, which ignores pending transfers. goto then reported success on
an empty document.

Wait on `activity.idle()` instead, and make a goto that times out before
any response arrives a NavigationTimeout error rather than a soft timeout.

Fixes #3636
2026-09-25 15:17:19 +02:00
Adrià Arrufat 8702e06167 Merge pull request #3630 from lightpanda-io/prompt-audit-cleanup
agent: drop dated prompt patterns, bump zenai
2026-09-25 11:35:59 +02:00
Adrià Arrufat efc239bbe8 Merge pull request #3613 from lightpanda-io/scroll-text-extent
Measure wrapped text in an element's content height
2026-09-25 11:20:28 +02:00
Adrià Arrufat ec31d4b711 Merge branch 'main' into prompt-audit-cleanup
# Conflicts:
#	build.zig.zon
#	src/browser/tools.zig
2026-09-25 11:13:12 +02:00
Adrià Arrufat 3ba2a5fffa Merge pull request #3597 from lightpanda-io/agent-fixes
Agent and tool-layer fixes found by a decision-model loop
2026-09-25 10:58:32 +02:00
Adrià Arrufat b5896c259b Merge branch 'main' into agent-fixes
# Conflicts:
#	build.zig.zon
#	src/SemanticTree.zig
2026-09-25 10:44:05 +02:00
Karl Seguin 43d384d676 perf: v8 task wakeup
This is a cleaner implementation of https://github.com/lightpanda-io/browser/pull/3615
which allows a Foreground task posted to v8 to wake up the HttpClient from a
poll
2026-09-25 12:14:32 +08:00
Karl Seguin 3d74a90f71 Merge pull request #3633 from lightpanda-io/v8-string-writeutf8
v8: update for changes to v8__String__WriteUtf8
2026-09-25 12:11:42 +08:00
Karl Seguin db98e85ce3 v8: update for changes to v8__String__WriteUtf8
https://github.com/lightpanda-io/zig-v8-fork/pull/211
2026-09-25 11:52:42 +08:00
Karl Seguin 42e593e49f remove unused deinit 2026-09-25 10:53:13 +08:00