fix: bundled connectors not loaded in dev mode for fresh users#68
Merged
fix: bundled connectors not loaded in dev mode for fresh users#68
Conversation
When a developer clones the repo and runs `pnpm run dev`, the dev script skipped `prebuild:connectors`, so `dist/bundled-connectors/` was empty. The connector loader found no tarballs to extract, leaving `~/.spool/connectors/node_modules/` empty. As a result, all first-party connectors appeared under "Available Connectors" (fetched from registry.json) instead of "Data Sources". Root cause: the dev script (`electron-vite dev`) never ran the bundled connector build, unlike the production build which calls `prebuild:connectors` to pack tarballs. Fix: in dev mode, symlink workspace connector packages directly into `~/.spool/connectors/node_modules/` so the existing loader discovers them without needing tarballs. Only connectors listed in `FIRST_PARTY_PLUGINS` (in `build-bundled-connectors.sh`) are linked, keeping dev behavior consistent with production. Changes: - Add `--build-only` flag to `build-bundled-connectors.sh` (builds connectors without packing tarballs, used by dev script) - Add `dev-connectors.ts` module with `linkDevConnectors()`, `readBundledList()`, and `ensureSymlink()` — called in dev mode before the connector loader runs - Dev script now runs `build-bundled-connectors.sh --build-only` to ensure bundled connector `dist/` exists before symlinking - Single source of truth: `FIRST_PARTY_PLUGINS` in the shell script drives both production bundling and dev linking Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
pnpm run dev, bundled connectors (e.g. X Bookmarks) appeared under Available Connectors instead of Data Sources, because the dev script never built or extracted bundled connector tarballs into~/.spool/connectors/FIRST_PARTY_PLUGINS(inbuild-bundled-connectors.sh) are linked — single source of truth for both dev and production--build-onlyflag tobuild-bundled-connectors.shso the dev script can build connectordist/without packing tarballsTest plan
rm -rf ~/.spool/connectors): X Bookmarks shows in Data Sources, HN/Typeless in Availablepnpm run build:mac): app installs and shows same correct layoutreadBundledList,ensureSymlink,linkDevConnectors🤖 Generated with Claude Code