orchestrator: S056 daily-use fixes from the user's first WebKit test (after S050)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
astar76 2026-11-13 19:32:29 -06:00
commit cc42e1bde6
2 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,52 @@
# S056 — Daily-use fixes from the user's first WebKit test
> Category 08 WebKit engine · Model: Opus · Effort: high · Depends on: S050 · Size: M · Human: no · **cargo** (main target/)
> Files touched: src/egui_area.rs, src/app.rs, src/engine/*, src/actions.rs (PiP, page menu), src/keys.rs, src/ui/ (PiP controls, page menu), src/inject.rs (PiP page script), tests/smoke/*
## Goal
The user tried the WebKit build on their own niri desktop (2026-11-13) and hit problems that block daily use. Fix them
and prove each one with a visible run on DP-1 (D-045: focus changes are fine) plus a hidden regression smoke where possible.
User's report (screenshots in the orchestrator session):
1. **Freeze**: after working in another window and coming back, Nacre no longer reacts (only closing the window
works). Terminal: `Gdk-WARNING: Duplicate call to gdk_frame_timings_presented() with different values:
presentation time is 293.767ms off from expected`. A YouTube video was playing in PiP at the time.
2. **Mouse side buttons** (back/forward, buttons 8/9) don't navigate over the page. Check every other binding the
Servo build had (keys.rs table, mouse, wheel+Ctrl zoom, middle click on links/tabs) actually reaches WebKit views.
3. **Picture in picture is the whole page in a second window**, not a video. Make it real PiP: only the video,
window sized to the video's aspect ratio (small default, e.g. 480 px wide, remembered), floating on niri. The user
noticed it already looks right if the site is put into full screen first: use that (element full screen of the
`<video>` routed into the PiP window instead of the main window) or an equivalent page-side approach. niri floats
a toplevel that has a parent (transient-for) or matches a window rule; prefer the parent/dialog route so no user
config is needed; give the PiP window its own app-id/title so a user rule can still target it. Test on a nested
niri with floating checked (`niri msg windows` shows `is_floating`), then visibly.
4. **PiP controls** (rewind, play/pause, forward, mute, return) are plain egui buttons in a box: restyle them to
Nacre's Material style (tokens and widgets from S015/S016, `nacre://gallery`), shown on hover over the video.
5. **Page context menu**: when a site shows its own right-click menu (YouTube player), Nacre's menu pops up too.
The site's menu wins: Nacre's menu only when the page didn't handle `contextmenu` (WebKit's `context-menu` signal
only; never open Nacre's menu from a raw GTK/egui right click over the page).
6. **Spelling underlines** draw over/through text in an egui text field (red wavy line across "can webkit gtk u…"):
check the underline's baseline and clip in the field.
## Read
- `docs/engine/webkit-spike.md` (input, pick), D-043–D-046, the last 3 PROGRESS entries.
- `src/egui_area.rs` (frame clock, render, input), `src/actions.rs` `enter_pip`/`exit_pip`/`eval_pip`, `src/keys.rs`.
## Steps
- [ ] Freeze: reproduce (visible: play a video, PiP, focus another window ~1 min, come back; also hidden: unmap/map, occlusion) with logs of the egui render/idle pump and frame clock; fix the cause; regression smoke if reproducible hidden.
- [ ] Side buttons 8/9 → back/forward over web views and chrome; audit every binding from keys.rs and the Servo-era mouse handling against WebKit views; list results in PROGRESS.
- [ ] Real PiP: video only, aspect-ratio window, remembered size/position, floating on niri without user config (parent or equivalent), own app-id; return restores the page state without reload.
- [ ] PiP controls restyled to the Material tokens/widgets, hover-shown; dark and light shots read.
- [ ] Context menu: site-handled `contextmenu` shows only the site's menu; Nacre's otherwise. Smoke page with both cases.
- [ ] Spelling underline position/clip in egui text fields fixed; shot read.
- [ ] Visible run on DP-1 of all the above (shots read), hidden smokes green (launch, basics, input, keys, pip).
- [ ] PROGRESS entry, INDEX line, tracker, commit `S056: …`, push.
## End criteria
- Each fix shown by a shot or a smoke; the freeze scenario survives 3 visible repeats.
## Pitfalls
- Another session (caelestia-niri) shares the machine: never touch niri/caelestia config or processes; short visible runs.
- Never connect to Tor or proxies in tests.
## Handoff (→ PROGRESS.md)
Bindings audit table; how PiP floats on niri; the freeze cause.

View file

@ -14,6 +14,7 @@ Engine switch to WebKit (D-032): new category `08 WebKit engine` comes first; Se
- [x] [S048 — WebKit UI callbacks: pop-ups, dialogs, menus, permissions, full screen, inspector, PiP](08%20WebKit%20engine/S048-ui-callbacks.md) · Opus high
- [x] [S049 — Ad blocker on WebKit: content filters + web process extension](08%20WebKit%20engine/S049-adblock-webext.md) · Opus high
- [ ] [S050 — Network bridge, HTTPS-only, certificates, error pages, privacy switches, downloads](08%20WebKit%20engine/S050-net-privacy-downloads.md) · Opus medium
- [ ] [S056 — Daily-use fixes from the user's first WebKit test: freeze, side buttons, real PiP, page menu](08%20WebKit%20engine/S056-daily-use-fixes.md) · Opus high
- [ ] [S051 — Profile folder, sealed cookies, site data, incognito, media source](08%20WebKit%20engine/S051-profile-cookies-media.md) · Opus medium
- [ ] [S052 — WebKit tuning defaults, background tabs, memory check](08%20WebKit%20engine/S052-tuning-defaults.md) · Sonnet high
- [ ] [S053 — Remove Servo: vendor crates, gst-mse, Servo-only tests/tools, docs and texts](08%20WebKit%20engine/S053-servo-removal.md) · Sonnet high