From 620b4c442cc08687eb7633da4a101f801d20e609 Mon Sep 17 00:00:00 2001 From: Rhys Sullivan <39114868+RhysSullivan@users.noreply.github.com> Date: Thu, 27 Aug 2026 19:01:56 -0700 Subject: [PATCH 01/59] Add standalone reproduction of the current add-integration flow --- bun.lock | 25 ++ package.json | 1 + packages/onboarding-demo/README.md | 39 +++ packages/onboarding-demo/index.html | 18 + packages/onboarding-demo/package.json | 31 ++ packages/onboarding-demo/src/app.tsx | 223 ++++++++++++ packages/onboarding-demo/src/fixtures.ts | 240 +++++++++++++ packages/onboarding-demo/src/flow.ts | 111 ++++++ packages/onboarding-demo/src/main.tsx | 12 + .../src/screens/add-account-modal.tsx | 318 ++++++++++++++++++ .../src/screens/add-openapi-page.tsx | 261 ++++++++++++++ .../src/screens/connect-dialog.tsx | 279 +++++++++++++++ .../src/screens/integration-detail.tsx | 105 ++++++ .../src/screens/integrations-page.tsx | 142 ++++++++ packages/onboarding-demo/src/shell.tsx | 97 ++++++ packages/onboarding-demo/src/step-state.ts | 45 +++ packages/onboarding-demo/src/styles.css | 5 + packages/onboarding-demo/tsconfig.json | 15 + packages/onboarding-demo/vite.config.ts | 12 + 19 files changed, 1979 insertions(+) create mode 100644 packages/onboarding-demo/README.md create mode 100644 packages/onboarding-demo/index.html create mode 100644 packages/onboarding-demo/package.json create mode 100644 packages/onboarding-demo/src/app.tsx create mode 100644 packages/onboarding-demo/src/fixtures.ts create mode 100644 packages/onboarding-demo/src/flow.ts create mode 100644 packages/onboarding-demo/src/main.tsx create mode 100644 packages/onboarding-demo/src/screens/add-account-modal.tsx create mode 100644 packages/onboarding-demo/src/screens/add-openapi-page.tsx create mode 100644 packages/onboarding-demo/src/screens/connect-dialog.tsx create mode 100644 packages/onboarding-demo/src/screens/integration-detail.tsx create mode 100644 packages/onboarding-demo/src/screens/integrations-page.tsx create mode 100644 packages/onboarding-demo/src/shell.tsx create mode 100644 packages/onboarding-demo/src/step-state.ts create mode 100644 packages/onboarding-demo/src/styles.css create mode 100644 packages/onboarding-demo/tsconfig.json create mode 100644 packages/onboarding-demo/vite.config.ts diff --git a/bun.lock b/bun.lock index 4aebc2673..f5df3fd0e 100644 --- a/bun.lock +++ b/bun.lock @@ -860,6 +860,29 @@ "vitest": "catalog:", }, }, + "packages/onboarding-demo": { + "name": "@executor-js/onboarding-demo", + "version": "0.0.0", + "dependencies": { + "@executor-js/plugin-mcp": "workspace:*", + "@executor-js/plugin-openapi": "workspace:*", + "@executor-js/react": "workspace:*", + "@executor-js/sdk": "workspace:*", + "lucide-react": "^1.7.0", + "react": "catalog:", + "react-dom": "catalog:", + "sonner": "^2.0.7", + }, + "devDependencies": { + "@tailwindcss/vite": "catalog:", + "@types/react": "catalog:", + "@types/react-dom": "catalog:", + "@vitejs/plugin-react": "catalog:", + "tailwindcss": "catalog:", + "typescript": "catalog:", + "vite": "catalog:", + }, + }, "packages/plugins/desktop-settings": { "name": "@executor-js/plugin-desktop-settings", "version": "1.6.0", @@ -1804,6 +1827,8 @@ "@executor-js/motel": ["@executor-js/motel@0.2.5-executor.1", "", { "dependencies": { "@effect/atom-react": "^4.0.0-beta.49", "@effect/opentelemetry": "^4.0.0-beta.49", "@effect/platform-bun": "^4.0.0-beta.50", "@opentelemetry/api": "^1.9.0", "@opentelemetry/exporter-logs-otlp-http": "^0.214.0", "@opentelemetry/exporter-trace-otlp-http": "^0.211.0", "@opentelemetry/sdk-logs": "^0.214.0", "@opentelemetry/sdk-node": "^0.214.0", "@opentelemetry/sdk-trace-base": "^2.5.0", "@opentelemetry/sdk-trace-node": "^2.6.1", "@opentui/core": "^0.1.99", "@opentui/react": "^0.1.99", "effect": "^4.0.0-beta.49", "react": "^19.2.5", "scheduler": "^0.27.0" }, "bin": { "motel": "src/motel.ts", "motel-mcp": "src/mcp.ts" } }, "sha512-fLGJ5FIIBYd+4L2OurpYFjWzvcCbACvmdNofh6THXQJE1Gku93EKURtgn27/XddyM9SKGST6/znTRcmwKiYdXw=="], + "@executor-js/onboarding-demo": ["@executor-js/onboarding-demo@workspace:packages/onboarding-demo"], + "@executor-js/plugin-desktop-settings": ["@executor-js/plugin-desktop-settings@workspace:packages/plugins/desktop-settings"], "@executor-js/plugin-encrypted-secrets": ["@executor-js/plugin-encrypted-secrets@workspace:packages/plugins/encrypted-secrets"], diff --git a/package.json b/package.json index 007a4bb01..c284f4562 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "packages/*/*", "packages/react", "packages/app", + "packages/onboarding-demo", "apps/*", "examples/*", "e2e" diff --git a/packages/onboarding-demo/README.md b/packages/onboarding-demo/README.md new file mode 100644 index 000000000..dd4a51344 --- /dev/null +++ b/packages/onboarding-demo/README.md @@ -0,0 +1,39 @@ +# Onboarding demo + +A standalone reproduction of executor's **current** add-integration flow, from +"the CLI is connected" to "the integration has a working connection". No API, no +auth, no tenant — it runs off `src/fixtures.ts` and the public integrations.sh +endpoints. + +``` +bun run --cwd packages/onboarding-demo dev # http://localhost:5199 +``` + +Every screen is addressable: `#integrations-empty`, `#connect-dialog`, +`#add-openapi`, `#detail-accounts`, `#add-account-credential`, +`#add-account-place`, `#oauth-stuck`, `#integrations-populated`. `[` and `]` +step through them. The right-hand panel names the route and source component +each screen was reproduced from, and quotes the first-run reactions recorded +against it. + +## Fidelity + +- The curated preset list is imported from the real plugin modules + (`@executor-js/plugin-openapi/presets`, `@executor-js/plugin-mcp/presets`), + so it is the list the console shows, in the console's order. +- UI primitives and design tokens are imported from `@executor-js/react`, not + copied — the reproduction uses the same buttons, dialogs, card stacks, tabs + and tokens as the console. +- The catalog search calls the real `integrations.sh/api/search` with the same + 250ms debounce and 2-character minimum. +- Screen structure and copy are transcribed from the source components named in + the inspector. + +What is faked: the workspace's own data (integrations, connections, tools) and +every mutation. Adding an integration waits and moves on; nothing persists. + +`fixtures.ts` also exposes two integrations.sh endpoints the console does **not** +use today — `fetchCatalogDomains` (the whole ~3.4k-domain popularity-sorted +registry) and `fetchSurfaceCredentials` (per-domain credential label, the URL +that mints the key, and setup instructions). They are unused by the +reproduction and present as raw material for the rework. diff --git a/packages/onboarding-demo/index.html b/packages/onboarding-demo/index.html new file mode 100644 index 000000000..a9c61987a --- /dev/null +++ b/packages/onboarding-demo/index.html @@ -0,0 +1,18 @@ + + +
+ + +{name}
+1.0.0 · 214 operations · 31 tags
++ Overrides the spec's servers; leave empty to choose the server (and + variables) per tool call. +
++ API key +
++ Pulled from spec. Remove to override. +
++ OAuth +
++ Pulled from spec. Remove to override. +
++ Every method here is registered with the integration. Connect an account from the + integration page after adding. +
+No connections yet
++ Add a connection to make this integration's tools available. +
+ +No tools yet
+No tools yet
++ Add a connection to unlock this integration's tools. +
+ +No integrations yet
++ Connect an integration to start curating tools. +
+ +