Repository navigation
pets and notion as iframe drive plugins on syncables/browser + host proxy relay; un-quarantine both e2e (#52, #68) - #85
Merged
Conversation
…t proxy relay (#52) integrations/pets/app/ is a browser-only drive plugin, built to one ES module by app/build.mjs (the timesheets/app pattern). It exports view(), which atomic-server runs in a null-origin iframe: - Reading: syncables/browser's readPlatform walks the bundled Pets document (app/openapi.json, moved from fixtures/pets/document.json, which the mock proxy still serves) and follows its Link-header pagination. syncables/browser is aliased to this repo's syncables/src/browser.ts. - Network: only through store.proxy.request (app/transport.ts), the host relay from atomic-server claude/plugin-proxy-relay (#1624). The page holds the connection. The transport refuses URLs outside servers[0].url. - Connecting: "Connect Pets" calls store.proxy.connect. The host draws the consent bar and runs the PKCE handoff, so there is no pets-specific setup code in atomic-server. - Writing: typed Properties under the app's ontology, the row class's recommends, and one row per pet in the app's table, matched by id. Unchanged re-syncs write nothing. e2e/pets.spec.ts now drives that app: it installs the app test-side (New app plus the bundle as its source), connects through the host bar and the mock proxy, and checks the five rows and their datatypes. The lane stays quarantined until .atomic-server-ref includes the relay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pets.spec.ts now drives the Pets drive app through the host proxy relay. It passed 3 of 3 local runs of `run-lane.mjs pets --tier e2e`, at 13.2 to 13.9s, against atomic-server claude/plugin-proxy-relay (7f4978667, on feat/plugin-debug c707ca4ed). Merge this only together with, or after, an .atomic-server-ref bump to a commit that contains the relay. Against the current pin the spec fails at 'Not connected', because that host has no store.proxy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in-frame proxy relay The pets iframe app needs the host relay (store.proxy.request / connections / connect) and the connect bar from ontola/atomic-server#1657, which is on top of feat/plugin-debug c707ca4ed. Pinned to the PR's head SHA until it is reviewed and merged upstream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With .atomic-server-ref at ontola/atomic-server#1657 (host proxy relay), the notion e2e drives the Notion drive plugin through store.proxy against the mock proxy's notion fixture: platforms ["notion"], tiers live+e2e. Passed locally at 7f4978667 (11.6s), alongside pets e2e (13.4s). Docs: PARALLEL_LANES 'Still open' and notion/README E2E section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michielbdejong
force-pushed
the
claude/issue-52-pets-iframe
branch
from
September 23, 2026 14:38
c6f9898 to
4a178ae
Compare
Contributor
Author
|
Rebased onto main (after #84 and #86) and extended. This PR now also un-quarantines the notion e2e: Verified locally against atomic-server
|
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.
Closes #52 under its new direction (see the issue's last comment). It supersedes #76.
Pets is now a drive app that runs in its own iframe, from
integrations/pets/app/. It reads throughsyncables/browser(#83). It reaches the provider only through the host's proxy relay, so it never holds a credential. The host half is ontola/atomic-serverclaude/plugin-proxy-relay(#1624), which is not merged yet. See "Order" below.What changes
integrations/pets/app/follows thetimesheets/apppattern: a plain-DOMview({ root, store }), bundled byapp/build.mjsinto one ES module (46 KB).sync.ts:readPlatformwalks the bundled Pets document (app/openapi.json) and follows itsLink: rel="next"pagination. It adds one typed Property per field under the app's own ontology, adds them to the row class'srecommends, and upserts rows in the app's table byid. An unchanged re-sync writes nothing.transport.ts: a syncablesTransportoverstore.proxy.request. It refuses any URL outside the document'sservers[0].url, including links the provider sends.controller.ts/main.ts: "Connect Pets" callsstore.proxy.connect, and the host draws the consent bar. On load, the app finds its connection withstore.proxy.connectionsand syncs once. The status reads "Last synced …: 5 pets (5 added, 0 updated, 0 unchanged)."syncables/browseris aliased to this repo'ssyncables/src/browser.tsinbuild.mjs,tsconfig.jsonandvitest.config.ts, so it is not taken from npm.fixtures/pets/document.jsonmoves toapp/openapi.json. The mock proxy's scenario points at the new path, so the app and the mock share one document.e2e/pets.spec.tsis rewritten to drive the app. It installs the app test-side ("New app", with the bundle as its entry point's source; there is no catalog install flow for drive apps yet), then clicks Connect Pets, the host consent bar, and the mock proxy's consent. It checks the five rows and their datatypes (Age integer, Vaccinated boolean, Weight float, Updated at timestamp).lanes.json: petstiers: ["e2e"]and the quarantine note is removed (separate last commit).PARALLEL_LANES.mdis updated to match.plugin.tsis unchanged.Host contract (shared with the Notion app)
This is compatible with
timesheets/app/transport.ts's provisional{ platform, connectionId, path, query }→{ status, body }.Verification
vitest run --config integrations/pets/vitest.config.ts: 12 passed. They cover a two-page Link walk relayed as/petsand then/pets?page=2, datatypes, an idempotent re-sync, transport refusals, controller states, and a bundle check (one module,viewonly, nofetch, storage orAuthorization).tsc -p integrations/pets/tsconfig.json: clean.tsc -p integrations/tsconfig.e2e.json: clean for pets. The one error is innotion/e2e/notion.spec.tsand is not touched here.node --test integrations/localthought/mock-proxy.test.mjs integrations/tooling/lanes.test.mjs: 19 passed. oxfmt and oxlint are clean onintegrations/pets.node integrations/tooling/run-lane.mjs pets --tier e2epassed 3 of 3 runs (13.2s, 13.5s, 13.9s). It ran against a local e2e build of atomic-serverclaude/plugin-proxy-relayat 7f4978667 (on feat/plugin-debug c707ca4ed), not against the current pin.Order
claude/plugin-proxy-relayis reviewed and merged into feat/plugin-debug (joepio)..atomic-server-refis bumped to a SHA that contains it.For the maintainer
app/store.ts(the host store types) copiestimesheets/app/store.tsand adds the relay ops. The Notion app needs the same copy. Moving it into a shared module is your call under strict per-plugin containment./catalog/pets.*through the host. If the proxy's overlay document drifts, the app still reads the bundled copy. A fetch would need another host op.localStorage, bound to the proxy origin, drive, agent and app. #1624's capability (integration-proxy: persistent DID-bound connections, so a grant survives idleness and multiple devices #40, integration-proxy: auth re-design (connections, signing vs capabilities, lifetimes, revocation, multi-node identity) #54) is meant to replace that without changing this app.proxy:petscard that installs the app).Pin: this PR sets
.atomic-server-refto7f4978667, the head of ontola/atomic-server#1657 (host proxy relay, on top offeat/plugin-debugc707ca4ed). That PR is awaiting upstream review, so this pins a SHA rather than waiting.🤖 Generated with Claude Code
Closes #52
Closes #68