refactor(page): migrate canvas page host to tile-preload + strict (Phase 3.11b-page)
Canvas page windows (created when opening web URLs) previously loaded with
preload.js because getTileWebPreferencesForUrl returns null for https:// URLs
and the loadUrl rewrite to peek://app/page/index.html happens after preload
assignment.
Fix: mint a trustedBuiltin page-host token before BrowserWindow creation for
every canvas window (useCanvas=true) and inject tile-preload.cjs + the token
into webPreferences.additionalArguments, bypassing the tileWebPrefs lookup
entirely. Register each canvas window with registerTrustedBuiltinWindow so
the pubsub extensionBroadcaster forwards messages to page.js. Apply the same
treatment to the openPopupInPageHost helper (webview target=_blank popups).
Also port the one remaining api.invoke('get-app-prefs') call in page.js to
api.app.getPrefs() which routes through the tile:app:get-prefs strict handler
added in Phase 3.11b-shims.
Files changed:
app/page/page.js — replace api.invoke with api.app.getPrefs()
backend/electron/ipc.ts — canvas window preload routing + token mint
+ registerTrustedBuiltinWindow for pubsub
Validation:
grep "api.invoke" app/page/page.js → 0 matches
TypeScript shape follows identical pattern used in page-glue.ts / cmd-glue.ts