Commit Graph
259 Commits
Author SHA1 Message Date
ldm0 78d859fd4c fix(cli): preserve HTTP error bodies after readiness 2026-08-23 01:36:22 +08:00
ldm0 2e1d36ac66 feat(renderer): allow lifecycle navigation fallback 2026-08-23 01:18:06 +08:00
ldm0 6f5aa320b2 Bump version to 1.0.3 v1.0.3 2026-08-22 20:00:01 +08:00
ldm0 f594c635ac test(cdp): pin classic scrollbar viewport 2026-08-22 19:44:54 +08:00
ldm0 d823999dc0 fix(renderer): fence screencast resource races
Split screenshot and screencast capture contracts, publish one shared visual resource generation, and collect CSS image references during the real layout traversal. Add asynchronous publication and multi-session screencast regressions.
2026-08-22 19:44:54 +08:00
ldm0 7608292c78 fix(renderer): stabilize style observations and screencast polling 2026-08-22 19:44:54 +08:00
ldm0 03a80259eb Reuse composite layout snapshots for iframe input 2026-08-22 19:44:54 +08:00
ldm0 e3d1accf53 Add nested iframe CDP input smoke 2026-08-22 19:44:54 +08:00
ldm0 a7223d4908 Split geometry scrolling from CSSOM metrics 2026-08-22 19:44:54 +08:00
ldm0 2e0140e53a Split geometry queries from hit testing and mock layout 2026-08-22 19:44:54 +08:00
ldm0 3f89e0109c Simplify iframe input and scroll routing 2026-08-22 19:44:54 +08:00
ldm0 4f39a0f0d9 Expand iframe and scrollbar input coverage 2026-08-22 19:44:54 +08:00
ldm0 f481bfa192 Fix transformed iframe input routing 2026-08-22 19:44:54 +08:00
ldm0 3a8e52ba99 Implement classic scrollbars 2026-08-22 19:44:54 +08:00
ldm0 43271abe7e docs(fetch): correct default timeout 2026-08-22 18:33:16 +08:00
Athul Nambiar 787fde9723 fix(encoding): rewrite meta-declared UTF-16 to UTF-8
A document whose only encoding declaration is `<meta charset="utf-16">`
was decoded as UTF-16, folding every byte pair into one CJK code point.
The damage was not confined to text: the tokenizer saw no markup either,
so `<title>` and `<p>` disappeared and the whole document collapsed into
a single text node inside `<body>`.

The prescan reaches a `meta` element only by reading ASCII-compatible
bytes, so a document it can see that declares UTF-16 has necessarily
mislabeled itself. The HTML Standard therefore rewrites the charset
before returning it:

    If charset is UTF-16BE/LE, then set charset to UTF-8.
    If charset is x-user-defined, then set charset to windows-1252.

Apply both rewrites in `moli-charset-parser`, which covers the
`meta charset` and the `http-equiv=content-type` paths at once. Keeping
them there rather than in `moli-encoding` leaves the two neighbouring
paths that legitimately select UTF-16 untouched: a UTF-16 BOM, and a
UTF-16 charset on the transport layer, which the encoding sniffing
algorithm takes with confidence certain and does not rewrite. Both are
now covered by regression tests, alongside the rewrites themselves and a
check that unrelated labels and labels outside the Encoding Standard are
still resolved exactly as before.

Verified on aarch64-darwin: `cargo test -p moli-charset-parser
-p moli-encoding` passes 55 tests, and `cargo fmt`/`cargo clippy
--all-targets` are clean for both crates.

