Skip to content

fix: bundled connectors not loaded in dev mode for fresh users#68

Merged
graydawnc merged 1 commit intomainfrom
fix/dev-bundled-connectors
Apr 13, 2026
Merged

fix: bundled connectors not loaded in dev mode for fresh users#68
graydawnc merged 1 commit intomainfrom
fix/dev-bundled-connectors

Conversation

@graydawnc
Copy link
Copy Markdown
Collaborator

Summary

  • When a new developer clones the repo and runs 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/
  • In dev mode, workspace connector packages are now symlinked directly into the connectors dir, so the existing loader discovers them without tarballs
  • Only connectors listed in FIRST_PARTY_PLUGINS (in build-bundled-connectors.sh) are linked — single source of truth for both dev and production
  • Added --build-only flag to build-bundled-connectors.sh so the dev script can build connector dist/ without packing tarballs

Test plan

  • Fresh dev environment (rm -rf ~/.spool/connectors): X Bookmarks shows in Data Sources, HN/Typeless in Available
  • Production build (pnpm run build:mac): app installs and shows same correct layout
  • Unit tests: 11 cases covering readBundledList, ensureSymlink, linkDevConnectors
  • Idempotent: re-running dev doesn't duplicate or break symlinks

🤖 Generated with Claude Code

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>
@graydawnc graydawnc merged commit 02fac08 into main Apr 13, 2026
3 checks passed
@graydawnc graydawnc deleted the fix/dev-bundled-connectors branch April 13, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant