S068: page isn't responding bar (Wait, Reload page), crash pages show the reason, PiP crash returns the tab, pages.log for hangs; hang.txt smoke
Code landed in 41eb7d4 (swept into the plans: S070 commit); this commit adds the docs, plan ticks and index line.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
41eb7d4c8f
commit
d35837743a
4 changed files with 16 additions and 7 deletions
|
|
@ -64,7 +64,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=<file>` runs script commands (listed at its top) | now |
|
||||
| `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; `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), 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); 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) |
|
||||
| `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; `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), 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) and crash pages for the active, a hidden and a PiP tab, hidden only, offline, `SMOKE_SIZE=1280x900`); 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) |
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ User report (2026-11-18): the old page freeze (page dead, chrome fine; S048/S056
|
|||
- webkit6 0.6.1 docs for `WebView::is_web_process_responsive` / `notify::is-web-process-responsive` and `terminate_web_process`
|
||||
|
||||
## Steps
|
||||
- [ ] Engine: watch `notify::is-web-process-responsive` per view → `Event::Responsive(id, bool)`; log one line with URL and time on each change.
|
||||
- [ ] UI: when the active tab's process stays unresponsive > 5 s, a bar over the page: "This page isn't responding" · Wait · Reload page (terminate the web process, then reload); it clears itself when the page answers. Hidden tabs get the bar when shown.
|
||||
- [ ] Crash page check: terminated (crash, `ExceededMemoryLimit`) → crash page with the reason and Reload, also for hidden tabs and tabs in PiP; `pages.log` line (fix if any path misses it).
|
||||
- [ ] `tests/smoke/pages/hang.html` (a button that busy-loops 20 s) + `tests/smoke/hang.txt` (offline): bar shows, Reload page recovers, a second tab stays usable; a crashed view (selftest kills the web process) shows the crash page.
|
||||
- [ ] PROGRESS entry (answer to "was it OOM": the log facts above), INDEX line, tracker, commit `S068: …`, push.
|
||||
- [x] Engine: watch `notify::is-web-process-responsive` per view → `Event::Responsive(id, bool)`; log one line with URL and time on each change.
|
||||
- [x] UI: when the active tab's process stays unresponsive > 5 s, a bar over the page: "This page isn't responding" · Wait · Reload page (terminate the web process, then reload); it clears itself when the page answers. Hidden tabs get the bar when shown.
|
||||
- [x] Crash page check: terminated (crash, `ExceededMemoryLimit`) → crash page with the reason and Reload, also for hidden tabs and tabs in PiP; `pages.log` line (fix if any path misses it).
|
||||
- [x] `tests/smoke/pages/hang.html` (a button that busy-loops 20 s) + `tests/smoke/hang.txt` (offline): bar shows, Reload page recovers, a second tab stays usable; a crashed view (selftest kills the web process) shows the crash page.
|
||||
- [x] PROGRESS entry (answer to "was it OOM": the log facts above), INDEX line, tracker, commit `S068: …`, push.
|
||||
|
||||
## End criteria
|
||||
- `cargo test` green; `hang.txt` exit 0, shots show the bar and the crash page.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Dropped with Servo (D-032): S011, S029, S030, S032, S033, S037, S038.
|
|||
|
||||
## 10 Hardening (after 09; one at a time: S068, S067, S069, S070)
|
||||
- [ ] [S067 — Passwords ask for your account password](10%20Hardening/S067-os-password-gate.md) · Opus high · 🧑
|
||||
- [ ] [S068 — "Page isn't responding" and crash pages that show](10%20Hardening/S068-page-unresponsive.md) · Opus medium
|
||||
- [x] [S068 — "Page isn't responding" and crash pages that show](10%20Hardening/S068-page-unresponsive.md) · Opus medium
|
||||
- [ ] [S069 — Keep VRAM use small](10%20Hardening/S069-vram.md) · Opus medium
|
||||
- [ ] [S070 — Media pass: now playing priority, previews, media keys, PiP, controls](10%20Hardening/S070-media-pass.md) · Opus medium · 🧑
|
||||
|
||||
|
|
|
|||
|
|
@ -536,6 +536,15 @@ Later: S010 list: user checks the Discord icon with their own client (the Discor
|
|||
- Not done: 🧑 the user looking at the pairs (box unticked). No tokens in `theme.rs` changed.
|
||||
- Remaining nits to look at: gallery's "Card with rows" is wider than the swatch grid; sub-page titles start at 436 (after the back arrow), not 408; the first manager row is ~4 px taller than the others.
|
||||
|
||||
## S068 — Page isn't responding, crash pages (2026-11-18)
|
||||
- Was the old freeze OOM? No: no oom-kill in the kernel log since Nov 10 and no `pages.log` in the user's profile, so no web process was killed or crashed in daily use; a hung (busy) process showed nothing, which is what this adds.
|
||||
- Hang: WebKit's `is-web-process-responsive` → `Event::Responsive` (host.rs); `App::on_responsive` keeps `tab.unresponsive` (since when) and logs "not responding <url>" / "responding again <url> after N s" to stderr and `pages.log`. After `ui::dialogs::HANG_AFTER` (5 s) a bar over the active page: "This page isn't responding" · Wait (bar returns after another 5 s if still stuck) · Reload page (`View::terminate` + reload; with pop-ups sharing the process the bar says how many other tabs it stops, `tab.process`). Clears itself when the page answers.
|
||||
- Gotcha: WebKit marks a page responsive as soon as its tab is hidden, busy or not, and only checks again on input (≈3 s after it). A "responsive" for a hidden tab is therefore checked with a script ping; its answer (when the page is done) clears the flag, so the bar is back when the tab is shown.
|
||||
- Crash: crash page shows the reason (crash / memory limit / stopped) with Reload; a tab in PiP closes the PiP window first; audio/media state cleared; `pages.log` line on every path (helper `App::page_log`).
|
||||
- Smoke: `tests/smoke/hang.txt` + `pages/hang.html` (hidden, offline, `SMOKE_SIZE=1280x900`): bar, second tab usable, bar back on return, Reload page, Wait + self-clear, crash pages active/hidden/PiP. Selftest `cmd hang_wait|hang_reload|kill_page [n]`, status `unresponsive` (seconds).
|
||||
- Verified: `hang.txt` exit 0 (`target/smoke/s068-hang-6`), shots read; `cargo test` 94 + webext 1.
|
||||
- Not done: a real SIGSEGV/memory-limit kill (selftest uses `terminate_web_process`, reason "stopped"; same code path); bar buttons pressed by `cmd`, not by a tap; no unit test (the state lives in `App`); no visible run.
|
||||
|
||||
## Later
|
||||
- A link followed inside a frame still goes through the tab's navigation policy (WebKit's GTK API has no frame info; S050).
|
||||
- file:// media outside the XDG user folders doesn't play (WebKit sandbox, D-043).
|
||||
|
|
|
|||
Loading…
Reference in a new issue