Commit Graph

5388 Commits

Author SHA1 Message Date
Muki Kiboigo
cd3e6b2364 ensure fs cache file is closed after use 2026-04-03 07:23:28 -07:00
Muki Kiboigo
557a4458a4 use CacheRequest instead of key 2026-04-03 07:23:28 -07:00
Muki Kiboigo
ce620e208d add striped lock to FsCache 2026-04-03 07:23:28 -07:00
Muki Kiboigo
2de35a9db2 use arena_pool for cache get 2026-04-03 07:23:28 -07:00
Muki Kiboigo
3eb05fdd1a use writer for fs cache body file 2026-04-03 07:23:28 -07:00
Muki Kiboigo
186fdee59b use json for fs cache metadata file 2026-04-03 07:23:28 -07:00
Muki Kiboigo
3c8bb5bc00 use sha256 instead of wyhash 2026-04-03 07:23:28 -07:00
Muki Kiboigo
66d190c047 store type_buf and sub_type_buf in Mime 2026-04-03 07:23:28 -07:00
Muki Kiboigo
5c2207ecc3 add more http caching rules 2026-04-03 07:23:27 -07:00
Muki Kiboigo
18d347e247 use CacheControl and Vary 2026-04-03 07:23:27 -07:00
Muki Kiboigo
29dfbbfdea cache headers along with response 2026-04-03 07:23:27 -07:00
Muki Kiboigo
02f611bbc8 add basic caching support 2026-04-03 07:23:27 -07:00
Muki Kiboigo
349d5a0a0b create cache owned by the network struct 2026-04-03 07:23:27 -07:00
Muki Kiboigo
647d989191 use enum approach instead of vtable 2026-04-03 07:23:27 -07:00
Muki Kiboigo
41a24623fa add basic FsCache impl 2026-04-03 07:23:27 -07:00
Muki Kiboigo
d9a3d912c0 add CachedResponse variant to Response 2026-04-03 07:23:26 -07:00
Muki Kiboigo
070baa8f46 add headerIterator to Http Response 2026-04-03 07:23:26 -07:00
Muki Kiboigo
4f78f299a3 use Response instead of Transfer in callbacks 2026-04-03 07:23:25 -07:00
Muki Kiboigo
9568c86326 allow Mime parse to use []const u8 2026-04-03 07:22:20 -07:00
Muki Kiboigo
6633b6effc add cache dir to configuration opts 2026-04-03 07:22:20 -07:00
Muki Kiboigo
2962864f3d create Cache interface file 2026-04-03 07:22:20 -07:00
Pierre Tachoire
749f21816c Merge pull request #2075 from lightpanda-io/e2e-integration-proxy
use proxy for integration tests
2026-04-03 14:23:10 +02:00
Pierre Tachoire
6bb8bc8391 ci: use proxy for integration tests 2026-04-03 09:24:17 +02:00
Karl Seguin
b6020e4770 Merge pull request #2066 from lightpanda-io/fix/agent-integration-and-mcp-cdp
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / wba-demo-scripts (push) Has been cancelled
e2e-test / wba-test (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
e2e-test / browser fetch (push) Has been cancelled
zig-test / zig fmt (push) Has been cancelled
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
mcp: improve navigation reliability and add CDP support
2026-04-03 08:27:55 +08:00
Karl Seguin
45f8f49bee Merge pull request #2074 from lightpanda-io/tao_in_identity_map
Store TAO in IdentityMap
2026-04-03 08:21:52 +08:00
Karl Seguin
494cc582fe Merge pull request #2073 from lightpanda-io/page-isSameOrigin
stricter Page.isSameOrigin
2026-04-03 07:39:30 +08:00
Karl Seguin
76db817089 Store TAO in IdentityMap
The object can be accessed from any context in the same origin, so the TAO
should exist for as long.
2026-04-03 07:34:52 +08:00
Karl Seguin
d2fb175d4f Merge pull request #2069 from lightpanda-io/finalizer_rc
Move finalizers to pure reference counting
2026-04-03 06:46:09 +08:00
Pierre Tachoire
082cd52b03 stricter Page.isSameOrigin
Page.isSameOrigin used to compare only the beginning of urls.
But origin https://origin.com must not match with
https://origin.com.attacker.com
2026-04-02 18:02:09 +02:00
Karl Seguin
476cf419f7 Merge pull request #2071 from lightpanda-io/abort_assertions
Relax assertion on httpclient abort
2026-04-02 22:50:41 +08:00
Adrià Arrufat
b29405749b server: handle CDPWaitResult.done instead of unreachable 2026-04-02 15:08:34 +02:00
Adrià Arrufat
62f58b4c12 browser: treat wait timeout as normal completion, not an error 2026-04-02 14:54:06 +02:00
Adrià Arrufat
69e5478dd7 browser: simplify Runner wait timeout logic 2026-04-02 14:15:15 +02:00
Karl Seguin
de0a04a58e Relax assertion on httpclient abort
It's ok to still have transfers, as long as whatever transfers still exists
are in an aborted state.
2026-04-02 17:59:17 +08:00
Karl Seguin
fec02850d4 Merge pull request #2068 from lightpanda-io/refactor/markdown-anchor-rendering
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / wba-demo-scripts (push) Has been cancelled
e2e-test / wba-test (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
e2e-test / browser fetch (push) Has been cancelled
zig-test / zig fmt (push) Has been cancelled
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
markdown: simplify and optimize anchor rendering
0.2.8
2026-04-02 17:06:26 +08:00
Karl Seguin
77b60cebb0 Move finalizers to pure reference counting
Takes https://github.com/lightpanda-io/browser/pull/2024 a step further and
changes all reference counting to be explicit.

Up until this point, finalizers_callback was seen as a fail-safe to make sure
that instances were released no matter what. It exists because v8 might never
call a finalizer, so we need to keep track of finalizables and finalize them
on behalf of v8. BUT, it was used as more than a fallback for v8...it allowed
us to be lazy and acquireRef's in Zig without a matching releaseRef (1), because
why not, the finalizer_callback will handle it.

This commit redefines finalizer_callbacks as strictly being a fallback for v8.
If v8 calls the finalizer, then the finalizer callback is removed (2) - we lose
our fail-safe. This means that every acquireRef must be matched with a
releaseRef. Everything is explicit now. The most obvious impact of this is
that on Page.deinit, we have to releaseRef every MO, IO and blob held by the
page.

This change removes a number of special-cases to deal with various ownership
patterns. For example, Iterators are now properly reference counted and when their
RC reaches 0, they can safely releaseRef on their list. This also elimites
use-after-free potential when 2 RC objects reference each other. This should
eliminate some WPT crashes (e.g. /editing/run/insertimage.html)

(1) - We were only ever lazy about releaseRef during shutdown, so this change
won't result in more aggressive collection.

(2) Since 1 object can be referenced from 0-N IsolatedWorlds, it would be more
accurate to say that the finalizer callback is removed when all referencing
IsolatedWorld finalize it.
2026-04-02 17:04:33 +08:00
Adrià Arrufat
71ac2e8c7f markdown: simplify and optimize anchor rendering 2026-04-02 09:11:26 +02:00
Adrià Arrufat
1770dc03e3 refactor: move timeout and busy logic to Runner 2026-04-02 08:06:50 +02:00
Karl Seguin
38fa9602fa Merge pull request #2067 from lightpanda-io/percent-encode-version
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / wba-demo-scripts (push) Has been cancelled
e2e-test / wba-test (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
e2e-test / browser fetch (push) Has been cancelled
zig-test / zig fmt (push) Has been cancelled
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
wpt / zig build release (push) Has been cancelled
wpt / build wpt runner (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
e2e-integration-test / zig build release (push) Has been cancelled
e2e-integration-test / demo-integration-scripts (push) Has been cancelled
percent encode version query string for crash report
2026-04-02 07:50:31 +08:00
Pierre Tachoire
9661204c8d percent encode version query string for crash report 2026-04-01 22:15:56 +02:00
Karl Seguin
6800e53b0e Merge pull request #2014 from lightpanda-io/build-check
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / wba-demo-scripts (push) Has been cancelled
e2e-test / wba-test (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
e2e-test / browser fetch (push) Has been cancelled
zig-test / zig fmt (push) Has been cancelled
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
build: add check step to verify compilation
2026-04-01 21:05:04 +08:00
Adrià Arrufat
1854627b69 mcp: final protocol cleanup after removing screenshot tool
- Removed unused ImageContent from protocol.
- Simplified CallToolResult back to only support TextContent.
- Cleaned up CallToolResult usages in tools.zig.
2026-04-01 15:00:55 +02:00
Adrià Arrufat
fffa8b6d4b mcp/cdp: fix inactivity timeout
- Fixed CDP inactivity timeout by resetting it when the browser is busy (loading or executing macrotasks).
- Removed the placeholder screenshot tool.
- Refactored MCP tool schemas to constants to avoid duplication.
2026-04-01 14:37:40 +02:00
Nikolay Govorov
e79da3a4ad Merge pull request #2064 from lightpanda-io/network_naming
Improve network naming consistency
2026-04-01 13:10:12 +01:00
Karl Seguin
145792c4f5 Merge pull request #2061 from lightpanda-io/ariaAtomic
Add Element.ariaAtomic and Element.ariaLive properties
2026-04-01 20:06:15 +08:00
Karl Seguin
0bb3e3827d Merge pull request #2060 from lightpanda-io/HTMLAnchorElement.rel
Add HTMLAnchorElement.rel property
2026-04-01 20:04:43 +08:00
Karl Seguin
6e6e6e6fad Merge pull request #2057 from lightpanda-io/element-title
Add HTMLElement.title property
2026-04-01 19:36:12 +08:00
Karl Seguin
9d13a7ccdb Merge pull request #2065 from lightpanda-io/browser/resolve-scheme-in-path
Browser/resolve scheme in path
2026-04-01 19:30:40 +08:00
Karl Seguin
7fcaa500d8 Fix typo in variable name
protect against overflow if path stats with ':'

Minor tweaks to https://github.com/lightpanda-io/browser/pull/2046
2026-04-01 19:20:55 +08:00
Karl Seguin
0604056f76 Improve network naming consistency
1.
Runtime.zig -> Network.zig (especially since most places imported it as
`const Network = @import("Runtime.zig")`

2.
const net_http = @import(...) -> const http = @import(...)
2026-04-01 18:46:03 +08:00