Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d529088b6b | |||
| d71fed68b9 | |||
| b8d6f9005f | |||
| cbac35495c | |||
| 6e4aa702e0 | |||
| beb2036450 | |||
| 19986d4ead | |||
| 4365908d4c | |||
| aa9a26dae1 | |||
| 9c948ac09e | |||
| d35837743a | |||
| 41eb7d4c8f | |||
| b022d5db50 | |||
| 46d1021313 | |||
| 2adde5fa05 | |||
| e258b5b120 | |||
| 8386b32064 | |||
| 583a92b854 | |||
| bf29afb90f | |||
| 2f53bdec8f | |||
| 09233cdaf3 | |||
| 60ebf49ca8 | |||
| 76da07f3fd | |||
| 59e4d38c04 | |||
| 9b7ea2b255 | |||
| 441d278869 | |||
| d33c5619a3 | |||
| 0806611cae | |||
| 9aa2ab9214 | |||
| bf624418af | |||
| ec050ca9ab | |||
| 340c034be5 | |||
| 28efd283e5 | |||
| 84407da261 | |||
| d967f2a539 | |||
| 690ae3b99d | |||
| f90134bda6 | |||
| 4353f280f8 | |||
| 25f7fd2b42 | |||
| 280a498dff | |||
| 0ca23d598f | |||
| b458a6d9bc | |||
| 1f9d3c9c3e | |||
| bfc6e4fae0 | |||
| 2c7687693f | |||
| fefc1be75d | |||
| 8bc7e4244f | |||
| 5dbdf93d42 | |||
| efe381575d | |||
| 36644310c7 | |||
| 38fd033745 | |||
| 4153c5a851 | |||
| 5cb1443625 | |||
| a40b33d9ff | |||
| 0478385bcb | |||
| 3ffe0cbebd | |||
| 2e96dbca06 | |||
| ab158f512e | |||
| e12d9ee9af | |||
| 070227847a | |||
| cc42e1bde6 | |||
| f63ddf8da1 | |||
| 8df37bafa1 | |||
| bb1c1a5ed7 | |||
| e434bd260d | |||
| 72709e07b9 | |||
| e2f1fa4fdf | |||
| ffc22e911f | |||
| b7d1dbcc2f | |||
| 4eeb72a25a | |||
| bff018bcfc | |||
| 6c748ba7b0 | |||
| 02929e2f8d | |||
| 043987a634 | |||
| 63b39d7b7e | |||
| b6a5a21481 | |||
| c2e8a70108 | |||
| cbc8ef20b0 | |||
| a29a7bf52c | |||
| 77231391db | |||
| baa3b7f896 | |||
| 8b11e5d10e | |||
| aabbd00a5e | |||
| 10bb7f04fb | |||
| ac5eeefbd6 | |||
| 84d6423a94 | |||
| 3e03d333f1 | |||
| 997f15a683 | |||
| 80977fa836 | |||
| 2fad886551 | |||
| 61b45b8159 | |||
| 92210485a4 |
5264 changed files with 19535 additions and 499135 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
target/
|
||||
releases/
|
||||
/releases/
|
||||
*.log
|
||||
/dist
|
||||
|
|
|
|||
40
CLAUDE.md
40
CLAUDE.md
|
|
@ -1,6 +1,6 @@
|
|||
# Nacre
|
||||
|
||||
Nacre is a web browser written from scratch in Rust on the Servo 0.7 engine, with an egui UI, meant to replace the Python/QtWebEngine Nacre as the user's daily browser. Final deliverable: Linux (AppImage, tar.gz) and Windows (Inno Setup installer, portable zip) builds of the browser, published through the `releases/` folder to the user's Forgejo (astar76/Nacre). Vision: [PLAN.md](PLAN.md).
|
||||
Nacre is a web browser written from scratch in Rust with an egui UI, **on a tuned WebKitGTK 6.0 in a GTK 4 host (D-032; Linux only; Servo was removed in S053)**, meant to replace the Python/QtWebEngine Nacre as the user's daily browser. Final deliverable: Linux (AppImage, tar.gz) builds of the browser, published through the `releases/` folder to the user's Forgejo (astar76/Nacre). Vision: [PLAN.md](PLAN.md).
|
||||
|
||||
## 0. Session rules — read first
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ Nacre is a web browser written from scratch in Rust on the Servo 0.7 engine, wit
|
|||
5. **Invent nothing**: check the code/docs; if a fact is still missing, ask — the **orchestrator** if you were started by one (never the user directly), otherwise the user.
|
||||
6. **End of session**: (a) end criteria verified **by commands**, not memory; (b) `docs/PROGRESS.md` entry (≤ 15 lines: done, not done, later); (c) `docs/DECISIONS.md` if a decision binds later plans; (d) tick your line in `Plans/INDEX.md` (no commentary); (e) commit `SNNN: …` and push to `origin`; (f) short report: done, not done, what the user/orchestrator must do, and any instruction that cost more than it gave.
|
||||
7. **Languages**: answer in English. Code, comments and docs in English. Internal docs (`CLAUDE.md`, `Plans/`, `PROGRESS.md`) in English.
|
||||
8. Also at session start (user rule): read `docs/HANDOFF.md` and `docs/STATUS.md` if they exist. `docs/DESIGN.md` is the architecture and Servo API cheat sheet; read the parts your plan names.
|
||||
8. Also at session start (user rule): read `docs/HANDOFF.md` and `docs/STATUS.md` if they exist. `docs/DESIGN.md` is the architecture and WebKit embedding cheat sheet; read the parts your plan names.
|
||||
|
||||
## Tracker
|
||||
|
||||
|
|
@ -22,22 +22,24 @@ After ticking a box: `ArtifactData` `update` with `url` = the tracker, `collecti
|
|||
|
||||
Root: `/home/astar76/Projects/Nacre`
|
||||
```
|
||||
src/ main, app (winit), window, hub (Servo delegates), tabs, actions, keys, inject, adblock, discord, media, ...
|
||||
src/ main, app, window (GTK window + egui overlay), egui_area, engine/ (WebKit host, views, events), tabs, actions, keys, inject, adblock, discord, media, ...
|
||||
src/store/ settings, history, bookmarks, downloads, vault, permissions, session, apps, scripts
|
||||
src/net/ bridge (local CONNECT proxy), fetch, tor, dns, download, dlm
|
||||
src/ui/ egui chrome, menus, dialogs, widgets, pages/* (every nacre:// page)
|
||||
assets/ bundled resources
|
||||
docs/ DESIGN, FEATURES, REVIEW, HANDOFF, UI-BRIEF, ui-reference/, PROGRESS, DECISIONS
|
||||
Plans/ INDEX.md, _TEMPLATE.md, one folder per category
|
||||
install.sh builds and installs the Arch package (packaging/arch/PKGBUILD, D-054); removes target/ afterwards
|
||||
releases/ release files (git-ignored; hub-release-sync uploads them)
|
||||
```
|
||||
Never modify: `~/Documents/Apps/Nacre` (the original Python Nacre, reference only) and `~/Projects/Nacre-rust` (older repo, not a source). `target/` is build output.
|
||||
|
||||
## 2. Facts
|
||||
|
||||
- Cargo package `nacre` 0.4.0, edition 2024, Rust ≥ 1.88. Servo is `=0.7.0` from crates.io, trimmed (no WebXR, WebGPU, multiprocess). Gamepad and Web Bluetooth stay in.
|
||||
- Status: ~19k lines written, **never compiled**. Review passes were done by reading only. Expect a round of compile errors at the first build; fix them in place, don't restructure.
|
||||
- User rules: function first; plain egui UI until everything works; the Material You redesign comes afterwards (see `docs/UI-BRIEF.md`); nothing from the original is dropped silently (Servo limits are shown as unavailable, see DESIGN.md "Engine limits"); never connect to Tor or proxies in tests.
|
||||
- **Engine**: WebKitGTK 6.0 (`webkit6` crate, `=0.6.1`) in a GTK 4 window; egui draws the chrome in a transparent `Gtk.GLArea` over the web views (D-033, D-035). WebKit tuning data and the engine test: `docs/engine/engine-comparison.md`, `docs/engine/tune/`. The Servo removal inventory (history): `docs/engine/servo-removal.md`. Pages' network work happens in the web process extension `webext/`.
|
||||
- Cargo package `nacre` 0.4.1, edition 2024, Rust ≥ 1.88. No Servo, vendored crates or patched engine any more; builds take minutes (~2–4 min release), not hours.
|
||||
- Status: builds, `cargo test` green, hidden smokes pass; features still to re-verify on WebKit are marked in `docs/FEATURES.md`.
|
||||
- User rules: function first; plain egui UI until everything works; the Material You redesign comes afterwards (see `docs/UI-BRIEF.md`); nothing from the original is dropped silently (engine limits are shown as unavailable, see DESIGN.md "Engine limits"); never connect to Tor or proxies in tests.
|
||||
- Known gaps and things to check at the first build: `docs/REVIEW.md`. Feature list with file and review state: `docs/FEATURES.md`.
|
||||
- The original Python Nacre (`~/Documents/Apps/Nacre/nacre`, `config.py` DEFAULTS) is the feature spec.
|
||||
|
||||
|
|
@ -46,16 +48,14 @@ Never modify: `~/Documents/Apps/Nacre` (the original Python Nacre, reference onl
|
|||
- Write like the neighbouring code. KISS, DRY, YAGNI; no abstraction without ≥ 2 uses.
|
||||
- New pure logic gets a test; a bug fix gets a regression test when feasible.
|
||||
- Fix compile errors in place; don't restructure working modules.
|
||||
- Servo callbacks run on the main thread; `load_web_resource` must answer synchronously (see REVIEW.md).
|
||||
- WebKit signals run on the main thread; handlers only queue `Event`s (see `src/engine/mod.rs`); never touch `App` inside a signal handler.
|
||||
|
||||
## 4. Domain pitfalls (all agents)
|
||||
|
||||
- **Builds**: `nice cargo build --release -j 2` only. The first build takes hours (Servo, SpiderMonkey, WebRender). Never run `cargo test` at the same time as a release build, and never run two cargo commands on the same `target/`.
|
||||
- Servo needs clang. Start from Servo's own lock versions to avoid pre-release drift (rsa/pkcs1).
|
||||
- Run apps offscreen or in a hidden nested session (`kwin_wayland --virtual`) unless the user asked to watch. VMs have no real GPU: use software rendering there.
|
||||
- **Builds**: `nice cargo build --release -j 2` only. Never run `cargo test` at the same time as a release build, and never run two cargo commands on the same `target/`.
|
||||
- Run apps in the hidden nested session (`tools/nested-session.sh`: Xvfb → nested niri, software GL; `kwin_wayland` isn't installed) unless the user asked to watch. Xvfb has no DRI3, so clients there use `LIBGL_ALWAYS_SOFTWARE=1 WEBKIT_DMABUF_RENDERER_FORCE_SHM=1 GSK_RENDERER=gl` (the session's `env` file sets them). VMs have no real GPU: use software rendering there.
|
||||
- Never connect to Tor or proxies in tests; `NACRE_NO_BRIDGE=1` disables the bridge for debugging.
|
||||
- Servo 0.7 can't add request headers, block third-party cookies, do per-WebView private mode, EME/DRM, printing: don't try, see DESIGN.md.
|
||||
- Several painters on one GL context (one per tab) is unproven; the fallback is in DESIGN.md.
|
||||
- WebKit has no EME/Widevine here, no Chrome extensions, no JS pause for background tabs: see DESIGN.md "Engine limits"; don't try to work around them.
|
||||
- Use throwaway `XDG_*` dirs for test runs so the user's profile is untouched.
|
||||
|
||||
## 5. Verification tools
|
||||
|
|
@ -65,19 +65,23 @@ Never modify: `~/Documents/Apps/Nacre` (the original Python Nacre, reference onl
|
|||
| `nice cargo build --release -j 2` | compile check, produces `target/release/nacre` | now |
|
||||
| `nice cargo test --release -j 2` | unit tests (44, ~16 s test-profile build then <1 s run; shares the S001 build) (util, settings, history, bookmarks, permissions, vault, dns, bridge loopback, download, adblock, keys, scripts, updates, inject, hub, theme, ui::widgets input, ui::paint, ui::pages::newtab) | first successful build; not alongside a build |
|
||||
| `src/selftest.rs` | in-app self test: `NACRE_SCRIPT=<file>` runs script commands (listed at its top) | now |
|
||||
| `tools/smoke.sh <script> [outdir]` | smoke run on a hidden Xvfb display with a throwaway home and software GL; outdir (default `target/smoke/<name>-<time>`) gets `nacre.log`, `selftest.log`, `<shot>.png`, `<status>.json`, `home/`; exits non-zero on crash, panic, no `status done` or a failed `assert <js>`. Scripts in `tests/smoke/` (`launch.txt` offline, `https.txt` needs internet, `restore.txt` with `SMOKE_HOME=<launch outdir>/home`, `chrome.txt` chrome and every flyout dark and light, offline; `colours.txt` colours after welcome and site colour vs internal pages, hidden `SMOKE_SIZE=1280x1100`; `input.txt` real clicks, typing, right click, wheel on a web page, offline; `basics.txt` tabs, navigation, find, zoom, full screen, pop-ups, offline; `heavy-web.txt` DuckDuckGo, Wikipedia, YouTube, needs internet, `SMOKE_TIMEOUT=900`; `keys.txt` every shortcut action, offline; `privacy-net.txt` DNT/GPC/Save-Data headers and third-party cookies on a loopback server, offline, start `python3 tests/smoke/net/server.py &` first; `site-doctor.txt` Google sign-in, captchas, Reddit, GitHub, needs internet; `cache.txt` HTTP cache, offline, start `python3 tests/smoke/cache/server.py &` first; selftest `launch <args>` checks single instance; `cookies.txt` → `cookies-restart.txt` → `cookies-cleared.txt` encrypted cookies across restarts with `SMOKE_KEYRING=1` (own throwaway GNOME Keyring + bus) and `SMOKE_HOME`, `cookies-nokeyring.txt` without, server.py first; `crash-adblock.txt` R5-01 regression, ~1300 blocked loads with reloads/navigations mid-load plus 3200 timers under GC pressure, offline, server.py first); header documents env vars and commands. `SMOKE_VISIBLE=1` shows the run on the user's screen (DP-1, real GPU, niri tiles the window so shots are narrower); use it whenever the user is watching (D-009). Read the PNGs | now (S003) |
|
||||
| `tools/smoke.sh <script> [outdir]` | smoke run in a hidden nested Wayland session (`tools/nested-session.sh start\|stop <dir> [WxH]`: Xvfb → nested niri, software GL, own runtime dir and bus; `SMOKE_SIZE` = nested output size, window at 0,0) with a throwaway home; selftest `click`/`rclick`/`pagescroll`/`pagetype` are real compositor input there (`tools/wl-input`, own crate, built on first use; `wtype`), `resize` goes through the nested niri; outdir (default `target/smoke/<name>-<time>`, use a fresh one: `home/` persists) gets `nacre.log`, `selftest.log`, `<shot>.png`, `<status>.json`, `home/`, `session/`; exits non-zero on crash, panic, no `status done` or a failed `assert <js>`. Scripts in `tests/smoke/` (`launch.txt` offline, `https.txt` needs internet, `restore.txt` with `SMOKE_HOME=<launch outdir>/home`, `chrome.txt` chrome and every flyout dark and light, offline; `colours.txt` colours after welcome and site colour vs internal pages, hidden `SMOKE_SIZE=1280x1100`; `input.txt` real clicks, typing, right click, wheel on a web page, offline; `basics.txt` tabs, navigation, find, zoom, full screen, pop-ups, offline; `heavy-web.txt` DuckDuckGo, Wikipedia, YouTube, needs internet, `SMOKE_TIMEOUT=900`; `keys.txt` every shortcut action, offline; `privacy-net.txt` DNT/GPC/Save-Data headers and third-party cookies on a loopback server, offline, start `python3 tests/smoke/net/server.py &` first; `site-doctor.txt` Google sign-in, captchas, Reddit, GitHub, needs internet; `cache.txt` HTTP cache, offline, start `python3 tests/smoke/cache/server.py &` first; selftest `launch <args>` checks single instance; `cookies.txt` → `cookies-restart.txt` → `cookies-cleared.txt` encrypted cookies across restarts with `SMOKE_KEYRING=1` (own throwaway GNOME Keyring + bus) and `SMOKE_HOME`, `cookies-nokeyring.txt` without, server.py first; `cookies-export.txt` Export cookies.txt, offline, server.py first, `SMOKE_SIZE=1280x900`; `zap.txt` ad removal animation (cookie shield mid-animation, slots closed, players kept, Motion off), dark and light, offline, `SMOKE_SIZE=1280x900`; `stuck.txt` tab lifecycle (leave-page question, Reload, nacre:// pages free their view, Back with history, chatty page closes without CRITICAL, shortcut recording ends), offline, `SMOKE_SIZE=1280x900`; `nacre-lock.txt` web pages can't reach nacre:// and the passwords page asks on every open (D-049, D-052: computer password via `NACRE_TEST_ACCOUNT_PASSWORD=smoke-account`), server.py first, `SMOKE_SIZE=1280x900`; `crash-adblock.txt` R5-01 regression, ~1300 blocked loads with reloads/navigations mid-load plus 3200 timers under GC pressure, offline, server.py first; `hang.txt` page isn't responding bar (Wait, Reload page, caught on switch-to) and crash pages for the active, a hidden and a PiP tab, hidden only, offline, `SMOKE_SIZE=1280x900`; `previews.txt` hover-preview probe, no pass/fail, see its header); header documents env vars and commands. `SMOKE_VISIBLE=1` shows the run on the user's screen (real GPU; page input synthesized in the page, no `rclick`/`resize`); it refuses to start unless the user's niri config has the `dev.nacre.Nacre` window rule from the smoke.sh header (DP-1, no focus), so it never moves the user's focus or workspace (D-044). WebKit state (S050): launch, basics, input, keys, chrome, dialogs, pip, auth, stores-*, integ-spell, net-*, privacy-net, privacy-mode, cache*, crash-adblock green hidden (loopback skips the bridge, no `NACRE_NO_BRIDGE` needed); other scripts not yet. Read the PNGs | now (S003, S046) |
|
||||
| `nacre://gallery` + `SMOKE_SIZE=1400x2800 tools/smoke.sh tests/smoke/gallery.txt` | every design token and widget, dark and light (+ new tab and settings shots); read the PNGs | now (S015) |
|
||||
| `SMOKE_SIZE=1400x1200 tools/smoke.sh tests/smoke/newtab.txt` | new tab page dark/light, nothing playing and a video playing, weather failed state, tall/narrow/phone widths (offline); `tests/smoke/newtab-weather.txt` shoots the real weather card (needs internet); read the PNGs | now (S017) |
|
||||
| `SMOKE_SIZE=1400x900 tools/smoke.sh tests/smoke/backgrounds.txt` | every new tab background with the pointer, Customize panel dark/light, image + blur, GIF frames; `perf-*-a/b.json` `frames` (median/max draw ms, `drawn` count) per background at Lots/Fast, hidden tab, still, Motion off. Selftest `pointer x y`, `customize`; `@PAGESDIR@` = path of tests/smoke/pages | now (S018) |
|
||||
| `tools/smoke.sh tests/smoke/settings.txt` (+ `SMOKE_SIZE=1280x1100`) | every settings section and sub-page dark and light, search results (`nacre://settings/?search=…`), narrow width; `settings-write.txt` (hidden, `SMOKE_SIZE=1280x1100`, fresh outdir) taps controls with selftest `tap x y`, then check `home/.config/nacre-servo/Default/settings.json` (expected values in its header) | now (S019) |
|
||||
| `tools/smoke.sh tests/smoke/settings.txt` (+ `SMOKE_SIZE=1280x1100`) | every settings section and sub-page dark and light, search results (`nacre://settings/?search=…`), narrow width; `settings-write.txt` (hidden, `SMOKE_SIZE=1280x1100`, fresh outdir) taps controls with selftest `tap x y`, then check `home/.config/nacre-browser/Default/settings.json` (expected values in its header) | now (S019) |
|
||||
| `SMOKE_SIZE=1280x1600 tools/smoke.sh tests/smoke/sliders.txt` | controls hold still (R1-21): Interface size drag (value label while held, applied on release), Contrast live, Style chip pick; `SMOKE_VISIBLE=1 tools/smoke.sh tests/smoke/sliders-visible.txt` the same plus scrolling for the user's window (~772 px). Selftest `press`/`drag`/`release`, `scroll x y dy`; read the PNGs | now (R1-21) |
|
||||
| `python3 tests/smoke/net/server.py &` + `tools/smoke.sh tests/smoke/net-{privacy,adblock,downloads}.txt` | network pass, offline: secure DNS through a local DoH stub (`*.nacre.test` → 127.0.0.1), HTTPS-only + certificate warning, tracking params, ad blocker with a local list, downloads + download manager stubs; the server's `/log` has requests, DNS names, Range headers, manager calls. `cache-restart.txt` with `SMOKE_HOME=<cache.txt outdir>/home`: disk cache. `net-real.txt` needs internet. `@HOME@` in scripts = the throwaway home | now (S007) |
|
||||
| `SMOKE_TIMEOUT=400 tools/smoke.sh tests/smoke/mse.txt` + `tests/smoke/mse-leak-check.sh <outdir>` | MSE: chunk-appended fMP4, WebM and split A/V play; `mse-spec.html` spec cases (attach/detach, duration, buffered/seekable, remove, removeSourceBuffer, changeType, abort, reopen, sequence, leak); the leak check reads nacre.log (offline). `NACRE_DOM_MEDIA_SOURCE_ENABLED=0 tools/smoke.sh tests/smoke/mse-off.txt`: the switch. `SMOKE_TIMEOUT=400 tools/smoke.sh tests/smoke/mse-player.txt`: player integration (attach without blocking, seeks, rate, ended, decode error, garbage append, script-thread gaps < 1 s; `?only=<case>` in the page URL for one case). `tools/gst-mse.sh test`: patched gst_mse + C tests. DESIGN.md "Media and Media Source Extensions" | S022, S027, S028 |
|
||||
| `tools/gst-mse.sh [test]` | builds Nacre's patched gst_mse library and `mse` plugin (vendor/gst-mse) into `target/gst-mse/` (needed before running a build that uses MSE); `test` also runs the C tests in `tests/gst-mse/` | now (S026, branch s022-mse-proto) |
|
||||
| `tools/wpt-mse.sh [outdir] [file ...]` | WPT media-source subset (60 files) in a hidden run; first run sparse-clones WPT at a pinned commit into `target/wpt` (needs internet once); prints subtest pass counts, results in `<outdir>/wpt/results.json`; ~45 min | S027 |
|
||||
| `SMOKE_TIMEOUT=400 tools/smoke.sh tests/smoke/mse.txt`, `…/mse-player.txt` | plain MSE tests on WebKit: chunk-appended fMP4, WebM and split A/V play; `mse-spec.html` spec cases (attach/detach, duration, buffered/seekable, remove, removeSourceBuffer, changeType, abort, reopen, sequence); player integration (attach, seeks, rate, ended, decode error, garbage append; `?only=<case>` in the page URL for one case). Offline, start `python3 -m http.server 8765 --bind 127.0.0.1 --directory tests/smoke/pages &` first (MSE needs an http origin). `youtube-mse.txt` is an internet probe | S022, S027, S028, S053 |
|
||||
| `tools/smoke.sh tests/smoke/privacy-mode.txt` (+ `SMOKE_ARGS=--incognito … privacy-incognito.txt`) | privacy mode: `pages/fingerprint.html` read off/on, `fp-off.json`/`fp-on.json` + shots (offline); `privacy-net.txt` (needs `tests/smoke/net/server.py`) frame cookies, per-site pause, Accept-Language; `SMOKE_TIMEOUT=700 … coveryourtracks.txt` EFF's test off/on (internet, direct). Selftest `save <name> <js>` writes a JS string result to `<name>.json`; `SMOKE_ARGS` passes browser arguments | now (S024) |
|
||||
| `python tools/icons.py` | rebuilds the icon font subset and `src/ui/icons.rs` from `tools/icons.txt` (needs fontTools and Arch's ttf-material-symbols-variable) | now (S015) |
|
||||
| appimagetool, wine + Inno Setup, VM "Windows 10" | packaging and Windows checks | see the user's global CLAUDE.md "Building" |
|
||||
| `tools/mem-run.sh <outdir> [ENV=v…]` + `tools/smoke.sh tests/smoke/slow.txt` (+ `python3 tests/smoke/slow/server.py &`), `bg-tabs.txt` | Nacre's PSS/CPU on the tune sites (hidden, internet; `NACRE_WK_PAGE_CACHE=1`, `NACRE_WK_CACHE_MODEL=viewer` as variants); slow-line visit/revisit/reload/back with a paced local server (offline, `first/revisit/reload/back.json`, `log.json`); hidden tab gets no frames and slow timers | now (S052) |
|
||||
| `tools/engine-test/run.sh chromium\|webkit` + `analyze.py` | engine comparison: one browser visible on DP-1, throwaway profile, sites from `sites.txt`, per-second RAM (PSS), CPU, GPU of the whole process tree into `docs/engine/runs/<engine>/samples.csv`; `webkit_shell.py` is the WebKitGTK 6.0 shell (needs `webkitgtk-6.0`); report `docs/engine/engine-comparison.md`. Never run two at once or alongside cargo | now |
|
||||
| `python3 tests/smoke/net/server.py &` + `tools/smoke.sh tests/smoke/site-data.txt`; `tools/smoke.sh tests/smoke/media-audio.txt` | site info cookie/data count, Clear data time range (stored data kept, cookies always whole); WebKit `is-playing-audio` → tab audible, tab mute via `set_is_muted` (`pages/sound.html`, `?element` plays `tone.ogg` with Media Session metadata; WebKit's MPRIS player shows on the run's bus: `busctl --address=unix:path=$(cat <out>/session/runtime)/bus list`). Offline, hidden | now (S051) |
|
||||
| `tools/smoke.sh tests/smoke/pip.txt` (+ `tools/hidden.sh tests/smoke/pip.txt <out> -- tests/smoke/pip-driver.sh`: `<out>/windows.json` PiP floating), `bindings.txt` (side buttons, middle click; hidden only), `ctxmenu.txt` (site menu vs Nacre's; hidden only), `pip-return.txt` (page input after PiP and back; hidden only), `pip-loop.txt` (+ `-- tests/smoke/pip-loop-driver.sh`: PiP three rounds, ended by command, Escape, window close; `windows-<n>.json`; hidden only), selftest `pick x y` (GTK's pick at a page point + view state), `python3 tests/smoke/net/server.py &` + `SMOKE_SIZE=1280x900 tools/smoke.sh tests/smoke/auth.txt`, `tests/smoke/visible-ui.txt` (by hand, header) | PiP moves the live view and back (offline); HTTP sign-in cancel + saved login (offline); visible: portal file chooser, notification, page full screen, Web Inspector (`dialogs.txt` now also checks dialog answers, context menu, leave page, permission bars, notifications count) | now (S048, S056) |
|
||||
| `python3 tests/smoke/net/server.py &` + `tools/smoke.sh tests/smoke/player-ad.txt`; `tools/smoke.sh tests/smoke/ctxmenu.txt` | video site ad tricks (click catcher over the player, pop-under on click, pop-up without a click, ad frame in a cross-site frame must not take the tab); site context menus (`pages/site-menu.html`: YouTube-like toggle, Discord-like, plain, each 3×) and Nacre's menu keys via selftest `realkey <wtype keys>`. Hidden only, offline | now (S061) |
|
||||
| `tools/hidden.sh <script> [outdir] [-- driver.sh]` | WebKit build hidden with a driver script: Xvfb → nested niri (`tools/nested-session.sh`), throwaway home, software GL, `NACRE_SCRIPT`; the driver gets `click`/`scroll` (`tools/wl-input`), `grab` (grim), `key`/`type` (wtype). Scripts in `tests/hidden/` (`basic.txt` offline; `web.txt` + `web-driver.sh` needs internet). Read the PNGs | now (S045) |
|
||||
| `tools/package.sh` | release files in `dist/`: tar.gz, AppImage, Arch `nacre-bin` (`packaging/arch-bin`), .deb, `packaging/nix/default.nix`, SHA256SUMS (appimagetool from `~/.local/opt/build-tools`) | now |
|
||||
|
||||
Don't assume a tool exists: check first. When your plan creates a tool, add its row here.
|
||||
|
||||
|
|
|
|||
8768
Cargo.lock
generated
8768
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
71
Cargo.toml
71
Cargo.toml
|
|
@ -1,63 +1,47 @@
|
|||
[package]
|
||||
name = "nacre"
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
edition = "2024"
|
||||
rust-version = "1.88"
|
||||
description = "Nacre, a web browser built on Servo"
|
||||
description = "Nacre, a web browser built on WebKitGTK"
|
||||
license = "MPL-2.0"
|
||||
publish = false
|
||||
|
||||
# webext/: the web process extension (D-036), built with the browser.
|
||||
[workspace]
|
||||
members = [".", "webext"]
|
||||
default-members = [".", "webext"]
|
||||
|
||||
[[bin]]
|
||||
name = "nacre"
|
||||
path = "src/main.rs"
|
||||
|
||||
[features]
|
||||
default = ["media"]
|
||||
# Audio and video through GStreamer. Without it pages load but <video>/<audio> stay silent.
|
||||
media = ["servo/media-gstreamer"]
|
||||
|
||||
[dependencies]
|
||||
# The engine. Trimmed: no webxr, webgpu, multiprocess, vello.
|
||||
servo = { version = "=0.7.0", default-features = false, features = [
|
||||
"bundled_freetype",
|
||||
"clipboard",
|
||||
"js_jit",
|
||||
"webgl",
|
||||
"webcrypto",
|
||||
"brotli-compression-stream",
|
||||
"gamepad",
|
||||
"bluetooth",
|
||||
"native-bluetooth",
|
||||
] }
|
||||
|
||||
# Window, GL and UI. Versions follow what Servo 0.7 and egui 0.37 use so the types are shared.
|
||||
winit = { version = "0.30.13", default-features = false, features = ["rwh_06", "x11", "wayland", "wayland-csd-adwaita"] }
|
||||
# The engine: WebKitGTK 6.0 in a GTK 4 window, Nacre's egui chrome painted over it (D-033, D-035).
|
||||
gtk = { package = "gtk4", version = "=0.11.5", features = ["v4_20"] }
|
||||
webkit = { package = "webkit6", version = "=0.6.1", features = ["v2_52"] }
|
||||
egui = { version = "0.37", default-features = false, features = ["default_fonts"] }
|
||||
egui_glow = { version = "0.37", default-features = false, features = ["winit", "x11", "wayland", "clipboard"] }
|
||||
egui_glow = { version = "0.37", default-features = false }
|
||||
glow = "0.17"
|
||||
libloading = "0.8"
|
||||
# Material You colour schemes (HCT, tonal palettes). 0.4.2: 0.5 needs Rust 1.97 (D-009).
|
||||
material-colors = { version = "=0.4.2", default-features = false, features = ["std"] }
|
||||
euclid = "0.22"
|
||||
dpi = "0.1"
|
||||
raw-window-handle = "0.6"
|
||||
keyboard-types = "0.8.3"
|
||||
url = "2.5"
|
||||
# Redirect rules (net::rules, shared with webext/)
|
||||
regex-lite = "0.1"
|
||||
http = "1.4"
|
||||
# AES-256-GCM, only to read the old Python Nacre's vault (rustls already builds it)
|
||||
aws-lc-rs = { version = "1.18", default-features = false, features = ["aws-lc-sys"] }
|
||||
rustls = { version = "0.23", default-features = false, features = ["aws_lc_rs", "std"] }
|
||||
content-security-policy = "0.9"
|
||||
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "ico", "webp", "gif", "bmp"] }
|
||||
log = "0.4"
|
||||
# The vendored servo-net (see [patch.crates-io]): Nacre sets request headers and third-party cookie blocking
|
||||
# through its `nacre` module (S023).
|
||||
servo-net = "=0.7.0"
|
||||
|
||||
# Ad blocking
|
||||
adblock = { version = "0.13.5", default-features = false, features = ["embedded-domain-resolver", "full-regex-handling"] }
|
||||
adblock = { version = "0.13.5", default-features = false, features = ["embedded-domain-resolver", "full-regex-handling", "content-blocking"] }
|
||||
|
||||
# Nacre's own HTTP (downloads, filter lists, updates, DoH)
|
||||
ureq = { version = "3.5", default-features = false, features = ["rustls-no-provider", "rustls-webpki-roots", "gzip", "brotli"] }
|
||||
|
||||
# Storage and formats (rusqlite: the same version Servo uses, for importing other browsers)
|
||||
# Storage and formats (rusqlite also reads other browsers' files for importing)
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
dirs = "6"
|
||||
|
|
@ -71,9 +55,6 @@ getrandom = "0.3"
|
|||
# Cookie key in the OS keyring (S025, D-019): Secret Service over libdbus on Linux, Credential Manager on Windows
|
||||
keyring = { version = "3.6", features = ["sync-secret-service", "crypto-rust", "windows-native"] }
|
||||
|
||||
# Gamepads (Servo gets gamepad input from the embedder)
|
||||
gilrs = "0.11"
|
||||
|
||||
# Small features
|
||||
rfd = { version = "0.17", default-features = false, features = ["xdg-portal", "pollster"] }
|
||||
qrcode = { version = "0.14", default-features = false }
|
||||
|
|
@ -94,19 +75,3 @@ opt-level = 1
|
|||
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 2
|
||||
|
||||
# epaint 0.37.0 panics when Servo's canvas enables vello_cpu/multithreading; the vendored copy renders glyphs
|
||||
# single-threaded (vendor/epaint/src/text/font_face.rs, end of file). Drop when egui ships a fix.
|
||||
# servo-net 0.7.0 keeps hyper's 16 KiB HTTP/2 header limit, which breaks YouTube; the vendored copy raises it
|
||||
# (vendor/servo-net/connector.rs, create_http_client). Drop when Servo sets it. Every servo-net patch is listed in
|
||||
# docs/DESIGN.md "Vendored servo-net patches".
|
||||
# servo-script 0.7.0 fires due timers from an unrooted list, so a GC in one callback freed the next one's function
|
||||
# (SIGSEGV, R5-01); the vendored copy roots them (vendor/servo-script/event_loop/timers.rs, `Nacre patch (S031)`).
|
||||
[patch.crates-io]
|
||||
epaint = { path = "vendor/epaint" }
|
||||
servo-net = { path = "vendor/servo-net" }
|
||||
servo-script = { path = "vendor/servo-script" }
|
||||
servo-script-bindings = { path = "vendor/servo-script-bindings" }
|
||||
servo-media = { path = "vendor/servo-media" }
|
||||
servo-media-player = { path = "vendor/servo-media-player" }
|
||||
servo-media-gstreamer = { path = "vendor/servo-media-gstreamer" }
|
||||
|
|
|
|||
373
LICENSE
Normal file
373
LICENSE
Normal file
|
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
||||
10
PLAN.md
10
PLAN.md
|
|
@ -1,10 +1,10 @@
|
|||
# Nacre — vision
|
||||
|
||||
## Goal
|
||||
A daily-driver web browser in Rust on Servo 0.7 with an egui UI, 1:1 in features with the user's Python/QtWebEngine Nacre (new tab page, settings, permissions, vault/autofill, ad blocker, VPN/DNS bridge, downloads, Discord presence, media, import of old profiles). Recipient: the user, replacing their current browser; releases go to their Forgejo (astar76/Nacre).
|
||||
A daily-driver web browser in Rust on WebKitGTK 6.0 (GTK 4 host) with an egui UI, 1:1 in features with the user's Python/QtWebEngine Nacre (new tab page, settings, permissions, vault/autofill, ad blocker, VPN/DNS bridge, downloads, Discord presence, media, import of old profiles). Recipient: the user, replacing their current browser; releases go to their Forgejo (astar76/Nacre).
|
||||
|
||||
## Current state
|
||||
About 19k lines written across storage, networking, ad blocker, media, importer, updates, keys, Servo glue and a plain egui UI. Reviewed by reading only; never compiled. Architecture: `docs/DESIGN.md`; features: `docs/FEATURES.md`; open checks: `docs/REVIEW.md`; redesign spec: `docs/UI-BRIEF.md`.
|
||||
Storage, networking, ad blocker, media, importer, updates, keys, the WebKit host and an egui UI, built and smoke-tested hidden; Servo is gone (S053). Architecture: `docs/DESIGN.md`; features: `docs/FEATURES.md`; open checks: `docs/REVIEW.md`; redesign spec: `docs/UI-BRIEF.md`.
|
||||
|
||||
## Phases
|
||||
1. **First build** — make it compile (`nice cargo build --release -j 2`), fix errors in place, get the binary to start.
|
||||
|
|
@ -12,9 +12,11 @@ About 19k lines written across storage, networking, ad blocker, media, importer,
|
|||
3. **Gaps** — work through `docs/REVIEW.md`, fix the user's review items, add MPRIS media keys (other candidates deferred, D-002).
|
||||
4. **UI redesign** — Material You (tonal-spot schemes, spring motion, expressive shapes) and the animated new tab page per `docs/UI-BRIEF.md`, using the `app-taste` skill. Starts only after the framework works.
|
||||
5. **Polish pass** (`Plans/07 Polish pass`, input `docs/review/phase5.md`) — the crash, load speed, SVG/masks, small fixes, flyouts and context menu, custom download manager, a DevTools window, motion rules, a little-things sweep and site passes; ends with the phase 5 review (S042).
|
||||
6. Packaging and release (Linux AppImage/tar.gz, Windows installer and zip) when the user asks.
|
||||
6. **WebKit engine** (`Plans/08 WebKit engine`, D-032–D-040, runs first) — GTK 4 host with the egui overlay over WebKitGTK 6.0 views, engine callbacks, ad block via content filters + web process extension, network/privacy/downloads, profile and sealed cookies, tuning defaults, Servo removal (done, S053), site pass vs Chromium; Widevine later.
|
||||
7. **Fix round** (`Plans/09 Fix round`, D-048–D-050, after S054) — stuck tabs and view cleanup, PiP focus, site context menus and click-through ads, memory saver, nacre:// lockdown, history flyout and About list, custom download manager by port, UI alignment.
|
||||
8. Packaging and release (Linux AppImage/tar.gz, Windows installer and zip) when the user asks.
|
||||
|
||||
Each of phases 1–4 ends with a user review plan (D-003).
|
||||
|
||||
## Out of scope
|
||||
Chrome extensions, Widevine/DRM, printing, per-WebView private mode, third-party cookie blocking (Servo 0.7 limits, shown as unavailable); anything copied from the older `Nacre-rust` repo.
|
||||
Chrome extensions and Widevine/DRM for now (WebKit limits, shown as unavailable; Widevine is a later plan). Printing, private mode and third-party cookie blocking are possible on WebKit and belong to later plans. Anything copied from the older `Nacre-rust` repo.
|
||||
|
|
|
|||
|
|
@ -28,12 +28,12 @@ work happens on main.
|
|||
- [x] Errors: decode error → `MediaError` + `sourceended`/error events; append of garbage → SourceBuffer `error`
|
||||
- [x] Codec table: `isTypeSupported` consistent with `canPlayType` (registry scanner learns opus/webm, vp09.*, av01
|
||||
when dav1d is installed); unit test for the mime/codec mapping
|
||||
- [ ] Full smoke set green on the branch (launch, basics, input, chrome, keys, mse, settings; heavy-web where
|
||||
- [x] Full smoke set green on the branch (launch, basics, input, chrome, keys, mse, settings; heavy-web where
|
||||
the network allows) and `nice cargo test --release -j 2`
|
||||
- [ ] Merge `s022-mse-proto` into main; build main; mse smoke green on main; remove the worktree
|
||||
- [ ] DESIGN.md: media section (MSE path, vendored crates, patched gst_mse); "Engine limits": drop the MSE line,
|
||||
- [x] Merge `s022-mse-proto` into main; build main; mse smoke green on main; remove the worktree
|
||||
- [x] DESIGN.md: media section (MSE path, vendored crates, patched gst_mse); "Engine limits": drop the MSE line,
|
||||
keep DRM; FEATURES rows
|
||||
- [ ] PROGRESS entry, INDEX line, commit `S028: …`, push main
|
||||
- [x] PROGRESS entry, INDEX line, commit `S028: …`, push main
|
||||
|
||||
## End criteria
|
||||
- mse smoke (seek, rate, ended, errors, split A/V) passes on main; `cargo test` green; no smoke regressions.
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ switches, lists and toggles.
|
|||
- `src/ui/dialogs.rs` (how dialogs/toasts are shown) · load the `app-taste` skill · `tests/smoke/backgrounds.txt` (perf json)
|
||||
|
||||
## Steps
|
||||
- [ ] Apply `docs/ui-motion-audit.md` blocks A–E (13 findings: instant tab switch and address suggestions, `theme::clock` so Motion Off stops every loop, fresh context-menu ids, `MOVE`/critically damped presets at spatial call sites, toast enter/exit, dialog scrim exit, pixel-settle springs, flyout origin 0.95); verify per its "Verification" section.
|
||||
- [ ] Copy the Motion rules into DESIGN.md "UI system"; add the critically damped presets + a settle-time unit test per preset.
|
||||
- [ ] Audit: list every current animation and every candidate with its frequency tier and purpose (PROGRESS or DESIGN.md table); remove motion that fails the gate (e.g. on shortcuts).
|
||||
- [ ] Flyouts and menus: open from the anchor (scale 0.95 + fade), close back to it with a closing state; context menu from the pointer.
|
||||
|
|
@ -63,6 +64,7 @@ switches, lists and toggles.
|
|||
- [ ] Settings sub-page and section switches: short crossfade + 8 px shift in the direction of travel; back goes the other way.
|
||||
- [ ] Lists: history/downloads flyout stagger on open; downloads add/remove/progress-done transitions.
|
||||
- [ ] Toggles, chips, segmented buttons, sliders: thumb/indicator springs, press feedback; check against rule 1 (no motion when keyboard-toggled if it's 100+/day).
|
||||
- [ ] R5-14 caret: Nacre's own text fields (address bar, find bar, search, settings inputs) get Damson's caret — primary colour, 2 px rounded, solid while typing then a smooth cosine fade pulse, stretch as it moves (`~/Projects/Damson/src/ui/editor.rs` ~420-460, read only); Motion Off = steady caret.
|
||||
- [ ] Smoke `tests/smoke/motion.txt` (offline): mid-motion and settled shots for each, dark and light, Motion Off shots (instant); perf frame numbers vs before; CLAUDE.md §5 row.
|
||||
- [ ] Rerun chrome, flyouts, settings, sliders, backgrounds, launch smokes; `SMOKE_VISIBLE=1` run of motion.txt for the user to watch.
|
||||
- [ ] PROGRESS entry, R5-08 tag, INDEX line, commit `S039: …`, push.
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ controls (status chips, meters), polished empty/active states. No new features.
|
|||
- `src/ui/menus.rs` (flyouts), `src/ui/widgets.rs`, `src/theme.rs` tokens · load the `app-taste` and `unslop` skills
|
||||
|
||||
## Steps
|
||||
- [ ] Apply `docs/ui-motion-audit.md` block F (popups and dropdowns on `menus::floating`, toast styling).
|
||||
- [ ] Shots of the current state: every flyout (shield, downloads, media, site info, profiles, main menu, bookmark edit), toolbar, tab strip, address dropdown, dark and light (`chrome.txt` / new `refine.txt`); list what reads as "basic" per screen (5 lines each max) in `docs/review/phase5-refine.md`.
|
||||
- [ ] Shared building blocks first (DRY): section card (tonal container, header row with icon + action), stat block (number + label + meter/sparkline), status chip, button row alignment, list row; tokens in `theme.rs`.
|
||||
- [ ] Shield flyout redesign with the blocks (the user's example): ad-block stat as a card with per-page/total and a small meter, privacy and VPN as cards with state chips, actions aligned; before/after shots.
|
||||
|
|
|
|||
47
Plans/08 WebKit engine/S044-engine-seam.md
Normal file
47
Plans/08 WebKit engine/S044-engine-seam.md
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# S044 — Engine seam: pure logic out of the Servo files
|
||||
|
||||
> Category 08 WebKit engine · Model: Opus · Effort: medium · Depends on: — · Size: M · Human: no · **cargo** (main target/)
|
||||
> Files touched: src/hub.rs, src/net/privacy.rs (new), src/adblock.rs, src/tabs.rs, src/app.rs, src/actions.rs, src/selftest.rs, src/store/cookies.rs, Cargo.toml (no dep changes)
|
||||
|
||||
## Goal
|
||||
First step of `docs/engine/servo-removal.md` §7: everything that must survive Servo moves out of Servo-typed code, and
|
||||
the event surface the glue produces becomes engine-neutral, so S045 can swap the engine without touching app logic.
|
||||
The app still builds and runs on Servo at the end of this plan.
|
||||
|
||||
## Read
|
||||
- `docs/engine/servo-removal.md` §3 (all), §7.
|
||||
- `src/hub.rs` (whole), `src/tabs.rs` (types), `src/app.rs` `handle_event` (547–800), the `hub::` uses in `src/actions.rs` (grep).
|
||||
|
||||
## Steps
|
||||
- [x] Move `privacy_headers`, `strip_tracking`, the Firefox-style language list and third-party matching (from `hub.rs` / `net::nacre` callers) into `src/net/privacy.rs` with their unit tests (`privacy_language_list_is_firefox_style`, `privacy_headers_follow_the_settings_and_reach_requests`, `third_party_matching_keeps_same_site_subdomains`); Servo code calls the new module.
|
||||
- [x] Move `HubConfig` and the request decision (HTTPS-only upgrade, tracking strip, image permission, ad-block verdict → `Decision` enum with Block/Replace/Redirect/Allow) out of `Hub::decide` into an engine-neutral `fn decide(cfg, req) -> Decision` (pure, unit-tested); `load_web_resource` becomes a thin adapter.
|
||||
- [ ] Give tabs a Nacre-owned view id (`ViewId(u64)`, reuse `new_tab_id`) and make `hub::Event` carry it instead of `WebViewId`; one map `WebViewId → ViewId` lives in the Servo glue only. — moved to S045 (orchestrator, 2026-11-13, D-041)
|
||||
- [ ] Replace Servo payload types in `Event` and `tabs.rs` (`LoadStatus`, `JSValue`, `ContextMenu`, `EmbedderControl`, `PermissionRequest`, `ConsoleLogLevel`, …) by small Nacre enums/structs (`LoadState`, `JsValue` = `serde_json::Value`, `PageMenuRequest`, `Control`, `PermissionAsk`, …) holding a glue-side handle (boxed responder closure) where Servo needs an answer object. — moved to S045 (orchestrator, 2026-11-13, D-041)
|
||||
- [ ] Port `selftest.rs` JS-result matches and `fakeload` to the neutral types. — moved to S045 (orchestrator, 2026-11-13, D-041)
|
||||
- [x] `nice cargo build --release -j 2` green; `nice cargo test --release -j 2` green (new tests counted).
|
||||
- [x] Smoke on Servo still green: `tools/smoke.sh tests/smoke/launch.txt`, `basics.txt`, `input.txt` (hidden).
|
||||
- [x] PROGRESS entry, INDEX line, tracker, commit `S044: …`, push.
|
||||
|
||||
## WIP — stopped here (2026-11-13, context limit of the spike session)
|
||||
- Done (boxes 1–2): `src/net/privacy.rs` (privacy headers, tracking strip, language list + tests), `src/net/policy.rs`
|
||||
(`HubConfig`, `Request`, `Outcome`, pure `decide()` + 4 tests); `Hub::decide` is a thin Servo adapter. The third-party
|
||||
test stays in `hub.rs` (it tests vendored servo-net; WebKit's cookie policy replaces it). Note: `Outcome`, not
|
||||
`Decision` (name taken by `store::permissions`).
|
||||
- Verified on the WIP: release build green, `cargo test` 74 green (was 70), smokes launch, basics, input, net-adblock,
|
||||
net-privacy exit 0 (hidden, Servo).
|
||||
- Not done: boxes 3–4 (ViewId, neutral payload types). Finding: 56 uses of Servo payload types outside `hub.rs` plus 14
|
||||
`WebViewId` sites in app/actions; converting them now means new Servo adapters that S045/S048 delete again.
|
||||
Recommendation for the orchestrator: fold boxes 3–4 into S045 (Event surface defined there directly on WebKit, with
|
||||
the payload types S047/S048 need), then tick 5–7 here on what exists and close S044.
|
||||
|
||||
## End criteria
|
||||
- `grep -rn "servo::" src --include=*.rs | grep -v -E "src/(hub|window|app|resources)\.rs"` lists only glue adapters (each named in PROGRESS); `src/net/privacy.rs` has no `servo` import.
|
||||
- `cargo test` green, launch/basics/input smokes green.
|
||||
|
||||
## Pitfalls
|
||||
- No behaviour change: this is a move, not a rewrite (CLAUDE.md §3). Keep the `hub::Event`-after-spin design.
|
||||
- Servo needs answers synchronously in `load_web_resource`; keep the decision pure and fast.
|
||||
- One cargo user per target/ (CLAUDE.md §4).
|
||||
|
||||
## Handoff (→ PROGRESS.md)
|
||||
List the neutral types and where the glue adapters live; S045 implements the same `Event` surface on WebKit.
|
||||
47
Plans/08 WebKit engine/S045-gtk-host.md
Normal file
47
Plans/08 WebKit engine/S045-gtk-host.md
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# S045 — GTK 4 host with the egui overlay; WebKitGTK views; Servo out of the build
|
||||
|
||||
> Category 08 WebKit engine · Model: Opus · Effort: high · Depends on: S044 · Size: L (+ S044 boxes 3–5) · Human: no · **cargo** (main target/)
|
||||
> Files touched: Cargo.toml, build.rs, src/main.rs, src/app.rs, src/window.rs, src/hub.rs → src/engine/{mod,view,host}.rs, src/egui_area.rs (new, from the spike), src/keys.rs, src/tabs.rs, src/ui/mod.rs, src/actions.rs (load/back/forward/reload/stop/close)
|
||||
|
||||
## Goal
|
||||
D-033/D-035: Nacre runs in a `gtk::Application` window: `Gtk.Overlay { Gtk.Fixed { Gtk.Stack of WebKit WebViews at
|
||||
egui's page rect }, EguiArea }`, today's egui Material You chrome drawn unchanged by the overlay. winit, Servo and
|
||||
`servo-net` leave the build. At the end the app builds, opens pages, tabs/navigation work and it looks like today.
|
||||
|
||||
## Read
|
||||
- `docs/engine/webkit-spike.md` (Result + Unproven); `spikes/webkit-egui/src/{egui_area.rs,main.rs}` (whole).
|
||||
- `docs/engine/servo-removal.md` §1, §3.1, §3.2 (rows for url/title/status/load/favicon/history/closed/crashed), §3.3, §3.4, §3.5.
|
||||
- `src/app.rs` (event loop parts: `App::new`, `spin`, `start_servo`, `open_window`, `draw`, `ApplicationHandler` impl, `window_input`), `src/window.rs`, `src/keys.rs` header.
|
||||
|
||||
## Steps
|
||||
- [x] (from S044, D-041) Nacre-owned view id: `ViewId(u64)` (reuse `new_tab_id`) on every tab; the engine `Event` enum carries it; the `WebView ↔ ViewId` map lives only in `src/engine/`.
|
||||
- [x] (from S044, D-041) Engine-neutral payloads in `Event`/`tabs.rs` defined on WebKit: `LoadState`, `JsValue` = `serde_json::Value`, `PageMenuRequest`, `Control`, `PermissionAsk`, console level, each holding the WebKit request object (or a boxed responder) the answer needs; port `selftest.rs` JS-result matches and `fakeload` to them.
|
||||
- [x] Cargo: drop `servo`, `servo-net`, `content-security-policy`, the `media` feature, `[patch.crates-io]` Servo entries, `winit`, `egui-winit`, `gilrs` (WebKit reads gamepads), the gst-mse rpath in `build.rs`; add `gtk4 =0.11.5` (v4_20), `webkit6 =0.6.1` (v2_52) as in the spike. Keep `vendor/` on disk (S053 deletes it). Keep `vendor/epaint` patch until S053 re-checks text.
|
||||
- [x] `src/egui_area.rs` from the spike (GLArea, `contains()` pick rule, input controllers, IME with `set_client_widget`, repaint timer); add clipboard (gdk clipboard ↔ egui copy/cut/paste), cursor icon from egui output, HiDPI scale, window focus/theme events.
|
||||
- [x] `src/engine/`: per-profile `NetworkSession` + `WebContext` (persistent dirs from `paths.rs`, ephemeral for incognito), `Settings`, one `WebView` per tab, signals → the S044 `Event` surface (uri, title, mouse-target → status, load-changed + estimated progress, favicon, back-forward list, close, web-process-terminated → crash page).
|
||||
- [x] Replace the winit `ApplicationHandler` with GTK: `App` lives in `Rc<RefCell<…>>`, `handle_event` runs from a GLib idle after signals, ticks via `glib::timeout_add_local`, windows = `gtk::ApplicationWindow` (undecorated, Nacre's own titlebar as today), `open_window`/`close_window`/`quit` with orderly view teardown.
|
||||
- [x] Keys: GTK key events → `keys.rs` (rename `to_servo` → `to_page`/drop), capture-phase shortcuts so Ctrl+L/T/W/Tab work while the page has focus; page keys go to WebKit natively.
|
||||
- [x] Page actions: load, back/forward, reload/hard reload, **stop** (new), zoom, show/hide on tab switch; `ui/chrome.rs load_estimate` uses real progress.
|
||||
- [x] `nice cargo build --release -j 2` green (fix compile errors in place); `nice cargo test --release -j 2` green.
|
||||
- [x] Hidden check with the spike harness (`spikes/webkit-egui/run/nested.sh`, adapt `spike.sh` to run `target/release/nacre` with a throwaway home): new tab page, https://en.wikipedia.org/wiki/Web_browser, YouTube watch plays after a click; `grim` shots of chrome dark/light next to a pre-switch shot of the same page (`target/smoke` from an older launch run, or check out the last Servo commit's shots in PROGRESS) — Read them, list differences.
|
||||
- [x] PROGRESS entry (what is stubbed for S047/S048: dialogs, pop-ups, menus, permissions, scripts), INDEX line, tracker, commit `S045: …`, push.
|
||||
|
||||
## End criteria
|
||||
- `cargo tree -i servo` fails (no Servo in the graph); release build and `cargo test` green.
|
||||
- Hidden run: Wikipedia renders under today's chrome; YouTube `video.currentTime > 2` after a real click (wl-input); tabs open/switch/close; shots read and differences listed in PROGRESS.
|
||||
|
||||
## Pitfalls
|
||||
- Hidden harness quirks (D-035): software GL env, `WL_INPUT_FLIP_Y=1`, short runtime dir, override `NIRI_SOCKET`, `dbus-run-session`.
|
||||
- GTK must own the main loop; never block it (net/store work stays on threads → `App::spawn`).
|
||||
- Don't restructure working modules; app/actions/ui logic stays, only the engine boundary changes.
|
||||
- Features not ported yet must show as "unavailable"/no-op, not panic.
|
||||
|
||||
## Handoff (→ PROGRESS.md)
|
||||
Where each `Event` comes from; what is stubbed; how to run Nacre hidden until S046 lands.
|
||||
|
||||
## Result (2026-11-13)
|
||||
Box 10 done: `tools/hidden.sh tests/hidden/basic.txt` and `HIDDEN_TIMEOUT=400 tools/hidden.sh tests/hidden/web.txt "" -- tests/hidden/web-driver.sh`
|
||||
pass (YouTube `currentTime` 3.7 s after the real click). The earlier miss was timing, not hit testing: YouTube keeps the
|
||||
page's main thread busy ~7 s after load (software GL; same with the ad blocker, cosmetic filter, memory limit or cache model off) and swaps
|
||||
its skeleton for the player meanwhile, so the click landed on `<html>`; web.txt now waits until the point hits
|
||||
`#movie_player`. Focus fix: `BrowserWindow::focus_page` drops egui's text focus and attaches the view first.
|
||||
32
Plans/08 WebKit engine/S046-smoke-harness.md
Normal file
32
Plans/08 WebKit engine/S046-smoke-harness.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# S046 — Smoke harness and selftest on the GTK host (hidden nested niri)
|
||||
|
||||
> Category 08 WebKit engine · Model: Opus · Effort: medium · Depends on: S045 · Size: M · Human: no · **cargo** (main target/)
|
||||
> Files touched: tools/smoke.sh, tools/nested-session.sh (new, from spikes/webkit-egui/run/nested.sh), tools/wl-input/ (moved from the spike bin) or src/bin/wl-input.rs, src/selftest.rs, tests/smoke/{launch,basics,input,keys,chrome}.txt, CLAUDE.md §5
|
||||
|
||||
## Goal
|
||||
Every later 08 plan verifies with the smoke harness. Port it to D-035: hidden Xvfb + nested niri + software GL
|
||||
(`SMOKE_VISIBLE=1` keeps the real-GPU path on the user's screen), selftest commands working on WebKit, the five
|
||||
basic scripts green.
|
||||
|
||||
## Read
|
||||
- `tools/smoke.sh` (whole), `src/selftest.rs` header + command dispatcher, `spikes/webkit-egui/run/{nested.sh,spike.sh}`, `docs/engine/webkit-spike.md` "How it was run".
|
||||
|
||||
## Steps
|
||||
- [x] `tools/nested-session.sh start|stop` (Xvfb + niri, config from the spike, throwaway runtime dir, env file) and `smoke.sh` using it instead of a bare Xvfb; keep throwaway HOME/XDG, keyring, fake Discord, `SMOKE_HOME`, `SMOKE_ARGS`, `SMOKE_SIZE` (niri output size via config `mode`), `SMOKE_TIMEOUT`.
|
||||
- [x] Move `wl-input` into the main crate as `src/bin/wl-input.rs` (wayland-client deps in `[dev-dependencies]`/bin-only) or keep it a tiny separate crate under `tools/`; document it.
|
||||
- [x] selftest: `shot` via `grim` on the nested output (or a GTK snapshot of the window); `click`/`rclick`/`pagetype`/`pagescroll` via real input (wl-input/wtype) when available, else GTK synthesized events; `js`/`assert`/`save` over `evaluate_javascript` → `serde_json`.
|
||||
- [x] Make `launch.txt`, `basics.txt`, `input.txt`, `keys.txt`, `chrome.txt` green hidden (fix the app where they fail, script only where the check is Servo-specific).
|
||||
- [x] `SMOKE_VISIBLE=1` path documented and syntax-checked (not run while the user sleeps, D-034).
|
||||
- [x] CLAUDE.md §5 smoke row rewritten (nested niri, software GL, env); §4 pitfalls: drop Xvfb-only notes.
|
||||
- [x] PROGRESS entry, INDEX line, tracker, commit `S046: …`, push.
|
||||
|
||||
## End criteria
|
||||
- `tools/smoke.sh tests/smoke/launch.txt` (and basics, input, keys, chrome) exit 0 hidden; shots Read.
|
||||
- Nothing appears on DP-1 during the runs (`niri msg windows` on the user's niri shows no Nacre window).
|
||||
|
||||
## Pitfalls
|
||||
- `pgrep -f`/`pkill -f` patterns match your own shell command line; wait on pid files.
|
||||
- One nested session at a time (fixed X display number); stop it on every exit path (trap).
|
||||
|
||||
## Handoff (→ PROGRESS.md)
|
||||
Which scripts pass, which are deferred to the plan that ports their feature.
|
||||
32
Plans/08 WebKit engine/S047-page-channel.md
Normal file
32
Plans/08 WebKit engine/S047-page-channel.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# S047 — Page scripts, page messages, find and JS on WebKit
|
||||
|
||||
> Category 08 WebKit engine · Model: Opus · Effort: medium · Depends on: S046 · Size: M · Human: no · **cargo** (main target/)
|
||||
> Files touched: src/engine/*, src/inject.rs, src/app.rs (`install_page_scripts`, `on_page_message`, cosmetic), src/actions.rs (eval, find, autofill, media actions), tests/smoke/{dialogs,stores-*,integ-*}.txt as needed
|
||||
|
||||
## Goal
|
||||
Everything Nacre does inside pages runs on WebKit: user scripts at document start in all frames, user style sheets,
|
||||
the page → browser channel (script message handler `nacre`), `evaluate_javascript` with JSON results, find in page,
|
||||
cosmetic filters, autofill, media actions; Servo-only shims in `inject.rs` dropped.
|
||||
|
||||
## Read
|
||||
- `docs/engine/servo-removal.md` §3.3 (eval, page messages, scripts), §3.7 (inject shims list).
|
||||
- `src/inject.rs` (whole), `src/app.rs` `install_page_scripts` / `on_page_message` / `apply_cosmetic`.
|
||||
|
||||
## Steps
|
||||
- [x] `UserContentManager` per profile: `WebKitUserScript` (document start, all frames) for Nacre's scripts, `WebKitUserStyleSheet` for user styles; reinstall on settings change.
|
||||
- [x] Script message handler `nacre` → `inject::PageMessage` → `Event::PageMessage`; replace the Servo transport in `inject.rs`.
|
||||
- [x] `evaluate_javascript` wrapper returning `serde_json::Value` (JSCValue → JSON string); callers in actions/selftest.
|
||||
- [x] Find bar on `FindController` (count, next/prev, highlight, close).
|
||||
- [x] Drop/re-check the Servo shims listed in servo-removal §3.7 (UA cleanup, SVG colour, WebGL vendor, fonts check, compressor, caret workaround, seek-then-play, navigator fixes) — each removed or kept with a one-line reason.
|
||||
- [x] Smoke: `basics.txt` find steps, `dialogs.txt`, `stores-*`/`integ-*` that use page scripts (autofill, scripts store) green hidden.
|
||||
- [x] PROGRESS entry, INDEX line, tracker, commit `S047: …`, push.
|
||||
|
||||
## End criteria
|
||||
- `cargo test` green; the listed smokes exit 0 hidden; `grep -n "Servo" src/inject.rs` returns nothing.
|
||||
|
||||
## Pitfalls
|
||||
- Scripts in iframes: `WebKitUserContentInjectedFrames::AllFrames`; message handlers registered before views are created.
|
||||
- `evaluate_javascript` returns undefined for statements; selftest scripts expect values.
|
||||
|
||||
## Handoff (→ PROGRESS.md)
|
||||
The JSON result shape and any inject script that changed behaviour.
|
||||
36
Plans/08 WebKit engine/S048-ui-callbacks.md
Normal file
36
Plans/08 WebKit engine/S048-ui-callbacks.md
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# S048 — WebKit UI callbacks: pop-ups, dialogs, menus, permissions, full screen, inspector, PiP
|
||||
|
||||
> Category 08 WebKit engine · Model: Opus · Effort: high · Depends on: S047 · Size: L · Human: no · **cargo** (main target/)
|
||||
> Files touched: src/engine/*, src/app.rs (`on_create_new`, `on_permission`, `on_control`, `on_notification`, fullscreen, PiP), src/tabs.rs, src/ui/{dialogs,menus,mod}.rs, src/ui/pages/devtools.rs, src/store/permissions.rs (`unavailable()`), tests/smoke/{dialogs,basics,integ-*}.txt
|
||||
|
||||
## Goal
|
||||
Every engine request that needs the UI goes through Nacre's egui: pop-ups as tabs/windows (related views), alert/
|
||||
confirm/prompt/beforeunload, file chooser, colour chooser, `<select>` (`show-option-menu`), Nacre's own context menu
|
||||
(`context-menu` + hit test → `PageMenu`), permission requests → `store::permissions`, HTTP auth, notifications,
|
||||
full screen, Web Inspector (replaces the Servo devtools pages), PiP by moving the view (state kept).
|
||||
|
||||
## Read
|
||||
- `docs/engine/servo-removal.md` §3.2 (all request/show rows), §3.10, §3.12 (`ui/menus.rs`, `ui/dialogs.rs`, permissions reasons).
|
||||
- `spikes/webkit-egui/src/main.rs` (`connect_create`, `connect_context_menu`), `src/app.rs` `on_create_new`/`on_permission`/`on_control`, `src/ui/menus.rs` `PageMenu`, `src/ui/dialogs.rs` header.
|
||||
|
||||
## Steps
|
||||
- [x] `create` → `actions::on_navigation` pop-up rules → related view as tab or pop-up window; `close` signal.
|
||||
- [x] `run-dialog` (alert/confirm/prompt/before-unload) and `authenticate` → `tabs::Dialog` egui dialogs, answered asynchronously.
|
||||
- [x] `run-file-chooser` (rfd/portal as today), `run-color-chooser`, `show-option-menu` → existing egui pickers positioned at the element rect.
|
||||
- [x] `context-menu` → `PageMenu` (link/image/selection/editable from `HitTestResult`), actions via `execute_editing_command` + Nacre actions; WebKit's own menu suppressed.
|
||||
- [x] `permission-request` (geolocation, notifications, user media, device info, pointer lock, clipboard, media key system → "later" for Widevine) → `store::permissions`; recompute `unavailable()` reasons for WebKit (remove the Servo 0.7 texts).
|
||||
- [x] `show-notification` → system notification; `enter/leave-fullscreen` → window full screen and chrome hidden.
|
||||
- [x] Web Inspector (`enable-developer-extras`, inspector window attached/detached); `nacre://devtools` console/network either fed from WebKit or replaced by an "Open Web Inspector" page — pick the smaller, record in PROGRESS.
|
||||
- [x] PiP: move the playing view into the PiP window and back (no reload); check page state stays.
|
||||
- [x] Smoke: `dialogs.txt`, `basics.txt` (pop-ups, full screen), PiP steps green hidden; shots of each dialog Read.
|
||||
- [x] PROGRESS entry, INDEX line, tracker, commit `S048: …`, push.
|
||||
|
||||
## End criteria
|
||||
- `cargo test` green; `dialogs.txt` and `basics.txt` exit 0 hidden; a shot of the egui context menu over a page and of a file chooser request Read.
|
||||
|
||||
## Pitfalls
|
||||
- Signal handlers must return quickly; keep the request object (`ScriptDialog`, `PermissionRequest`, `FileChooserRequest`) alive until the egui answer.
|
||||
- `create` must return the new view synchronously.
|
||||
|
||||
## Handoff (→ PROGRESS.md)
|
||||
Which requests are wired, which show "unavailable" and why.
|
||||
36
Plans/08 WebKit engine/S049-adblock-webext.md
Normal file
36
Plans/08 WebKit engine/S049-adblock-webext.md
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# S049 — Ad blocker on WebKit: content filters + web process extension
|
||||
|
||||
> Category 08 WebKit engine · Model: Opus · Effort: high · Depends on: S048 · Size: L · Human: no · **cargo** (main target/)
|
||||
> Files touched: Cargo.toml (workspace member), webext/ (new cdylib crate), src/adblock.rs, src/engine/*, src/app.rs (cosmetic, counts), docs/DESIGN.md (ad blocker section), tests/smoke/{net-adblock,crash-adblock}.txt
|
||||
|
||||
## Goal
|
||||
D-036: network rules compiled once into WebKit content filters (adblock-rust `content-blocking` → Apple JSON →
|
||||
`WebKitUserContentFilterStore`, cached by list hash), cosmetic filters as today, and a minimal web process
|
||||
extension for redirect resources, extra headers, tracking-param strip on subresources and blocked counts. The
|
||||
shield counts and the per-site pause keep working.
|
||||
|
||||
## Read
|
||||
- D-036; `docs/engine/servo-removal.md` §3.6, §3.7 (headers).
|
||||
- `src/adblock.rs` (whole), the adblock parts of `src/app.rs`/`src/actions.rs` (grep `adblock`), `tests/smoke/net-adblock.txt`.
|
||||
|
||||
## Steps
|
||||
- [x] Convert lists with adblock-rust's content-blocking feature; measure rule count and compile time for the default lists; write the JSON, compile with `UserContentFilterStore::save`, load and attach per `UserContentManager`; rebuild on list update; per-site pause = an `ignore-previous-rules` rule for that domain (or detach filters for that view).
|
||||
- [x] Rules the conversion can't express: list them with counts in DESIGN.md; redirect rules → extension.
|
||||
- [x] `webext/`: cdylib web process extension (check crates.io for maintained `webkit6` web-process-extension bindings first; else minimal FFI to `webkit_web_page` `send-request`); gets its config (headers on/off, redirect map, tracking params) from the UI process via `WebContext` initialization user data + messages; `send-request` adds DNT/Sec-GPC/Save-Data, rewrites tracking params, redirects to `nacre-resource:` (URI scheme handler in the UI process serving adblock resources), reports blocked/redirected counts.
|
||||
- [x] Blocked counts: content-filter blocks are invisible to the embedder — count them from the extension (`send-request` sees the request? verify) or from `resource-load-started` vs. finished; document the method and its limits.
|
||||
- [x] Ship/locate the extension: `WebContext::set_web_process_extensions_directory` to the build dir in dev and `$APPDIR/lib/nacre` in packages.
|
||||
- [x] Smoke: `python3 tests/smoke/net/server.py &` + `net-adblock.txt`, `crash-adblock.txt` (as a blocking stress test) green hidden; `privacy-net.txt` header checks green.
|
||||
- [x] RAM check: web process PSS with and without filters on 3 sites (`tools/engine-test/sample.py`), in PROGRESS.
|
||||
- [x] PROGRESS entry, INDEX line, tracker, commit `S049: …`, push.
|
||||
|
||||
## End criteria
|
||||
- `net-adblock.txt` and `privacy-net.txt` exit 0 hidden; the server's `/log` shows blocked URLs never requested and DNT/GPC headers present.
|
||||
- `cargo test` green (conversion has unit tests on a small list).
|
||||
|
||||
## Pitfalls
|
||||
- Content-filter compile of big lists can take seconds: do it off the main thread / cache by hash.
|
||||
- The extension runs in every web process: keep it tiny (no adblock engine there, D-036).
|
||||
- WebKit content filter regex dialect is limited (no lookbehind, etc.).
|
||||
|
||||
## Handoff (→ PROGRESS.md)
|
||||
Conversion coverage numbers, count method, extension load path.
|
||||
60
Plans/08 WebKit engine/S050-net-privacy-downloads.md
Normal file
60
Plans/08 WebKit engine/S050-net-privacy-downloads.md
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
# S050 — Network bridge, HTTPS-only, certificates, error pages, privacy switches, downloads
|
||||
|
||||
> Category 08 WebKit engine · Model: Opus · Effort: medium · Depends on: S049 · Size: M · Human: no · **cargo** (main target/)
|
||||
> Files touched: src/engine/*, src/net/{bridge,download,dlm}.rs (glue only), src/actions.rs (navigation policy, request_headers), src/app.rs, src/ui/pages/misc.rs (error/cert pages), assets/ (error page look), tests/smoke/{net-privacy,net-downloads,net-real,privacy-*,cache*}.txt
|
||||
|
||||
## Goal
|
||||
The network features run on WebKit: proxy = Nacre's bridge (`NetworkProxySettings`), secure DNS through the bridge,
|
||||
HTTPS-only and tracking strip on navigations (`decide-policy`), certificate warning + allow (`load-failed-with-tls-errors`,
|
||||
`allow_tls_certificate_for_host`), Nacre's own error pages (`load-failed` → `load_alternate_html`), third-party cookie
|
||||
policy, Accept-Language, privacy mode switches, Google UA quirk per view, downloads through `net::download`/the
|
||||
download manager stubs, HTTP cache on disk.
|
||||
|
||||
## Read
|
||||
- `docs/engine/servo-removal.md` §3.6, §3.7, §3.12 (error pages); D-014; `src/net/bridge.rs` header; `tests/smoke/net-privacy.txt`, `net-downloads.txt` headers.
|
||||
|
||||
## Steps
|
||||
- [x] Proxy settings to the bridge per session; `NACRE_NO_BRIDGE=1` path; never a real proxy/Tor in tests.
|
||||
- [x] `decide-policy`: navigation actions → `actions::on_navigation` (app scope, external schemes, HTTPS-only upgrade, tracking strip); response policy → downloads (`download` for non-displayable MIME / Content-Disposition).
|
||||
- [x] `download-started` → Nacre's downloads store/UI or the custom manager hand-off; progress, cancel, destination, finished state.
|
||||
- [x] TLS errors → Nacre's certificate warning page; "continue" allows the cert for the host for the run.
|
||||
- [x] Error pages from Nacre's look (port `assets/servo/neterror.html`/`badcert.html` style into `nacre://` pages).
|
||||
- [x] `CookieManager` accept policy (third-party), `set_preferred_languages`, privacy mode Accept-Language, per-view UA quirk.
|
||||
- [x] Loopback/127.0.0.1 and localhost bypass the bridge (today a loopback page ends in "Message was restarted too many times" with the URL rewritten to the bridge port; found in S046); regression smoke.
|
||||
- [x] `net::policy::decide` wired on WebKit (main frames + images), including the images permission (handed over by S049).
|
||||
- [x] `privacy-net.txt` exits 0: `*.nacre.test` through the bridge's DoH, third-party cookies (handed over by S049).
|
||||
- [x] Remove the stale PROGRESS "Later" line about the niri window rule (fixed by D-045, e434bd2).
|
||||
- [x] Navigation policy only for the tab's own (main frame) loads: WebKit's GTK API can't tell iframe navigations apart (`frame_name()` is empty for unnamed iframes), so HTTPS-only, the strip and the UA reload can take over a tab with a frame's URL today. Likely fix: the web process extension tells main-frame loads (found in S050).
|
||||
- [x] Smoke (start `python3 tests/smoke/net/server.py &` / `cache/server.py &`): `net-privacy.txt`, `net-downloads.txt`, `privacy-net.txt`, `privacy-mode.txt`, `cache.txt` + `cache-restart.txt` green hidden.
|
||||
- [x] Rerun the S046–S049 smokes hidden (the old selftest could pass with asserts unanswered): launch, basics, input, keys, chrome, dialogs, pip, auth, stores-*, integ-spell, net-adblock, crash-adblock; fix or log failures.
|
||||
- [x] PROGRESS entry, INDEX line, tracker, commit `S050: …`, push.
|
||||
|
||||
## End criteria
|
||||
- The listed smokes exit 0 hidden; server `/log` shows DoH lookups through the bridge and the HTTPS upgrade.
|
||||
|
||||
## Pitfalls
|
||||
- Never connect to Tor or proxies in tests (CLAUDE.md §4).
|
||||
- `decide-policy` is async-capable: use `use_()`/`ignore()` on the decision, don't block.
|
||||
|
||||
## Handoff (→ PROGRESS.md)
|
||||
What still differs from the Servo-era behaviour.
|
||||
|
||||
## Resume (S050 WIP, 2026-11-13)
|
||||
State in commit `S050 (WIP)`. Verified hidden: `net-privacy.txt` and `net-downloads.txt` exit 0 (every assert answered),
|
||||
`cargo test` 78 + webext 1. `privacy-net.txt`: everything passes except the Google UA quirk assert.
|
||||
- WebKit reaches the bridge over **SOCKS5** (`Bridge::socks_url`; same port, login in the handshake): libsoup sends plain
|
||||
http to an HTTP proxy without the password and then GETs the proxy itself (the S046 "restarted too many times" bug).
|
||||
Loopback skips the proxy (`LOOPBACK` in host.rs).
|
||||
- Third-party cookies: WebKit's NoThirdParty only stops storing; ITP (`set_itp_enabled`) keeps existing cookies off
|
||||
cross-site requests. Cookies without SameSite are Lax in WebKit, and None needs Secure (https only), so the cookie
|
||||
part of privacy-net now runs on https with `cdn.other.test` (server cert + DNS stub extended).
|
||||
- selftest: `js`/`assert`/`save` now wait for the page's answer (before, a run could quit with asserts unanswered and
|
||||
still pass; S046–S049 smokes may hide failures, rerun them).
|
||||
- Open: (1) the main-frame box above; (2) UA quirk: `Engine::set_view_user_agent` swaps in a copied `Settings` with
|
||||
Firefox's UA, the navigation is reloaded, but the request still carries WebKit's UA (check whether WebKit reads
|
||||
`user-agent` from a view's new settings; else a per-view `set_settings` before the first load, or the extension
|
||||
setting User-Agent in `send-request` for accounts.google.com); (3) `privacy-mode.txt`, `cache.txt` +
|
||||
`cache-restart.txt` not run yet; (4) PROGRESS/INDEX/final commit.
|
||||
- Not done on purpose: WebKit-only (`blob:`) downloads don't ask where to save and can't pause.
|
||||
|
||||
Closed 2026-11-13: every open item above done (PROGRESS "S050").
|
||||
33
Plans/08 WebKit engine/S051-profile-cookies-media.md
Normal file
33
Plans/08 WebKit engine/S051-profile-cookies-media.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# S051 — Profile folder, sealed cookies, site data, incognito, media source
|
||||
|
||||
> Category 08 WebKit engine · Model: Opus · Effort: medium · Depends on: S050 · Size: M · Human: no · **cargo** (main target/)
|
||||
> Files touched: src/paths.rs, src/store/cookies.rs, src/app.rs (`servo_first_setup`, `clear_on_exit`, media), src/actions.rs (`clear_data`, site info), src/media.rs, src/ui/pages/{misc,settings}.rs (texts), tests/smoke/{cookies*,restore,privacy-incognito}.txt
|
||||
|
||||
## Goal
|
||||
Decisions D-037, D-038, D-039 implemented: profile folder `nacre-browser` with a one-time move from `nacre-servo`;
|
||||
WebKit's cookie DB on tmpfs sealed into `cookies.bin`; `WebsiteDataManager` for clear data (with dates) and site
|
||||
info; incognito = ephemeral `NetworkSession`; media state from the page probe + `is-playing-audio`/`set_is_muted`,
|
||||
one MPRIS player.
|
||||
|
||||
## Read
|
||||
- D-019, D-037, D-038, D-039; `docs/engine/servo-removal.md` §3.8, §3.9; `src/paths.rs`, `src/store/cookies.rs` (whole); `tests/smoke/cookies.txt` header.
|
||||
|
||||
## Steps
|
||||
- [x] `paths.rs`: `APP_DIR = "nacre-browser"`; migration (rename config/data/cache once if new missing and old present; delete Servo-only engine files after; log it); unit test with temp dirs; `~/.config/nacre` never touched.
|
||||
- [x] Cookies: persistent storage path in `$XDG_RUNTIME_DIR/nacre-<profile>/cookies.sqlite`; at start decrypt `cookies.bin` → `add_cookie` (or write the SQLite) ; seal at quit and 60 s after `changed`; no keyring → run-only; convert Servo-era `cookies.bin` when it parses, else move aside.
|
||||
- [x] Clear data / clear on exit / site info flyout on `WebsiteDataManager` (types + since-time) and `CookieManager::get_cookies`; drop the "Servo keeps no dates" text.
|
||||
- [x] Incognito: ephemeral session, nothing written; check the throwaway home after a run.
|
||||
- [x] Media: probe events + `is-playing-audio` → media state; mute via `set_is_muted`; check whether WebKitGTK publishes its own MPRIS player (`busctl --user list | grep mpris` in the nested bus) and apply D-039 (one player).
|
||||
- [x] Smoke: `cookies.txt` → `cookies-restart.txt` → `cookies-cleared.txt` with `SMOKE_KEYRING=1`, `cookies-nokeyring.txt`, `restore.txt`, `privacy-incognito.txt` green hidden; `grep -c` of a test cookie value in the home dir = 0.
|
||||
- [x] PROGRESS entry, INDEX line, tracker, commit `S051: …`, push.
|
||||
|
||||
## End criteria
|
||||
- Listed smokes exit 0; no plain cookie value anywhere under the throwaway home (grep); migration unit test green.
|
||||
|
||||
## Pitfalls
|
||||
- Never touch the user's real profile; tests use throwaway homes only.
|
||||
- WebKit may write `cookies.sqlite-wal`/`-shm` next to the DB: all on tmpfs.
|
||||
|
||||
## Handoff (→ PROGRESS.md)
|
||||
Migration behaviour, seal timing, MPRIS outcome (which player).
|
||||
|
||||
27
Plans/08 WebKit engine/S052-tuning-defaults.md
Normal file
27
Plans/08 WebKit engine/S052-tuning-defaults.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# S052 — WebKit tuning defaults, background tabs, memory check
|
||||
|
||||
> Category 08 WebKit engine · Model: Sonnet · Effort: high · Depends on: S051 · Size: S · Human: no · **cargo** (main target/)
|
||||
> Files touched: src/engine/*, src/app.rs (`rest_background_tabs`), src/store/settings.rs (freeze/limited rows), src/ui/pages/settings.rs (texts), docs/engine/tune/README or engine-comparison.md (new row)
|
||||
|
||||
## Goal
|
||||
D-040 defaults in the engine setup with env overrides; background tabs really rest (WebKit can suspend/freeze
|
||||
hidden views — the old "limited" setting row comes back); RAM of Nacre measured against the D-032 tune data.
|
||||
|
||||
## Read
|
||||
- D-032, D-040; `docs/engine/tune/` (base and mem500/no-page-cache rows); `tools/engine-test/run.sh` header, `sample.py` header; `src/app.rs` `rest_background_tabs`.
|
||||
|
||||
## Steps
|
||||
- [x] Defaults: page cache off, memory pressure 500 MB, cache model DocumentViewer, HW policy default; `NACRE_WK_*` overrides; log the effective values at start.
|
||||
- [x] Background tabs: hidden views frozen/suspended after the setting's delay (check the WebKitGTK 2.54 API: `WebView` visibility already throttles; web process suspension if available); settings texts updated.
|
||||
- [x] Measure: Nacre hidden with the tune site list (`tools/engine-test/tune-sites.txt`, 10 tabs, idle phase) with `sample.py`; compare to the tune "mem500/no-page-cache" rows; write the row and the comparison (software GL caveat for VRAM).
|
||||
- [x] Slow-connection pass (user, 2026-11-13: "everything is slow with my internet … someone with my internet should be able to use the browser smoothly"; reloads and revisits felt uncached): with a throttled local server (e.g. `tc netem` on a veth/loopback test namespace or a server that paces bytes; never a proxy), measure first visit, revisit, reload and back/forward for the default cache model and page cache on/off; make sure revisits come from the HTTP disk cache (S050 moved the default to DocumentBrowser), DNS prefetch and preconnect are on, and back/forward doesn't refetch if the RAM cost of the page cache is acceptable (record the trade-off and pick; amend D-040). Times in PROGRESS.
|
||||
- [x] PROGRESS entry, INDEX line, tracker, commit `S052: …`, push.
|
||||
|
||||
## End criteria
|
||||
- Start log shows the four values; the measurement row is in the doc; `launch.txt`/`basics.txt` still green.
|
||||
|
||||
## Pitfalls
|
||||
- Never run the measurement alongside cargo; one engine run at a time.
|
||||
|
||||
## Handoff (→ PROGRESS.md)
|
||||
Nacre's PSS vs the tune data and what dominates.
|
||||
35
Plans/08 WebKit engine/S053-servo-removal.md
Normal file
35
Plans/08 WebKit engine/S053-servo-removal.md
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# S053 — Remove Servo: vendor crates, gst-mse, Servo-only tests/tools, docs and texts
|
||||
|
||||
> Category 08 WebKit engine · Model: Sonnet · Effort: high · Depends on: S056 (moved ahead of S051/S052 by the user, 2026-11-13) · Size: M · Human: no · **cargo** (main target/)
|
||||
> Files touched: Cargo.toml ([patch] epaint), vendor/, build.rs, src/resources.rs, assets/servo/, tools/gst-mse.sh, tests/gst-mse/, tests/smoke/{mse*,painters*,youtube-mse,crash-adblock}.txt, docs/{DESIGN,REVIEW,FEATURES}.md, docs/S027-handoff.md, docs/engine/{mse-spike,privacy-mode}.md, CLAUDE.md §2/§4/§5, PLAN.md, src/ui/pages/{settings,misc}.rs (texts), spikes/webkit-egui/
|
||||
|
||||
## Goal
|
||||
`docs/engine/servo-removal.md` §2, §4, §5, §7 steps 3–4: everything Servo-only leaves the repo, docs describe the
|
||||
WebKit engine, user-visible texts say WebKit. MSE test pages are kept as plain MSE tests.
|
||||
|
||||
## Read
|
||||
- `docs/engine/servo-removal.md` §2, §4, §5, §3.12 (texts); CLAUDE.md §2, §4, §5.
|
||||
|
||||
## Steps
|
||||
- [x] Delete `vendor/servo-*`, `vendor/gst-mse` (keep `docs/engine/gst-mse-patches.md`), `src/resources.rs`, `assets/servo/`; remove `vendor/epaint` + its patch, rebuild, check egui text (gallery smoke shot).
|
||||
- [x] Delete `tools/gst-mse.sh`, `tests/gst-mse/`, `mse-off.txt`, `mse-leak-check.sh`, `painters*.txt`; port `mse.txt`/`mse-player.txt`/`youtube-mse.txt` without leak/log checks; keep `crash-adblock.txt` as a blocking stress test; update `privacy-net.txt` header.
|
||||
- [x] Docs: DESIGN.md WebKit cheat sheet replaces the Servo one; Engine limits rewritten; Servo patch sections removed; REVIEW.md Servo items removed; FEATURES.md states reset to "re-verify on WebKit" where they were verified on Servo; remove `docs/S027-handoff.md`, `docs/engine/mse-spike.md`; `privacy-mode.md` Servo part marked historical.
|
||||
- [x] CLAUDE.md §2 facts (WebKit, GTK host, no Servo), §4 pitfalls (no clang/SpiderMonkey/hours-long builds; nested niri), §5 tools; PLAN.md goal/out-of-scope (printing, private mode, 3rd-party cookies now possible; Widevine later).
|
||||
- [x] User-visible texts (settings About/engine row, misc pages, task manager) say WebKitGTK + version.
|
||||
- [x] Remove `spikes/webkit-egui/` (its harness lives in tools/ since S046); keep `docs/engine/webkit-spike.md`.
|
||||
- [x] `nice cargo build --release -j 2`, `cargo test`, smokes launch/basics/input/chrome/gallery/mse green hidden.
|
||||
- [x] PROGRESS entry, INDEX line, tracker, commit `S053: …`, push.
|
||||
|
||||
## End criteria
|
||||
- `grep -rni "servo" src Cargo.toml build.rs tools tests/smoke | grep -v -i "nacre-servo"` empty except the migration code in `paths.rs`; build/test/smokes green.
|
||||
|
||||
## Pitfalls
|
||||
- History docs (PROGRESS, DECISIONS, docs/review) stay untouched.
|
||||
- Don't delete `docs/engine/engine-comparison*`, `tune/`, `runs/` (decision record).
|
||||
|
||||
## Handoff (→ PROGRESS.md)
|
||||
Final file list removed; any doc left with Servo wording on purpose.
|
||||
|
||||
|
||||
## Resume (2026-11-14, orchestrator)
|
||||
Boxes 1–6 done in 38fd033 (deletions), 3664431 (texts), efe3815 (docs, CLAUDE.md) — ticked by the orchestrator from the commits; the session stopped at the usage limit before verifying. Resume at box 7: build, `cargo test`, smokes; fix anything the deletions broke, then close out.
|
||||
37
Plans/08 WebKit engine/S054-site-pass.md
Normal file
37
Plans/08 WebKit engine/S054-site-pass.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# S054 — Site pass on WebKit vs Chromium reference
|
||||
|
||||
> Category 08 WebKit engine · Model: Opus · Effort: high · Depends on: S053 · Size: M · Human: no (visible GPU part only when the user is awake) · runs the built app; cargo only for fixes
|
||||
> Files touched: fixes in src/ as found, tests/smoke/{heavy-web,site-doctor,https}.txt, docs/engine/site-pass-webkit.md (new)
|
||||
|
||||
## Goal
|
||||
D-030/D-031: the daily sites run about as well as in Chromium. For each site, Nacre's hidden shot and the Chromium
|
||||
reference (Claude browser pane at the same width) side by side, every visible difference fixed or listed.
|
||||
Supersedes the Servo-era site work of S041 for the engine part.
|
||||
|
||||
## Read
|
||||
- D-030, D-031, D-035; `tests/smoke/heavy-web.txt`, `site-doctor.txt` headers; `docs/engine/webkit-spike.md` Unproven list.
|
||||
|
||||
## Steps
|
||||
- [x] Site list: YouTube (home, watch, search, Shorts), Reddit, Discord web, GitHub, Wikipedia, DuckDuckGo, Google search + sign-in page, a news site, Twitch, a maps site; size 1280x800.
|
||||
- [x] Hidden Nacre shots (`heavy-web.txt`, `site-doctor.txt` extended) + Chromium pane shots at the same width; Read each pair; list differences in `docs/engine/site-pass-webkit.md`.
|
||||
- [x] Fix Nacre-side causes (UA, scripts, chrome overlap, input); WebKit engine differences listed, not patched.
|
||||
- [x] Interaction checks per site: video plays/seeks/full screen, sign-in form typing, infinite scroll, context menu, pop-up sign-in windows.
|
||||
- [ ] GPU path (D-035 unproven): if the user is awake and asks, a `SMOKE_VISIBLE=1` run of the watch page with stats (60 fps video under the overlay, dmabuf path); else write it as open in PROGRESS.
|
||||
- [ ] PROGRESS entry, INDEX line, tracker, commit `S054: …`, push.
|
||||
|
||||
## End criteria
|
||||
- `docs/engine/site-pass-webkit.md` has a row per site with both shots' paths and every difference (fixed/open); `heavy-web.txt` exits 0 hidden.
|
||||
|
||||
## Pitfalls
|
||||
- Never connect to Tor or proxies; sign in only with test data, never the user's accounts.
|
||||
- The pane's viewport under 768 px emulates a phone: keep ≥ 1024.
|
||||
|
||||
## Handoff (→ PROGRESS.md)
|
||||
Open differences ranked by daily impact.
|
||||
|
||||
## Resume (WIP)
|
||||
Boxes 1–2 done: `tests/smoke/site-pass.txt`, `docs/engine/site-pass-webkit.md` (pairs table), shots in
|
||||
`docs/engine/site-pass/`. Box 3: autoplay allowed and default UA `Version/26.0` (Discord) in `src/engine/host.rs`,
|
||||
built, tests 86+1 green. Box 4: `tests/smoke/site-interact.txt` passes every check, but the UI process segfaults
|
||||
inside WebKit during the Discord step after the full sequence (twice; not with Reddit→pop-up→Discord alone):
|
||||
coredumpctl nacre, symbolize with gdb + debuginfod; bisect the sequence.
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue