Repository navigation
Installation page: connect proxy platforms, and no proxy calls without one (#1700) - #1733
michielbdejong wants to merge 1 commit into
Conversation
#1700) Flow a, answer 3: the Installation page shows a Connections section for each platform the pinned release's manifest declares in `proxy: [...]` (plus any still recorded). Per platform, "Connect <platform>" and, when the user already has one, "Use existing connection"; both go through a consent step (the shared ProxyConsentBar, also used by AppFrame), then reuse helpers/proxyConnections.ts: /connect, the signed redeem, and POST /connections/{id}/agents {agent: integrationAppAgent}. After that, integrationConnections[platform] = connection_id is written onto the Installation in a commit signed by the user (the /connect return records it in ProxyConnectReturn via finishProxyReturn). Disconnect removes the delegation at the proxy (404 counts as gone) and the key, dropping the property once empty. Only people who can write the Installation see the controls. TODO for #1724's ProxyTrafficNotice, which is not on this base. Don't contact the proxy for nothing: GET /connections and runtime registration only run when the manifest declares `proxy` or the Installation already has integrationConnections, both on the page and in registerInstallationRuntimes (which app frames call too). Tests: the connect flow writes integrationConnections; use-existing delegates and records; disconnect calls the proxy and removes the key (kept when the proxy refuses); zero fetches to the proxy for a plain Installation; controls hidden for non-writers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge-risk triage (2026-09-28). This is a read-only review of this PR's own diff. The rule it applies: nothing that works today may break for existing users or clients, and new behaviour is added alongside the old. The stack is being rebased onto Verdict: SAFE (merge together with #1729) Frontend only. The gate means an Installation that declares no platform and has no recorded connection never contacts the proxy. The Connect UI only shows for writers. Note: This gate is what makes #1729 safe. 🤖 Generated with Claude Code |
|
Closing as part of the plugin-host stack cleanup (Q-101): not needed by atomic-plugins now. See the inventory at #1726 (comment). The branch is kept, and pin candidates are unaffected. Closed by Claude (VPS coordinator) on behalf of Michiel. |
Stacked on #1729. Part of #1700 (flow a, answer 3).
Connect a platform on an Installation
For each platform the pinned release's manifest declares in
proxy: [...](#1725), the Installation page shows a row under Connections. A platform that is no longer declared but is still recorded also gets a row.ProxyConsentBar, also used byAppFrame, with AppFrame's text unchanged.helpers/proxyConnections.ts(Plugin frames: integration-proxy capabilities instead of the relay (ontola/atomic-plugins#54) #1697):/connect;POST /connections/{id}/agents {agent: integrationAppAgent}.integrationConnections[platform] = connection_id(Installation app ids, published node agents and delegated connections for the integration proxy (#1700, answers 1-3) #1710, a JSON object) is written onto the Installation in a commit signed by the user./connect, the return (ProxyConnectReturn→ newfinishProxyReturn) records it. It only does this for handoffs started from an Installation (recordOnInstallationin the pending scope). A connect started by an app frame writes nothing.DELETE /connections/{id}/agents/{app}at the proxy (a 404 counts as already gone), then the key is removed. The property is dropped once it's empty. If the proxy refuses, the key stays.ProxyTrafficNoticeisn't on this base. There's aTODO(#1724)where it goes.No proxy calls without a reason
The page only calls the proxy (
GET /connections, runtime registration) when the manifest declaresproxyor the Installation already hasintegrationConnections. The check runs in two places:useInstallationRuntimesand the connections list;registerInstallationRuntimes, so app frames that call it get the same check.A plain Installation makes no request to the proxy's origin. #1729 listed this as a follow-up: one
GET /connectionsper page load, plus a toast when the default proxy was down.Tests (vitest)
helpers/installationConnections.test.ts, against a fake proxy:/connect→ signed redeem → delegation to the app id) writesintegrationConnections, and a frame-started connect writes nothing;DELETE …/agents/{app}and removes the key or the whole property;fetchpath the page uses. Two control cases show that declaringproxy, or having a recorded connection, does lead to proxy calls.views/Installation/InstallationConnections.test.tsx:finish()fields and the gating.src/helpers,src/chunks/AppPageandsrc/views/Installationpasses (70 files, 560 tests).Checked in a running app against a server built from this branch and a stub proxy. A plain Installation made 0 requests to the proxy. For a
proxy: ["demo"]Installation, "Use existing connection" wrote{"demo":"demo-conn-1"}, and Disconnect removed it..poThe catalogs were settled by running vite once after
rm -rf src/locales/.wuchale, and I read the diff by hand. It only adds entries (the new strings, plus references to existing ones such as Cancel, Continue, Disconnect, Not connected and Connections). AppFrame's entries are unchanged. An earlier attempt passed the consent text as a prop holding JSX, and wuchale silently dropped AppFrame's strings. That's whyProxyConsentBaris a plain styled container with children.Screenshots
Unconnected, the consent step and connected, at desktop and mobile width. They were captured locally and shared in the review chat; they still need uploading here. The
[i18n-404:2152]after "Pinned to …" is already on the base: the committed catalog has no entry for the nested "from …" message inInstallationPage, and this PR doesn't touch it.Not done
proxyplatforms yet (from Plugins phase 2 (atomic-plugins#54): installation identities, host-signed proxy calls, connection requests #1700).🤖 Generated with Claude Code