Repository navigation
Move LocalThought setup/sync onto the reflector read path (PlatformReader) - #76
Closed
michielbdejong wants to merge 3 commits into
Closed
michielbdejong wants to merge 3 commits into
michielbdejong wants to merge 3 commits into
Conversation
The WASM describeIntegration/fetchIntegration bridge is gone from both repos (atomic-server#1618, this repo's 3640748). So atomic-server's data-browser had nothing to call for setup (describe), the install-time access check (validateConnection) or imports (fetchRecords), and the pets e2e lane was quarantined. Per the maintainer's decision on #52, this moves those onto the reflector path instead of restoring the bridge. - integrations/localthought/reflector-read.ts (new): reflector's read path ported to the browser, with no imports outside this folder: - resource discovery from crudResources, after reflector's discoverResourceModel; - the pagination-schemes subset (pageNumber, pageToken, nextLink), after syncables/src/pagination; - the ontology the removed Rust derive_ontology produced, as the FetchedPlatform that schema.ts and the data-browser consume. Its only transport is BrowserIntegrations.request(); in reflector it is authorizedFetch(). PlatformReader exposes describe/check/read, and nothing in it is platform-specific. It is a port rather than an import because atomic-server only gets integrations/, and the published syncables entry point imports node:http and node:fs. - browser.ts stays transport-only. It adds catalogDocument() (JSON, with a .yaml-as-JSON fallback) and catalogSelection(), returns response headers from request() for Link pagination (x-connection-code is still withheld), and exports isLoopbackHost again, which the data-browser's pluginCatalogUrl.ts imports. - integration-proxy and mock-proxy.mjs serve /catalog/<platform>.json, so the browser needs no YAML parser. The proxy test used to assert that this route 404s; it now asserts the route returns the same document. - Docs: integrations/README.md (LocalThought section), localthought/README.md, integration-proxy/README.md. Refs #52 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The spec was quarantined when localthought/schema.ts started capitalizing column names (atomic-server 5dc880bf1: `updated_at` -> `Updated at`), so its datatype check still looked up `age`/`updated at`. Found by running the lane against the reflector-path build (#52). With this change it passes twice in a row locally. Refs #52 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pets setup dialog works again now that LocalThought setup and sync use PlatformReader (#52). Against an atomic-server build of claude/localthought-on-reflector, run-lane.mjs pets --tier e2e passes, twice in a row. This needs the atomic-server change merged into feat/plugin-debug and .atomic-server-ref bumped to it first. At the current pin (50cf5151c), the data-browser still calls the removed WASM bridge, and this tier fails. Closes #52 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Closing along with ontola/atomic-server#1647. The data-browser's LocalThought code is being removed in ontola/atomic-server#1549, so a browser-side PlatformReader copy of syncables isn't needed. #52 is redirected: pets becomes an iframe plugin that bundles syncables (via a browser-safe |
This was referenced Sep 23, 2026
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 (last commit; see "Merge order").
What
The WASM
describe/fetchRecords/validateConnectionbridge is gone from both repos. Per the maintainer's decision on #52, this replaces it on the reflector path instead of restoring it.integrations/localthought/reflector-read.ts(new): reflector's read path ported to the browser, with no imports outside the folder. It covers:crudResources, after reflector'sdiscoverResourceModel;pageNumber/pageToken/nextLinkpagination schemes, aftersyncables/src/pagination;derive_ontologyproduced (FetchedPlatform).Its only transport is
BrowserIntegrations.request(); in reflector the transport isauthorizedFetch().PlatformReaderexposesdescribe/check/read, which is everything the data-browser needs. There is no per-platform code.browser.tsstays transport-only. It addscatalogDocument()(JSON, falling back to.yaml-as-JSON) andcatalogSelection().request()now returns response headers, still withoutx-connection-code.isLoopbackHostis exported again for the data-browser'spluginCatalogUrl.ts.integration-proxy + mock-proxy serve
/catalog/<platform>.json, so the browser needs no YAML parser. The proxy test used to assert that this route 404s; it now asserts it returns the same document.pets e2e: the spec now expects capitalized column names. It was quarantined when
schema.tsstarted capitalizing them (atomic-server 5dc880bf1). The last commit un-quarantines the tier.Docs: the LocalThought section of
integrations/README.md,localthought/README.md,integration-proxy/README.md.Decisions for the maintainer
syncables/reflector. atomic-server only getsintegrations/, and the publishedsyncables@0.17.1entry point importsnode:http/node:fs. The alternative is a browser-safesyncablessubpath export (e.g.syncables/client). That needs a publish, and publishing is blocked on the Trusted Publisher re-point. The duplication is about 1,100 lines, with provenance in the file header.x-crudreads and cross-collection links from the Rust engine. The Web Lock is now held per proxy request rather than for the whole walk.localThoughtSync.tsstill locks the whole fetch/map/apply cycle per installation..jsoncatalog route. localthought.io needs a redeploy to serve it. Until then only JSON-bodied.yamldocuments work, and a YAML-only proxy fails with an explicit error.Verified
vitest(integrations/localthought, 41 tests),tsc -p integrations/localthought/tsconfig.json, oxlint/oxfmt onintegrations/, and the toolingnode --testsuite (43).cargo test+ clippy + fmt for integration-proxy.node integrations/tooling/run-lane.mjs pets --tier e2epassed twice (about 5s each). It ran against an atomic-server e2e build ofclaude/localthought-on-reflector(the companion atomic-server PR), using the recipe from the Follow-ups after the per-plugin CI lane split (#37, #38) #43 handoff.Not verified: other platforms (google-calendar, clockify, github-issues) end to end. The unit tests only cover their document shapes. I didn't test against live localthought.io either.
Merge order
claude/localthought-on-reflector→feat/plugin-debug)..atomic-server-refto that merge.lanes: un-quarantine the pets e2e tier). Before step 2, the pets e2e lane fails at the current pin (50cf5151c). So either land this PR after the bump, or drop that commit and land it with the bump. The first two commits are safe to land at the current pin.Notion (#68)
Nothing here is pets-specific. A
proxy:notionplatform would need:crudResources+ pagination schemes;fixtures/notion/(notion: no mock-proxy fixture; decide whether the e2e should use the shared mock #47).Notion lists databases with POST
/v1/searchand/v1/databases/{id}/query, with the cursor in the request body.reflector-read.tsis GET-only and puts cursors in the query string, so it would need POST list operations and body-field cursors (request.bodyFields). The read-only Notion Devonian lens (#66) would apply as a projection afterread(), the wayclockifyProjectiondoes.🤖 Generated with Claude Code