Skip to content

Add url mode for extensions - #483

Merged
Anton-Horn merged 6 commits into
mainfrom
feat/extension-url-mode
Jul 21, 2026
Merged

Add url mode for extensions#483
Anton-Horn merged 6 commits into
mainfrom
feat/extension-url-mode

Conversation

@Anton-Horn

@Anton-Horn Anton-Horn commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Extensions can now point a panel at a remote https url instead of shipping a frontend or spawning a server:

{ "id": "acme.crm", "name": "Our CRM",
  "panels": [{ "id": "main", "label": "CRM" }],
  "url": "https://app.hubspot.com" }

The panel is a top level webview, not an iframe, so SaaS apps that set X-Frame-Options or frame-ancestors still load. Logins persist because each extension already gets its own persist:ext-<id> partition.

Security

url guests get no cate host API. Guest identity comes from the proxy origin plus the opaque route token, which a remote origin can never satisfy, so handing one the bridge would only create rejected calls and extra surface for a third party page. The resolver returns an empty preloadPath, and webSecurity strips the preload for any non proxy origin anyway, so it is enforced twice. A cateApi in a url manifest is inert.

Off-screen culling

Webview extensions were exempt from the canvas viewport cull, because unmounting destroys the guest and loses in-page state. That is right for local extensions and wrong for url ones: they are third party SaaS apps that would otherwise stay resident forever, each a renderer with websockets and timers. Their login lives in the session partition, so a remount just reloads.

So url-mode panels now get culled like editors and terminals, while frontend and server extensions keep the old behaviour. An extension whose manifest is not loaded yet stays mounted, which is the safe direction. Tab-hidden behaviour is unchanged: a dock tab switch never reloads.

The cost is that panning back to a culled panel reloads the page, so scroll position and unsaved in-page drafts are lost. The cull margin is a full screen in each direction. If some extension genuinely needs to stay resident, a manifest keepAlive: true would be the escape hatch, not built yet.

Notes

  • Mode precedence is server > url > frontend. Only https is accepted, including no http://localhost, since local servers are what server mode is for.
  • getProxyUrlFor returns early before starting the proxy or minting a route token, so url extensions spawn nothing.
  • The on disk manifest test skips when cate-extensions is not checked out, since it is a separate repo and gitignored here.

Extensions using this land separately in cate-extensions, after this: 0-AI-UG/cate-extensions#21

Extensions can now point a panel at a remote https url instead of shipping
a frontend or spawning a server. The panel is a top level webview rather
than an iframe, so SaaS apps that set X-Frame-Options still load.

url guests get no cate host API. Guest identity comes from the proxy origin
plus route token, which a remote origin can never satisfy, so the bridge
would only ever return rejected calls. webSecurity already strips the
preload for non proxy origins, so this is enforced in two places.

Mode precedence is server > url > frontend, and only https is accepted.
Anton-Horn and others added 2 commits July 21, 2026 10:22
Local extensions keep their off-screen exemption: unmounting kills the
webview guest and its in-page state for good. URL-mode panels are remote
SaaS pages whose login lives in the persistent session partition, so a
remount just reloads. Nine of them staying resident forever was a lot of
idle Chromium renderers.

Tab-hidden behaviour is unchanged.
@Anton-Horn Anton-Horn closed this Jul 21, 2026
@Anton-Horn Anton-Horn reopened this Jul 21, 2026
Same change as #484 in fr, de and zh-CN: new tagline, and a rewritten
feature list that matches the hook-based agent status, session restore
and CLI permission matrix.
CI clones cate-extensions at its default branch, so extensions added in a
catalog PR are missing until it merges.
@Anton-Horn
Anton-Horn merged commit 6a6fbe9 into main Jul 21, 2026
3 checks passed
@Anton-Horn
Anton-Horn deleted the feat/extension-url-mode branch July 21, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant