From b7d1dbcc2f08b587a09c20ef2841470766c99b03 Mon Sep 17 00:00:00 2001 From: astar76 Date: Fri, 13 Nov 2026 06:14:17 -0600 Subject: [PATCH] S046: smoke harness in a hidden nested niri, real selftest input, local media in the sandbox - tools/nested-session.sh (Xvfb -> nested niri, own display/runtime dir, xresize for SMOKE_SIZE); smoke.sh and hidden.sh run in it; wl-input moved to tools/wl-input (own crate) - selftest: click/rclick/pagescroll via wl-input, pagetype via wtype, resize via the nested niri - WebKit sandbox: XDG user dirs (+ test pages in scripted runs) read-only so file:// media plays (D-043) - SMOKE_VISIBLE needs the user's niri window rule, never moves focus (D-044) - launch, basics, input, keys, chrome green hidden Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 6 +- Plans/08 WebKit engine/S046-smoke-harness.md | 14 +- .../S050-net-privacy-downloads.md | 1 + Plans/INDEX.md | 2 +- docs/DECISIONS.md | 2 + docs/PROGRESS.md | 10 + src/engine/host.rs | 34 +++ src/selftest.rs | 108 +++++++- tests/smoke/pages/input.html | 2 +- tools/hidden.sh | 20 +- tools/lib/xresize.py | 29 +++ tools/nested-session.sh | 97 ++++++++ tools/smoke.sh | 98 +++++--- tools/wl-input/Cargo.lock | 230 ++++++++++++++++++ tools/wl-input/Cargo.toml | 14 ++ tools/wl-input/src/main.rs | 169 +++++++++++++ 16 files changed, 764 insertions(+), 72 deletions(-) create mode 100644 tools/lib/xresize.py create mode 100755 tools/nested-session.sh create mode 100644 tools/wl-input/Cargo.lock create mode 100644 tools/wl-input/Cargo.toml create mode 100644 tools/wl-input/src/main.rs diff --git a/CLAUDE.md b/CLAUDE.md index d69c841..16c3b8a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -54,7 +54,7 @@ Never modify: `~/Documents/Apps/Nacre` (the original Python Nacre, reference onl - **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. +- 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. @@ -67,7 +67,7 @@ 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=` runs script commands (listed at its top) | now | -| `tools/smoke.sh