Commit Graph
9939 Commits
Author SHA1 Message Date
Adrià Arrufat 1a4bb5294d Ignore a .lp-cache symlink, not just a directory
A fresh worktree has no V8 cache, and the way to avoid a 10-minute
rebuild is to symlink `.lp-cache` at the main checkout's. `/.lp-cache/`
matches only a directory, so that symlink shows up as untracked and a
`git add -A` stages it -- an absolute path that dangles anywhere else,
and one `build.zig` picks up when present.
2026-09-30 11:11:39 +02:00
Adrià Arrufat 5d4bc20ae2 Merge pull request #3691 from lightpanda-io/goto-reports-status
tools: report the HTTP status of a navigation
2026-09-30 10:18:41 +02:00
Adrià Arrufat 1b589cab0e tools: don't cast an out-of-range status into std.http.Status
`navStatus` cast the frame's status straight into `std.http.Status`, which is an
enum(u10). `_http_status` is a u16 and `http.getResponseCode` clamps only to that
width, so a server answering `HTTP/1.1 9999 Foo` reached `@enumFromInt(9999)`:
illegal behaviour, and a `thread panic: invalid enum value` in debug. A remote
server picks the input, and the function exists to describe exactly the responses
most likely to be malformed.

Codes above 599 skip the cast and report their number, which is what `phrase()`
would have given them anyway. The test carries the 9999 case.

The same cast from the same source predates this branch in
cdp/domains/network.zig, which is where the pattern was copied from. Left alone
here: different code path, different owner.
2026-09-30 10:07:19 +02:00
Adrià Arrufat 01380113e6 tools: report the HTTP status of a navigation
`goto` answered "Navigated successfully." for a 403 and a 404 exactly as for a
200, so an agent had no way to tell it was reading an error page and would
happily treat it as content. The status was never missing, only unreachable:
`Frame.httpMetadata` has carried it all along and its one consumer is the
`fetch` CLI path, while `execGetUrl` returns the url alone.

`navStatus` formats it as `403 Forbidden` using `std.http.Status.phrase`, which
`cdp/domains/network.zig` already does for the same job, so there is no phrase
table here. A code std has no phrase for still reports its number.

Used in the three places a navigation outcome is reported: `goto`'s own result,
the suffix a read picks up when an action navigated, and the action result that
names the page url and title. All three named the url and the title and left out
the one fact that says whether either is worth anything.

    Navigated successfully. HTTP 200 OK.
    Navigated successfully. HTTP 404 Not Found.
    Navigated successfully. HTTP 403 Forbidden.

The goto test pinned the old string; it pins the new one, and `navStatus` has
its own covering no-response, a phrased code and an unphrased one.
2026-09-30 08:42:25 +02:00
Karl Seguin b2ba78a196 Merge pull request #3673 from lightpanda-io/type-error-response-shared-buffer
webapi: typeerror on XHR send SharedArrayBuffer
2026-09-30 12:32:01 +08:00
Karl Seguin 1957ec9fbe webapi: typeerror on XHR send SharedArrayBuffer
Depends on: https://github.com/lightpanda-io/zig-v8-fork/pull/214

WPT for /xhr/send-data-sharedarraybuffer.any.html

js.BufferSource (only used in this case), now gives TypeError when the
underlying source is a SharedBuffer.
2026-09-30 11:57:27 +08:00
Karl Seguin d850e0d261 Merge pull request #3676 from lightpanda-io/update-v8
v8: update to latest stable release 15.5.35.13
2026-09-30 11:52:47 +08:00
Karl Seguin a86db8255f update orderfile 2026-09-30 11:24:06 +08:00
Karl Seguin bad259a51f update v8 2026-09-30 11:23:47 +08:00
Karl Seguin 4c8e2f20bf v8: update to latest stable release 15.5.35.13
Depends on https://github.com/lightpanda-io/zig-v8-fork/pull/215 and
https://github.com/lightpanda-io/pkg/pull/3
2026-09-30 11:23:47 +08:00
Karl Seguin e774f9bba8 Merge pull request #3687 from lightpanda-io/orderfile-regen
orderfile: regenerate the hot-code profile
2026-09-30 09:39:29 +08:00
github-actions[bot] efb3e02b6b orderfile: regenerate the hot-code profile
hot set 15116KB resident at 4KB fault-around: 21628 text, 22869 rodata symbols
2026-09-30 01:09:09 +00:00
Karl Seguin 7d558af4f3 Merge pull request #3685 from staylor/fix/image-natural-dimensions
Report natural dimensions for fetched images
2026-09-30 08:06:16 +08:00
Karl Seguin d6de5fee8e Merge headers_only and headers_only_prefix_bytes into a single optional
`partial: ?u32 = null` is now the tristate to capture (1) load everything (null)
(2) load no body (0) and  (3) load N body (N).

partial responses are NOT sent to CDP - the data can be garbage.

read orientation of jpeg and swap height/width as needed
2026-09-30 07:34:38 +08:00
Karl Seguin 11d085891b Merge pull request #3681 from lightpanda-io/log-levels
ops: downgrade many warn/err logs -> debug
2026-09-30 07:34:30 +08:00
Karl Seguin 7d812cea2e Downgrade ExecutionTerminated to debug
Detect closed peer so that subsequent sends don't keep trying and failing
2026-09-30 07:07:05 +08:00
Karl Seguin 5eaebc9235 ops: downgrade many warn/err logs -> debug
Meant to be merged alongside https://github.com/lightpanda-io/browser/pull/3680
but split up to make it easier to review.

317 of the 554 warn/err are now debug. Many of these are events that might be
interesting to a lightpanda browser developer, but not so much an end-user (
end-users might still care about some of these, but more likely in the aggregate
via metrics).

The ultimate goal is to make --log-level warn a useful default.

(this also tweaks how the page meta data is displayed in the pretty logs)
2026-09-30 07:07:04 +08:00
Karl Seguin ef675bcf0b Merge pull request #3680 from lightpanda-io/page-context-logs
ops: Introduce Page Context logs
2026-09-30 07:02:40 +08:00
Karl Seguin 55d06d87e6 Merge pull request #3682 from lightpanda-io/ignore-invalid-mime
http: CDP ignore invalid content-type message
2026-09-30 07:02:26 +08:00
Karl Seguin e8f7a16db3 Merge pull request #3679 from lightpanda-io/update-pcre
update pcre to latest release (10.48 -> 10.49)
2026-09-30 07:02:11 +08:00
Karl Seguin e9da22ec99 Merge pull request #3674 from lightpanda-io/public-suffix-list
chore: generated public suffix list
2026-09-30 07:01:48 +08:00
Scott Taylor 009225ace1 Report natural dimensions of fetched images from a bounded header prefix 2026-09-29 14:43:46 -04:00
Karl Seguin 425e28a501 Merge pull request #3678 from lightpanda-io/update-boringssl
update boringssl to latest release (0.20260813.0)
2026-09-29 18:34:29 +08:00
Karl Seguin 997c9d2caf Merge pull request #3677 from lightpanda-io/update-nghttp2
update nghttp2 1.69.0 -> 1.70.0
2026-09-29 18:34:16 +08:00
Karl Seguin 68ff1a4322 http: CDP ignore invalid content-type message
Saw a site return "Content-Type: charset=UTF-8;charset=UTF-8" on scrape. Not a
valid header and it correctly fails to parse. Except...CDP fails to RI on these
since it tries to parse and bubbles. Safe to swallow this error here and
continue with the response serialization.
2026-09-29 15:46:55 +08:00
Karl Seguin d8586751d0 ops: Introduce Page Context logs
Ultimate goal is to improve the logging to be more useful by:
1 - identifying the page being navigating
2 - downgrading most page-loading errors to debug
3 - provide page statistics (in logs, via cdp).

So, the logs would look something like:

```
info page-navigate page=3392 url=https://.....
debug urlblocked page=3392
debug timeout page=3392 url=script.js
info page-done page=3392 url=https://....
```

The log level for page-done will be  the @max() of any log level for that page
so that if you run --log-level warn, and you get:

```
info page-navigate page=3392 url=https://... <-- filtered out
debug timeout page=3392 url=script.js <--filtered out
warn unknown module lookup page=3392 identifier=blah.js
warn page-done page=3392 url=https://....
```

So that any page event can be linked to the top leveL URL, while still
respecting the --log-level.

This first parts adds the log-level page context, and the thread local
variable.
2026-09-29 12:17:39 +08:00
Karl Seguin 0609111fd0 update pcre to latest release (10.48 -> 10.49) 2026-09-29 11:27:42 +08:00
Karl Seguin 78015e7d70 update boringssl to latest release (0.20260813.0) 2026-09-29 11:26:03 +08:00
Karl Seguin 9fd6afc08c update nghttp2 1.69.0 -> 1.70.0 2026-09-29 11:18:04 +08:00
Karl Seguin f086b75d54 Merge pull request #3675 from lightpanda-io/orderfile-regen
orderfile: regenerate the hot-code profile
2026-09-29 09:30:52 +08:00
github-actions[bot] 4148c9b0a7 orderfile: regenerate the hot-code profile
hot set 16964KB resident at 4KB fault-around: 21622 text, 22522 rodata symbols
2026-09-29 01:14:22 +00:00
Karl Seguin a3455967ce Merge pull request #3644 from lightpanda-io/headers-on-sync-xhr
Add headers to SyncRequest Path
2026-09-29 08:56:23 +08:00
Karl Seguin 1765de7244 chore: generated public suffix list 2026-09-29 08:49:52 +08:00
Karl Seguin 1dbf03e088 don't get arena if it isn't needed 2026-09-29 08:34:41 +08:00
Muki Kiboigo a23da281f4 update comment about arena in SyncContext 2026-09-29 07:49:07 +08:00
Muki Kiboigo 7d2dfef5c2 add test for sync XHR headers check 2026-09-29 07:49:07 +08:00
Muki Kiboigo 93ef6eb7bf move body ensure capacity before optional header copy 2026-09-29 07:49:07 +08:00
Muki Kiboigo 1dfd8ef89e use std.mem.eql in XHR header checking 2026-09-29 07:49:07 +08:00
Muki Kiboigo f786c18055 include header copy option to sync requests 2026-09-29 07:49:07 +08:00
Muki Kiboigo b7c17c9cb4 add headers to SyncResponse and XHR 2026-09-29 07:49:05 +08:00
Karl Seguin b74c20d1a7 Merge pull request #3614 from lightpanda-io/viewport-scroll-extent
Give the document a height and clamp the viewport scroll to it
2026-09-29 07:10:01 +08:00
Karl Seguin 5932638baf Merge pull request #3671 from lightpanda-io/status-text
webapi: xhr/fetch report status reason from server
2026-09-28 22:43:27 +08:00
Karl Seguin 1cab72edcd Merge pull request #3670 from lightpanda-io/default-sanitizer
mem: remove allocation for default sanitizer
2026-09-28 22:43:15 +08:00
Adrià Arrufat e7cb1779b1 Merge pull request #3637 from mvanhorn/fix/2529-android-termux-binary-limitation
docs: explain Android and Termux binary incompatibility
2026-09-28 15:08:57 +02:00
Pierre Tachoire f6dd43c346 Merge pull request #3654 from lightpanda-io/cors-by-default
Enable CORS by default
2026-09-28 14:32:49 +02:00
Pierre Tachoire be65962d68 testing: remove unused func 2026-09-28 14:04:11 +02:00
Pierre Tachoire 5789e1fc23 README: remove --experimental-features cors 2026-09-28 14:03:39 +02:00
Adrià Arrufat 45a74e567f Only inline heights extend the document
Resolving the cascade for every element on each mutation made an
append + scrollHeight read up to 12x slower. Virtualizers set their
spacer height inline.
2026-09-28 13:25:09 +02:00
Karl Seguin f7fbc2f34f webapi: xhr/fetch report status reason from server
If the server gives a status reason, report it as-is. Only default to the
zig code->reason map when one isn't given.

Also, don't force a 407 status code when auth_challenge is present.
2026-09-28 19:01:39 +08:00
Pierre Tachoire cebd8e3690 cors: fix unit tests when enabling cors by default 2026-09-28 12:23:29 +02:00