Closes #152
2026-08-22 15:37:25 +08:00
ldm0 0c3a4068bf docs(playground): explain the ChatGPT login bridge 2026-08-22 15:22:06 +08:00
ldm0 37ddcd6952 feat(playground): persist ChatGPT login through Moli 2026-08-22 15:22:06 +08:00
ldm0 194698bd6a fix(playground): harden ChatGPT password form detection 2026-08-22 15:22:06 +08:00
ldm0 8441f9a7d8 feat(cli): split response waits into literal and regex modes 2026-08-22 03:20:24 +08:00
ldm0 ca4f01f6a2 refactor(fetch): drop unused wait criteria equality 2026-08-22 03:20:24 +08:00
ldm0 e7a8a709ef refactor(cli): encapsulate response body regex 2026-08-22 03:20:24 +08:00
ldm0 cba58e3aba refactor(fetch): name response body regex explicitly 2026-08-22 03:20:24 +08:00
ldm0 420cbdcf5d test(cli): cover response body regex end to end 2026-08-22 03:20:24 +08:00
ldm0 3212b02cac fix(renderer): bind WebStorage to receiver window 2026-08-22 03:15:32 +08:00
ldm0 97f72b88d6 test(protocol): select binding event by execution context 2026-08-22 02:08:32 +08:00
ldm0 b70555cb4a fix(renderer): keep child modulepreload from delaying load 2026-08-22 02:08:32 +08:00
ldm0 d0fdcf8fff fix(renderer): classify modulepreload admission by relation 2026-08-22 02:08:32 +08:00
ldm0 8d82acf953 fix(renderer): keep modulepreload from delaying load
Use a synchronous prepare/commit/apply boundary for connected stylesheet lifecycle authority, so DocumentRuntime no longer acquires it through raw ContextHost pointers. Keep modulepreload network fetches identity-only and publish terminal link events without a Document load-delay lease.
2026-08-22 02:08:32 +08:00
ldm0 494ed8356a feat(cli): add dcl wait alias 2026-08-21 22:14:32 +08:00
ldm0 6aa0f4818f fix(cli): trim ambiguous short flags 2026-08-21 22:14:32 +08:00
ldm0 baadb4f734 fix(cli): stop inferring subcommands from flags 2026-08-21 22:14:32 +08:00
ldm0 3b555523ab test(ci): run complete protocol smoke suites by default 2026-08-21 22:14:01 +08:00
ldm0 2fe9e2ad9a fix(devtools): preserve nested Main response order 2026-08-21 20:10:15 +08:00
BibekPathak cf78d14909 fix(cli): error on invalid --wait-response-body regex 2026-08-21 19:38:13 +08:00
ldm0 9454318cdd refactor(service-worker): bind work to exact run owners 2026-08-21 18:22:47 +08:00
ldm0 e5383caebf refactor(navigation): allocate opaque history identities 2026-08-21 18:22:47 +08:00
ldm0 ca91a5ed5d refactor: make transient identity allocation checked 2026-08-21 18:22:47 +08:00
ldm0 d5e41805f6 refactor(renderer): bind document task capabilities atomically 2026-08-21 18:22:47 +08:00
ldm0 69037ba0ae refactor(renderer): construct runtimes with document owners 2026-08-21 18:22:47 +08:00
Athul Nambiar 0370ade6c3 feat(cli): add short flags for common options
Every option except `--header` was long-form only, so ordinary invocations
carried a lot of typing and boolean flags could not be grouped.

Assign short flags to the options that appear most often, leaving the rest
long-form. `CommonArgs` is flattened into both subcommands, so each letter
has to be unique across the fetch union and the serve union rather than
within one struct:

  fetch   -d dump, -w wait-until, -s wait-selector, -t timeout,
          -n noscript, -H header (unchanged)
  serve   -p port, -t timeout
  common  -l layout, -r resource, -i image, -f font, -a audio, -v video,
          -m media, -T text-track, -c cookie-file, -P profile-dir,
          -A user-agent, -L log-level

The whole optional-resource family gets a letter so it clusters, which is
the shape the request asked for: `moli serve --layout --resource` is now
`moli serve -lr`, and `-ifavmT` selects every optional family.

`-P` rather than `-p` for `--profile-dir` keeps `-p` for the serve port.
`-A` for `--user-agent` follows curl. `-T` and `-L` are uppercase only
because `-t` and `-l` are taken. `--host` keeps no short so `-H` is not
overloaded, since it already means `--header` under fetch.

Two call sites match flags by literal string and needed the short
spellings as well, or they would have silently ignored them:

- `normalize_dump_flag`, so a bare `-d` still defaults to `html`;
- `FETCH_INFER_FLAGS` and `SERVE_INFER_FLAGS`, so `moli -d markdown URL`
  still infers the fetch subcommand. Each short is mirrored beside the
  long flag it aliases, so both spellings infer identically.

Guard the letters with `Cli::command().debug_assert()`, which is clap's
own duplicate-short check and runs over each subcommand's full union.

Fixes #121
2026-08-21 17:04:02 +08:00
allen b084022955 docs: add star history chart to the READMEs
Embeds the light/dark SVGs published by lexmount/moli-metrics, which
regenerates them hourly from the stargazer timeline and commits only when
the count actually changed. Added to all six language READMEs, using the
same <picture> theme-switching pattern as the existing benchmark charts.
2026-08-21 15:08:31 +08:00
ldm0 cb907cd5ac test(cdp): report smoke progress 2026-08-21 11:23:44 +08:00
ldm0 3ad7dfda80 refactor(renderer): make lifecycle document ids opaque 2026-08-21 11:23:44 +08:00
ldm0 9925bb12f3 refactor(renderer): identify document runtime incarnations exactly 2026-08-21 11:23:44 +08:00
ldm0 b6f798dfa9 refactor(renderer): bind document write loads to exact owners 2026-08-21 11:23:44 +08:00
ldm0 527b408ead refactor(renderer): guard module evaluation by document owner 2026-08-21 11:23:44 +08:00
ldm0 66fd45517c refactor(renderer): snapshot script execution by document owner 2026-08-21 11:23:44 +08:00
ldm0 80bb2e6509 refactor(renderer): coalesce continuations by document owner 2026-08-21 11:23:44 +08:00
ldm0 1a33394011 refactor(renderer): target module reactions by document owner 2026-08-21 11:23:44 +08:00