Skip to content

Drop legacy @mdbase-dev/connect; open collections through the published SDK - #18

Merged
callumalpass merged 2 commits into
mainfrom
chore/drop-legacy-connect
Nov 8, 2026
Merged

callumalpass merged 2 commits into
mainfrom
chore/drop-legacy-connect

Conversation

@callumalpass

Copy link
Copy Markdown
Owner

Draft: waits on the SDK release that adds @mdbase-dev/sdk/manifest.
scripts/planner-manifest.mjs now imports parseAppManifest from @mdbase-dev/sdk/manifest. Published @mdbase-dev/sdk@0.1.0-beta.162 does not export that entry yet (it's on mdbase-connect branch sdk/manifest-entry). Until that release ships, pnpm manifest, pnpm build, pnpm dev and scripts/planner-manifest.test.mjs fail with "./manifest" is not exported, so CI will be red. When it's published, bump @mdbase-dev/sdk to that version and regenerate the lockfile.

Merging deploys production. Verified main auto-deploys to planner.tasknotes.dev. This moves production Planner from legacy Connect to the SDK entry, so qualify it on staging/LAB first.

Why

The legacy @mdbase-dev/connect, connect-protocol and connect-sync packages are being retired from npm. Planner was half-migrated: LAB builds already used the SDK entry (SdkApp), and every other build used Connect. This PR makes the SDK path the only one and deletes the Connect path.

What changed

  • Dependencies: the vendored dev tarballs are replaced by published @mdbase-dev/sdk 0.1.0-beta.162 and @mdbase-dev/ui 0.1.0-beta.160. The @mdbase-dev/connect dependency, the connect-protocol devDependency and the pnpm.overrides for connect-protocol/connect-sync are removed.
  • Entry: SdkApp renders in every build, and root.tsx and the Connect App/ConnectionGate are deleted. The SDK environment comes from VITE_MDBASE_ENV: lab, staging, or production when unset. An unknown value throws. deploy:dev sets it from the deployment branch. dev/dev:e2e set lab, because the SDK only allows loopback origins in LAB. The consent-popup return now always delivers through @mdbase-dev/sdk/app-grant.
  • Deleted legacy-only code: MdbasePlannerRepository, data/connect.ts, requireOutcome, the never-wired native sign-in screen/binding and popup helper, and their tests. Also deleted: the Connect-only pending-mutation recovery banner and the mutationsDisabled gating it drove through Planner, GanttChart, TaskInspector and TaskCreateDialog. Unconfirmed writes on the SDK path are handled by the SDK ledger (rejectedWrites stays).
  • Kept: the shared task/view mapping helpers, now src/data/planner-mapping.ts (moved out of the old repository file). JsonObject became the SDK's PlainValue records.
  • Build/deploy: the VITE_MDBASE_CONNECT_URL/LOOPBACK variables are removed, along with verify-build's check that the bundle contains them and the mdbase-connect manual chunk. production-smoke still checks Connect health and manifest validation.
  • Vendor/docs: 56 stale tarballs and the three artifact manifests are deleted. Only vendor/mdbase-contracts remains. docs/capability-v2-migration.md is deleted, and docs/new-sdk.md is cut down to the current data-layer description.

Net: about −3,860 lines outside the lockfile and vendor.

Verification (local)

  • pnpm install --frozen-lockfile, typecheck, lint, format:check, test:deployment: pass.
  • pnpm test (on the remote builder): 16/17 files and 135/135 tests pass. The one failing file is scripts/planner-manifest.test.mjs, which can't import @mdbase-dev/sdk/manifest yet. With that specifier aliased to the bundled connect-protocol/manifest (which is what the new SDK entry re-exports), it passes 3/3.
  • pnpm build (with the manifest step run through that alias): builds, and verify-build passes. Vite warns that the main chunk is 851 kB, over the 560 kB limit, because the SDK UI is no longer lazy-loaded behind the LAB check.
  • pnpm test:e2e (with that alias): 13/13 pass.

…ed SDK

The legacy @mdbase-dev/connect, connect-protocol and connect-sync packages
are being retired from npm. Planner already had a working SDK path (LAB
builds); make it the only path and delete the Connect one.

- Depend on published @mdbase-dev/sdk 0.1.0-beta.162 and @mdbase-dev/ui
  0.1.0-beta.160 instead of vendored dev tarballs; remove the connect
  dependency, connect-protocol devDependency and pnpm overrides.
- Render SdkApp in every build. The SDK environment comes from
  VITE_MDBASE_ENV (lab, staging, or production when unset); deploy:dev sets
  it from the deployment branch, and loopback dev/e2e servers use lab.
- Delete the Connect gate, App, MdbasePlannerRepository, the unused native
  sign-in screen/binding and popup helper, and their tests.
- Delete the Connect-only pending-mutation recovery UI and the
  mutationsDisabled gating it drove through Planner, GanttChart,
  TaskInspector and TaskCreateDialog.
- Keep the shared task/view mapping helpers as planner-mapping.ts.
- Validate the manifest with @mdbase-dev/sdk/manifest (needs the SDK release
  that adds that entry).
- Drop Connect URL/loopback build variables and the bundle check for them.
- Delete 56 stale vendor tarballs and their artifact manifests, and the
  capability-v2 migration notes.
beta.163 ships @mdbase-dev/sdk/manifest. The committed manifests had been
regenerated in development mode; regenerate them for production.
@callumalpass
callumalpass marked this pull request as ready for review November 8, 2026 17:56
@callumalpass
callumalpass merged commit 62d7da2 into main Nov 8, 2026
1 check passed
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