Closed bug report

Toast/permission click while ab is in the tray: no record in the Activity Log (suspended webview drops it), and in embedded mode the click should reveal ah, not ab

John Lauer · 2mo ago ·closed by John Lauer

John, 2026-09-09: two things wrong with what happens when you click an ab toast or permission prompt while ab is hidden in the tray.

1. The window comes forward with no record of what you clicked

The Activity Log is frontend-only: every emitter calls app.emit("activity-log", ...) and the webview appends a DOM row. Nothing is stored on the Rust side. A tray-hidden ab runs with a suspended webview (webview_lowmem.rs, TrySuspend), so every entry emitted while hidden is dropped: the toast you are about to click, the permission prompt that woke you, the command that caused it. Click the toast, ab comes forward, the log shows nothing about it.

Fix (2.1.80): a backend ring buffer (activity.rs, 500 entries, process lifetime). Every one of the ~80 emitters now goes through ActivityEmit::emit_activity, which records first and emits second; entries carry a monotonic seq. The frontend replays get_activity_backlog {sinceSeq} on boot, on becoming visible/focused, and on the activity-refresh nudge the click reveal sends; seq makes the replay idempotent. The default body-click URI now carries the toast's correlation id (adom-bridge://toast/open?id=...), the toast's own log line carries it as cmdId, and the reveal fires activity-focus {id} so the log scrolls to and flashes the line for the toast you clicked. The reveal itself writes a line ("revealed Adom Bridge" / "revealed Hydrogen") with the same cmdId, so it groups with the toast under the existing rail.

2. In embedded mode the click should reveal ah, not ab

dispatch_adom_uri's raise showed ab's window unconditionally. When ab runs under Hydrogen, every card ab raises is mirrored into ah (shell, web-consent, mesh-join, firewall all go through permission_mirror::request -> hd_bridge::mirror_permission_request) and ah is the app in charge; popping ab over it answered the click with the wrong app. The per-toast focus:{host:true} opt-in already existed, but nobody sets it and the cards don't use it.

Fix (2.1.80): when embedded::is_embedded_now() and Hydrogen has a window (hd_companion::hd_running_window), the reveal foregrounds Hydrogen and leaves ab where it is. No ah window right now (mid-relaunch) -> fall back to ab, so a click is never a dead end. Applies to the toast body, the shell-approval body and the web-consent body clicks; the decision buttons (approve/deny/notify-response) still never raise anything, per 1.9.195.

Not changed: what ah itself keeps as a record of a toast. ab's log now has it; whether ah wants its own history is hydrogen's call.

2 Replies

John Lauer · 2mo ago

Shipped as 2.1.80 (insiders), commit 2b0de355. Fleet: winvm (canary, through the real embedded update path: deployed=2.1.80, setup() completed at 10:12:05), ConfRoomROG, AdomLapper. Public manifest untouched (2.1.29). test-via-gallia: 62 clean.

Proof, on winvm (ab embedded under Hydrogen 1.0.293, nobody at the box)

Reveal ah, not ab. With ab's window at z0 over Hydrogen, I launched the exact URI a toast body click sends (adom-bridge://toast/open?id=ralph-2180-051702). Window z-order after:

z 0 | hydrogen.exe    | Hydrogen v1.0.293 ...
z 1 | adom-bridge.exe | Adom Bridge v2.1.80 ...

and ab's own log recorded it: 10:17:41 NOTIFICATION notification body click (default open gesture): revealed Hydrogen (ab is embedded, ah is in charge).

Record survives the tray. desktop_window_hide → 12 s (the lowmem watcher suspends the hidden webview) → notify_user (answered displayed) → desktop_window_show → filter the Activity Log on the toast's title: 5 matching entries, including the ones emitted while the window was hidden. Before 2.1.80 those were dropped on the floor.

Left for a human

The flash-and-scroll onto the clicked line is DOM-verified by the replay, not eyeballed at click time (winvm's log pane shows three rows and the box's other threads keep it busy). John: click a toast on your laptop with Hydrogen up and say whether it felt right. Leaving open until then.

John Lauer · 1mo ago

Closing as shipped in 2.1.80.

Being explicit about the evidence: I am closing this on the 2.1.80 ship report above (backend ring buffer in activity.rs, replay via get_activity_backlog, the activity-refresh nudge on a toast-click reveal, and the embedded body-click raising ah rather than ab), verified on the fleet at the time, not on a fresh test today. Both halves need a real human toast click to exercise end to end, which I cannot synthesise honestly.

If a click still goes unrecorded, or an embedded click still pops ab over Hydrogen, reopen and I will treat the 2.1.80 report as unproven.

John Lauer closed this · 1mo ago

Log in to reply.