← Commit history
Background recording: correct hints (occlusion flags required; never foreground; background preferred) + document the Chrome launch-flag requirement
2 files changed
+16−5
bridge/server.js+3−3@@ -240,10 +240,10 @@ const HELP = { ], bestPractices: [ 'Before driving, nbrowser_status to confirm connected. After a dev_reload, expect a ~3-6s reconnect.',- 'NEVER foreground the driven window to take a screenshot — nbrowser_screenshot (CDP) and AD desktop_screenshot_window (WGC) both capture a BACKGROUND/occluded window, and yanking the user\'s real browser forward disrupts their work. Only raise a window (AD desktop_bring_to_front) when the user EXPLICITLY asks to watch it live.',+ '⭐ BACKGROUND IS THE WHOLE POINT — NEVER foreground the driven window to screenshot OR record. The user must keep working while a demo records behind their other windows; yanking Chrome forward makes the feature useless. nbrowser_screenshot (CDP) captures a background/occluded window unconditionally. WGC recording captures a background/occluded window TOO — but only when the recorded Chrome was launched with the occlusion-disable flags (see Recording); without them an occluded window paints blank. Foregrounding is the USER\'s choice, made by them when they want to watch — it is never something the AI should do on its own.', 'For demos: nbrowser_caption (in-page subtitle/alert) OR AD desktop_caption (fullscreen; use position:bottom — top covers the URL bar + Chrome warning).', 'Mouse verbs: pass cursor:true to show the gliding Adom cursor, and intent:"Clicking the Pay button" so the cursor LABEL narrates the action (builds user trust).',- 'Recording: method "wgc" (Windows, via adom-desktop 1.8.148+; no picker, no banner, background-capturable, mp4 on disk) is best; "getdisplaymedia" is cross-platform but FORCES a share picker; "tabcapture" = the friendly "Record this tab" toolbar button (no picker, records current tab).',+ 'Recording: method "wgc" (Windows, via adom-desktop 1.8.148+; no picker, no banner, mp4 on disk) is PREFERRED — it records in the BACKGROUND so the user keeps working. ⚠️ Background capture of an OCCLUDED Chrome window REQUIRES that Chrome be launched with `--disable-backgrounding-occluded-windows --disable-renderer-backgrounding --disable-background-timer-throttling --disable-features=CalculateNativeWinOcclusion` (pup\'s Chrome ships these; a default user Chrome does NOT — without them Chrome stops painting the occluded window and WGC records a blank surface). Stop with nbrowser_record_stop {method:"wgc",recordingId}. "getdisplaymedia" FORCES a share picker; "tabcapture" = the "Record this tab" toolbar button.', ], verbs: { 'open_window/open_tab/close_window/close_tab/switch_window/switch_tab/list_windows/list_tabs/rescan': 'Sessions = a real Chrome window (durable across reloads). tabId = real chrome tab id. close what you open.',@@ -313,7 +313,7 @@ async function wgcRecord(verb, args) { } if (r.status >= 200 && r.status < 300 && out && out.success !== false && !out.error) { const stopHint = 'mp4 is on the laptop at out.path (under %TEMP%\\adom-desktop-recordings) — fetch it with: adom-desktop pull_file {"filePaths":["<path>"]}';- const startHint = 'recording started in the background (no picker, no banner; the window may be occluded/off-screen). Poll nbrowser_record_status {method:"wgc",recordingId}; stop with nbrowser_record_stop {method:"wgc",recordingId}.';+ const startHint = 'recording started in the BACKGROUND — the user keeps working; do NOT foreground the window (foregrounding is the user\'s choice, never the AI\'s). ⚠️ If frames come out BLANK, the recorded Chrome was NOT launched with the occlusion-disable flags (--disable-backgrounding-occluded-windows --disable-renderer-backgrounding --disable-background-timer-throttling --disable-features=CalculateNativeWinOcclusion) — Chrome stops painting an occluded window without them. pup\'s Chrome already has these (so it background-records fine); a default user Chrome must be relaunched with them. Poll nbrowser_record_status {method:"wgc",recordingId}; stop with nbrowser_record_stop {method:"wgc",recordingId}.'; return { success: true, output: JSON.stringify({ ok: true, method: 'wgc', recordingId: out.recordingId, path: out.path, fileExists: out.fileExists,
skills/driving-the-extension/SKILL.md+13−2@@ -175,8 +175,19 @@ called out directly ("that's disrupting my work massively").** The whole point o is that the user keeps working in *their* foreground window while Adom operates one of their *other* windows in the background. So: -- **Screenshots NEVER need foregrounding** — `nbrowser_screenshot` (CDP) and AD `desktop_screenshot_window`- (WGC) both capture a **background / occluded** window. Capture where it sits; never raise it for a shot.+- **Screenshots NEVER need foregrounding** — `nbrowser_screenshot` (CDP) captures a **background / occluded**+ window unconditionally (it reads the page bitmap, not the OS window). Capture where it sits; never raise it.+- **⭐ Recording in the BACKGROUND is the whole point — and it works, with one setup requirement.** The WGC+ recorder (and `desktop_screenshot_window`'s WGC path) capture the OS window's composited surface. Chrome,+ by default, **stops painting a fully-occluded window** (its occlusion detector), so WGC then records a+ **blank** surface. The fix is a one-time **launch-flag** requirement on the Chrome being recorded:+ `--disable-backgrounding-occluded-windows --disable-renderer-backgrounding --disable-background-timer-throttling --disable-features=CalculateNativeWinOcclusion`.+ **pup's Chrome already ships these** (which is why pup background-records reliably); a default user Chrome+ does **not** — so for the extension to record the user's real Chrome in the background, that Chrome must be+ launched with these flags (bake them into the Adom-managed Chrome launch / golden image). **Never** work+ around a blank background recording by foregrounding the window — that defeats the entire feature (the user+ must be able to keep working while a demo records). Foregrounding is the **user's** choice, when *they* want+ to watch — never the AI's. - **`open_window` opens in the BACKGROUND** (focus is not stolen). Pass `focused:true` *only* when the user explicitly asked to watch it live. - `nbrowser_focus` activates the right *tab* and flashes its taskbar button, but **by design does NOT