Repository navigation
Description
Summary
Cut the last link from core to the Pro UI.
- Delete both registration paths. Remove the transitional
import './pro-plugin'fromui-extensions.svelte.ts, and the self-registration inpro-plugin.ts. After that, the Pro extension registers only when a build injects it throughNODESPACE_EXTENSIONS(Add the virtual:nodespace-extensions build entry and the extension-api import alias #3311). - Register explicitly in tests. The two tests that still exercise the Pro extension register it themselves.
- Pin the free app's guarantee (ADR-082 §7) with a boundary test. With nothing injected, no contribution renders, no hook runs, and no core module imports the Pro extension.
Context
State after the earlier sub-issues:
- After Adopt ADR-082's contribution contract: ids, when() predicates, keyed and isolated outlets #3310:
ui-extensions.svelte.tsholds the transitionalimport './pro-plugin';pro-plugin.tsends withuiExtensionRegistry.register(proSyncExtension);pro-plugin.tsdefault-exports[proSyncExtension].
- After Add the virtual:nodespace-extensions build entry and the extension-api import alias #3311,
+layout.svelteregisters the contents ofvirtual:nodespace-extensions. That list is[]unlessNODESPACE_EXTENSIONSis set.
Tests that rely on the side effect:
src/tests/plugins/pro-sync-variant.test.ts;src/tests/free-user-guardrail.test.ts, in the describe "Pro-UI registry contributes nothing daemon-backed in community" (about L139-161).
The Pro GUI build.
- Once the Pro GUI builds from a pinned core revision (the pin gate), merging this change cannot reach a Pro build until nodespace-sync bumps its pin.
- The pin-bump PR that crosses this commit must set
NODESPACE_EXTENSIONStopackages/desktop-app/src/lib/plugins/pro-plugin.tsin the pinned checkout. It does so for every GUI build that should show the Pro UI:scripts/build-pro-dmg.sh;.github/workflows/release.yml, including its disabled Windows job;scripts/device-sync.sh, if that build should show the Pro UI.
- This lasts until Move the Pro sync and collaboration UI out of core #3333 moves the Pro frontend into nodespace-sync.
- Without the pin gate, the next Pro build silently loses the Collaboration tab and the consent and relogin modals.
Scope
1. Remove the imports
src/lib/plugins/ui-extensions.svelte.ts: deleteimport './pro-plugin';and its comment, and update the module doc.src/lib/plugins/pro-plugin.ts:- delete the
uiExtensionRegistry.register(...)side effect, and the import that is now unused; - keep the named and default exports;
- doc: the extension is registered by a build, through
virtual:nodespace-extensions.
- delete the
2. Explicit registration in pro-sync-variant.test.ts and free-user-guardrail.test.ts
import proExtensions from '$lib/plugins/pro-plugin'.- Call
registerExtensions(proExtensions)inbeforeAll, anduiExtensionRegistry.unregister(<its id>)inafterAll. - Add a one-line comment saying this goes away when the Pro UI leaves core. Delete the Collaboration tab, membership store and service, and the Pro plugin from core #3331 deletes these lines together with
pro-plugin.ts.
3. New src/tests/plugins/core-extension-boundary.test.ts
Write it per #3299's absence-test convention: keep the file free of ratchet markers, and build any needle that would match a marker from fragments.
(a) The virtual module is empty.
virtual:nodespace-extensionsis[].- If
NODESPACE_EXTENSIONSis set, the test fails with the message: unset NODESPACE_EXTENSIONS to run core's test suite. Core's own test runs never set it, and nodespace-sync runs only its own files.
(b) Nothing is registered and nothing runs. Import ui-extensions.svelte.ts, settings-categories.ts and extension-lifecycle.ts with nothing registered. Then:
uiExtensionRegistry.all()is empty;- these all return
[]: both chrome slots, thecollectionviewer tabs, the settings sections, and both settings slots; settingsCategories()equals the visible core categories;collectionTreeRoots()is empty;startExtensions()andnotifyDatabaseActivated('db')call nothing and do not throw;collectExtensionDebugDumps()is{}.
(c) No core module imports the Pro extension.
- No
.tsor.sveltefile undersrc/liborsrc/routesimportspro-plugin. - Check both static and dynamic import specifiers, with comments stripped.
- There are no exemptions.
4. PR description
- The nodespace-sync adaptation described under Context.
- The dev loop for Pro developers:
NODESPACE_EXTENSIONS=src/lib/plugins/pro-plugin.ts bun run --cwd packages/desktop-app dev:tauri.
5. Pro-boundary ratchet
Paste the printed BASELINES. This change lowers the Pro wording removed from the two modules' docs.
Out of scope
- Deleting
pro-plugin.tsor any Pro component (Delete the Collaboration tab, membership store and service, and the Pro plugin from core #3331, Delete the Pro sync store, consent and relogin modals, and the Pro variant machine #3332). - Changes to the registry, the build entry or the host API (Adopt ADR-082's contribution contract: ids, when() predicates, keyed and isolated outlets #3310, Add the virtual:nodespace-extensions build entry and the extension-api import alias #3311, Publish the extension host API: services, ui and testing entries, version policy #3315).
- The nodespace-sync change itself, which happens in its pin-bump PR.
Steps
- Start up as core's
CLAUDE.mddescribes: a worktree namedissue-<N>-drop-pro-import, and self-assign at pickup. - Confirm the pin gate: nodespace-sync's Pro app and Pro daemon build from one pinned core revision, not from core HEAD. Link the evidence in the PR.
- Remove the import and the self-registration, update the two tests, and add the boundary test.
- Verify both bundles, using the commands below.
- Optionally, build the Pro app with nodespace-sync's
build-pro-dmg.shagainst this branch, withNODESPACE_EXTENSIONSexported. - Confirm that the Collaboration tab and the modals appear.
- Optionally, build the Pro app with nodespace-sync's
- Record the sync adaptation in the PR description and on the parent issue.
Acceptance criteria
Core no longer imports the Pro extension:
-
grep -rn pro-plugin packages/desktop-app/src/lib packages/desktop-app/src/routesfinds no import; only the file itself matches.
The bundles:
- The free bundle contains no Pro extension:
bun run --cwd packages/desktop-app build && ! grep -rq 'Collaboration is off for this database' packages/desktop-app/build. That string appears only in a component the Pro extension loads. - The injected build still contains it:
NODESPACE_EXTENSIONS=src/lib/plugins/pro-plugin.ts bun run --cwd packages/desktop-app build && grep -rq 'Collaboration is off for this database' packages/desktop-app/build.
Tests:
-
core-extension-boundary.test.tspasses. It fails when a core module re-adds the import; check this once by mutation, and note it in the PR. -
pro-sync-variant.test.tsandtest:free-userspass with explicit registration. -
bun run test:changedpasses, andquality:fixis clean.
Ratchet:
-
bun run scripts/check-pro-boundary.tsexits 0,BASELINESequal the printed counts, and reductions are lowered.
Tests and verification
bun run test:changed
bun run --cwd packages/desktop-app test src/tests/plugins
bun run --cwd packages/desktop-app test:free-users
bun run --cwd packages/desktop-app build && ! grep -rq 'Collaboration is off for this database' packages/desktop-app/build
NODESPACE_EXTENSIONS=src/lib/plugins/pro-plugin.ts bun run --cwd packages/desktop-app build && grep -rq 'Collaboration is off for this database' packages/desktop-app/build
bun run --cwd packages/desktop-app quality:fix
bun run scripts/check-pro-boundary.ts
Manual checks:
- The free app in
dev:tauriis unchanged: no Collaboration tab. - With
NODESPACE_EXTENSIONS=src/lib/plugins/pro-plugin.ts, against a Pro daemon, the Pro UI appears as before.
Dependencies
- Publish the extension host API: services, ui and testing entries, version policy #3315, and through it Add the virtual:nodespace-extensions build entry and the extension-api import alias #3311, Add settings-section and database settings-slot extension points #3312, Add start, onDatabaseActivated and debugDump extension lifecycle hooks #3313 and Add the collectionTreeRoots extension point to the sidebar collection tree #3314: the build entry that replaces the import, and every extension kind the boundary test covers.
- SYNC pin gate: the Pro app and Pro daemon build from one pinned core revision.
Risks and rollback
- Merging before the pin gate strips the Pro UI from the next Pro release. That is why the gate is a hard dependency.
- A pin bump that forgets the variable ships a Pro app without its UI. The PR description and the parent issue spell out the adaptation, and nodespace-sync can run the bundle grep above as its check.
- The bundle check keys on UI copy. If Move the Pro account, admission and synced-database settings out of core #3327 or Move the Pro sync and collaboration UI out of core #3333 changes that sentence before this lands, pick another string that only the Pro extension's components contain.
- Rollback. Revert the PR. The transitional import and the self-registration come back.
Plan key: C3.5 (pro-boundary DAG).
🤖 Generated with Claude Code
Activity
mstomar125 commentedon Oct 1, 2026
Superseded by #3412 (umbrella against the final ADR-081–085)