Add url mode for extensions - #483
Merged
Merged
Conversation
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.
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
cateApiin 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: truewould be the escape hatch, not built yet.Notes
getProxyUrlForreturns early before starting the proxy or minting a route token, so url extensions spawn nothing.Extensions using this land separately in cate-extensions, after this: 0-AI-UG/cate-extensions#21