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:
astar76 2026-11-18 06:34:46 -06:00
commit d35837743a

View file

@ -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).