Keep browser input from submitting Paseo prompts (#1982)
* fix(desktop): keep browser input out of the composer Unhandled webview keys could be redispatched into the active host window, allowing agent Enter to submit a draft prompt. Give pages first refusal for ordinary shortcuts and contain automation at the guest boundary. * fix(desktop): tighten browser shortcut validation * fix(desktop): respect browser shortcut ownership * fix(desktop): retain browser keys across windows * fix(desktop): scope browser webviews by host * Reshape browser shortcut ownership Use the browser webview registry as the single guest identity authority, scope browser operations to their host window, publish chord continuations only while pending, and restore focus to the originating browser after command center dismissal. * Fix host-scoped browser shortcut follow-ups * Fix browser keyboard review follow-ups * Fix browser keyboard lifecycle regressions * Fix browser shortcut review regressions * Fix desktop browser review regressions * Fix browser shortcut frame regressions * Fix rebase integration regressions * Preserve browser-native shortcut ownership * Isolate browser shortcuts and automation by context
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { contextBridge, ipcRenderer, webUtils } from "electron";
|
||||
import type { BrowserKeyboardPolicy } from "./features/browser-keyboard/index.js";
|
||||
|
||||
// This preload runs in Electron's sandbox and is tsc-compiled (not bundled), so it MUST
|
||||
// NOT emit any runtime module load other than "electron" — a require() of a local or
|
||||
@@ -94,6 +95,8 @@ contextBridge.exposeInMainWorld("paseoDesktop", {
|
||||
ipcRenderer.invoke("paseo:menu:set-capturing-shortcut", capturing),
|
||||
},
|
||||
browser: {
|
||||
setShortcutPolicy: (input: BrowserKeyboardPolicy) =>
|
||||
ipcRenderer.invoke("paseo:browser:set-shortcut-policy", input),
|
||||
profilePartition: PASEO_BROWSER_PROFILE_PARTITION,
|
||||
registerAttachedBrowser: (input: AttachedBrowserRegistration) =>
|
||||
ipcRenderer.invoke("paseo:browser:register-attached", input),
|
||||
|
||||
Reference in New Issue
Block a user