From 09233cdaf3191a84f6a82eff0420231e7e48e606 Mon Sep 17 00:00:00 2001
From: astar76
Date: Wed, 18 Nov 2026 04:55:53 -0600
Subject: [PATCH] S061: site menus win on every right click, menu keys, pop-ups
need a click, ad frames can't take the tab
WebKit asks for a menu on cancelled right clicks once it has shown one; the bridge
script's answer decides now. Script navigations that may be a frame's are no longer
rewritten into loads in the tab (an ad frame took the tab over on the user's site).
Co-Authored-By: Claude Opus 5.5
---
CLAUDE.md | 1 +
.../S061-site-menus-clickthrough.md | 12 +--
Plans/INDEX.md | 2 +-
docs/DECISIONS.md | 1 +
docs/PROGRESS.md | 9 +++
src/actions.rs | 24 +++++-
src/app.rs | 66 +++++++++++++++--
src/engine/host.rs | 16 +++-
src/engine/mod.rs | 10 ++-
src/inject.rs | 4 +
src/selftest.rs | 11 +++
src/tabs.rs | 18 +++++
src/ui/menus.rs | 38 +++++++++-
tests/smoke/ctxmenu.txt | 74 ++++++++++++++++++-
tests/smoke/net/server.py | 18 +++++
tests/smoke/pages/frame-ad.html | 6 ++
tests/smoke/pages/frame-hijack.html | 8 ++
tests/smoke/pages/player-ad.html | 18 +++++
tests/smoke/pages/site-menu.html | 27 +++++++
tests/smoke/player-ad.txt | 37 ++++++++++
20 files changed, 372 insertions(+), 28 deletions(-)
create mode 100644 tests/smoke/pages/frame-ad.html
create mode 100644 tests/smoke/pages/frame-hijack.html
create mode 100644 tests/smoke/pages/player-ad.html
create mode 100644 tests/smoke/pages/site-menu.html
create mode 100644 tests/smoke/player-ad.txt
diff --git a/CLAUDE.md b/CLAUDE.md
index 0c7154d..f817ff3 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -78,6 +78,7 @@ Never modify: `~/Documents/Apps/Nacre` (the original Python Nacre, reference onl
| `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//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 /session/runtime)/bus list`). Offline, hidden | now (S051) |
| `tools/smoke.sh tests/smoke/pip.txt` (+ `tools/hidden.sh tests/smoke/pip.txt -- tests/smoke/pip-driver.sh`: `/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-.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 `. Hidden only, offline | now (S061) |
| `tools/hidden.sh
+
+The page stays here.
+
+
+
+
+
+
+Player: own menu, then the browser's
+Chat: always its own menu
+Plain text: the browser's menu
+
+
+