Skip to content

Move LocalThought setup/sync onto reflector (pets e2e is blocked until then) #52

Closed

Description

@michielbdejong

Split out of #43. Decision (maintainer, 2026-09-23): move LocalThought setup and sync onto the reflector path described in atomic-server's planning/api-plugins.md ("Reflector supersedes the browser/WASM path"), rather than restoring the browser/WASM methods.

Why this is blocking

The browser/WASM path has been removed from both sides:

  • atomic-server #1618 removed the WASM describeIntegration/fetchIntegration exports.
  • This repo's 3640748 removed describe(), fetchRecords(), validateConnection() and the engine parameter from BrowserIntegrations (integrations/localthought/browser.ts). What remains is catalog, start, cancel, finish and request.

atomic-server's data-browser still calls the removed pieces (all under browser/data-browser/src/chunks/PluginRuns/, checked on feat/plugin-debug at 927d6cf10):

Call site Needs
ConnectLocalThought.tsx:99 describe(platform): builds the setup form
localThought.ts proxyRequest, the 'fetch' action fetchRecords(...)
localThoughtSync.ts:114 validateConnection(...)
localThoughtSync.ts:172–174 fetchRecords(...): the import/sync step itself
localThought.ts engine() the WASM fetchIntegration export; throws "Rebuild the WASM bundle and reload Atomic"
helpers/pluginCatalogUrl.ts:3 isLoopbackHost from integrations/localthought/browser, no longer exported here

These call sites already fit the remaining API: catalog (LocalThoughtCatalog.tsx), start/finish (proxyRequest), cancel (localThoughtCallback.tsx:207), and request (LocalThoughtSyncPanel.tsx:124, ConnectLocalThought.tsx:154).

Consequences:

Work

Per planning/api-plugins.md, a plugin consumes a (self-hosted) reflector instance for discovery, pagination and records, and reflector keeps its OAuth/PKCE handshake. Concretely:

  1. Decide what replaces describe, fetchRecords and validateConnection for the data-browser: reflector endpoints, or syncables/devonian in-browser behind reflector's fetch wrapper.
  2. Rewrite the call sites above in atomic-server (PR against feat/plugin-debug), and drop the WASM engine() loader in localThought.ts.
  3. Resolve isLoopbackHost: re-export it here, or define it in the data-browser.
  4. Update integrations/pets/e2e/pets.spec.ts for the new setup flow, and bump .atomic-server-ref in its own PR.

Scope note: this is the reflector work kept separate from #43's CI/repo-setup follow-ups. It is also unrelated to the connection-code redesign (#40).

🤖 Generated with Claude Code

Activity

  1. michielbdejong commented on Sep 23, 2026

    @michielbdejong
    ContributorAuthor

    Direction changed (maintainer, 2026-09-23). The data-browser's LocalThought setup/sync code is removed in ontola/atomic-server#1549 instead of being rewired, so ontola/atomic-server#1647 and #76 are closed. New plan:

  2. added a commit that references this issue on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions