Repository navigation
Closed as not planned
5 / 55 of 5 issues completedClosed as not planned
5 / 55 of 5 issues completed
Copy link
Labels
pro-boundaryPro/core boundary: Pro code moves to nodespace-sync (ADR-081..085)
Description
Goal
Remove the Pro sync and collaboration UI from core's desktop app. When this parent closes, core's frontend has none of these:
- a Pro store or a Pro modal;
- a Collaboration tab or a collection-membership client;
- a Pro variant machine;
- a hard-coded Pro lifecycle call.
The Pro app supplies all of it. nodespace-sync builds that app from a pinned core revision plus its own Pro frontend, which plugs into the frontend extension points that #3317 builds (ADR-082, proposed).
Filing:
- Label all six issues
architectureandpro-boundary. - Do not assign anyone at creation. Whoever picks up a sub-issue self-assigns in the startup sequence (
bun run gh:assign <N> "@me").
Context
Decisions
- ADR-081 (proposed): core ships no Pro code, and nodespace-sync owns the Pro app.
- ADR-082 (proposed): defines the frontend extension API.
- The Pro frontend is injected at build time through
virtual:nodespace-extensions, whichNODESPACE_EXTENSIONSsets. - It imports core only through
@nodespace/extension-api. - Contributions carry
when()predicates. - The API includes
collectionTreeRoots, the lifecycle hooksstartandonDatabaseActivated, anddebugDump. - Its host API includes
databases.refreshDatabaseSettings().
- The Pro frontend is injected at build time through
- ADR-083 (proposed) §2: the collections tree stops reading the tenant binding. The Pro frontend names the root to hide through
collectionTreeRoots.
What core holds today (main @ af8ddb6)
Line numbers will shift after #3322's crate split and #3309's moves, so every sub-issue locates code by symbol. Its af8ddb6 line numbers are hints only.
- About 3,000 lines of Pro-only modules under
packages/desktop-app/src/lib:stores/pro-sync.svelte.ts(554 lines);stores/membership.svelte.ts(375);services/membership-service.ts(360);plugins/pro-plugin.ts(99);components/collaboration/*(1,114);components/first-pro-consent-{modal,slot}.svelte(331);components/pro-relogin-{modal,slot}.svelte(209);- the Pro variant machine in
plugins/ui-extensions.svelte.ts(lines 34-106).
- Tests: about 2,000 lines of Pro-only tests in 10 files, the free-user guardrail suite, and Pro assertions in 7 shared test files.
What other parents remove first, so #3333 does not
- Turn the UI-extension registry into ADR-082's build-time frontend extension API #3317:
- Move the Pro variant machine and DATABASE_SETTINGS_NODE_ID out of the generic registry files #3309 moves the Pro variant machine to
plugins/pro-sync-variant.svelte.ts, and its tests totests/plugins/pro-sync-variant.test.ts. - Add start, onDatabaseActivated and debugDump extension lifecycle hooks #3313 adds the lifecycle hooks and the
debugDumploop. It firesonDatabaseActivatedafter the switch's cache eviction. - Stop importing the Pro extension in core; register it only through the build entry #3316 stops core importing
pro-plugin.ts. Two tests then import it explicitly. - Publish the extension host API: services, ui and testing entries, version policy #3315 publishes the host API.
- Add the collectionTreeRoots extension point to the sidebar collection tree #3314 adds
collectionTreeRootsand routescollectionsTreethrough it. It keeps core's tenant-binding fallback until Remove the tenant-binding root fallback from the collections tree #3330.
- Move the Pro variant machine and DATABASE_SETTINGS_NODE_ID out of the generic registry files #3309 moves the Pro variant machine to
- Add a neutral daemon:data-plane-ready event and stop reloading on pro:tier-detected #3318:
- moves the app shell's schema and collection reload from
pro:tier-detectedto the neutraldaemon:data-plane-readyevent; - replaces the tautological
props-driven-componentstest.
- moves the app shell's schema and collection reload from
- Delete the Pro Account section, workspace-members card and tenant-admission calls #3325 deletes:
- the Account section;
- the Invitations inbox, with its design-token entry;
- the workspace-members card;
- the tenant half of
membership-service.ts; databaseStore.proSyncSettled().
- Delete the Add synced database dialog and tenant badge from Database settings #3326 deletes "Add synced database…" and the tenant badge. That removes
proSyncfromdatabase-settings.svelte.
Pro calls left in shared code for #3333
app-shell.sveltecallsproSync.start()on every launch. Community builds therefore invokepro_tier,pro_current_statusandpro_subscribe_sync_status, which do nothing.database.svelte.ts:- invokes
pro_activate_databaseon every load and switch; - invalidates the Pro membership cache;
- hydrates and pins the
DatabaseSettingsNode, only so that the Pro variant machine can readsync_enabledandauth_status.
- invokes
collections.svelte.tshides the Pro tenant's workspace root (boundTenantCollection, falling back toROOT_COLLECTION_ID).tauri-sync-listener.tslogssync:*events that nothing useful emits.debug-channel.tsdumpsproSync.
Gate semantics
- How the Pro GUI is built. nodespace-sync builds it from core's desktop app, through
.github/workflows/release.yml,scripts/build-pro-dmg.shandscripts/build-pro-pkg.sh.- Today the Pro GUI builds from core's current HEAD, while the Pro daemon is already pinned.
- ADR-082 moves the Pro GUI onto the same pinned revision.
- The pin gate. Stop driving Pro sync lifecycle from the app shell, database store and debug channel #3329, Remove the tenant-binding root fallback from the collections tree #3330, Delete the Collaboration tab, membership store and service, and the Pro plugin from core #3331 and Delete the Pro sync store, consent and relogin modals, and the Pro variant machine #3332 each change or delete something the Pro GUI build consumes. Each one depends on the canonical pin gate
SYNC:Pro GUI and Pro daemon build from one pinned core rev.- Once that gate holds, core merges first.
- nodespace-sync keeps building from its previous pin, and adapts in the PR that moves its pin past the change (ADR-083 §7).
- SYNC counterparts (a) to (c), under Dependencies, block this parent only.
- The parent closes when a Pro app built at a pin past Delete the Pro sync store, consent and relogin modals, and the Pro variant machine #3332 works with them.
- They are not copied onto the sub-issues.
- Turning on the hooks. nodespace-sync should turn on its own
startandonDatabaseActivatedhooks in the same pin bump that crosses Stop driving Pro sync lifecycle from the app shell, database store and debug channel #3329. That way core'sproSyncand the Pro frontend's copy never both run. The simplest way is to cross Delete the Pro Account section, workspace-members card and tenant-admission calls #3325, Delete the Add synced database dialog and tenant badge from Database settings #3326 and Stop driving Pro sync lifecycle from the app shell, database store and debug channel #3329 in one pin bump.
Scope overview
| Area | Core change | Sub-issue |
|---|---|---|
Dead residue: the sync:error and sync:status log listeners, and scripts/seed-recovered-item.ts (absorbs #3328) |
Delete | #3328 |
Pro lifecycle in shared code: proSync.start() in the app shell; activateProSync, the membership invalidation and the automatic settings hydration in the database store; the proSync debug dump |
Delete. The Pro frontend does the same work through #3313's start, onDatabaseActivated and debugDump. refreshDatabaseSettings() stays as an ADR-082 host-API method that core no longer calls |
#3329 |
The tenant-root fallback in the collections tree (boundTenantCollection, ROOT_COLLECTION_ID) |
Delete. The tree hides only what collectionTreeRoots contributions name |
#3330 |
Collaboration UI: pro-plugin.ts, components/collaboration/*, and the membership store and service |
Delete | #3331 |
Sync UI: the proSync store, the consent and relogin modals, pro-sync-variant.svelte.ts, the free-user guardrail suite and test:free-users |
Delete | #3332 |
Not in #3333:
- the Pro Tauri commands, the
pro:tier-detectedemit and the app-shell reload (Move the Pro Tauri layer out of core: pro_* commands, ProClient, proto, update source #3336, Add a neutral daemon:data-plane-ready event and stop reloading on pro:tier-detected #3318); - Account, the Invitations inbox, workspace members,
proSyncSettledand "Add synced database…" (Move the Pro account, admission and synced-database settings out of core #3327); DatabaseInfo.boundTenant*and the settings-node fields (Move Pro-owned data out of core's data model (ADR-083) #3345);- the Labs flag (Add the "Share / Sync this database" entry point that opens nodespace.ai #3362);
- rewording the remaining comments, including the
daemon-status.tsandisActiveDatabaseEventdocs (Remove Pro and cloud-sync wording from frontend comments, tests and the fly-out tooltip #3366); - the extension registry, hooks,
collectionTreeRootsand host API (Turn the UI-extension registry into ADR-082's build-time frontend extension API #3317).
Sub-issues (in order)
| Key | Title | Direct deps | Size |
|---|---|---|---|
| #3328 | Delete dead Pro residue: sync:* log listeners and the Recovered Items seed script | #3299 | S |
| #3329 | Stop driving Pro sync lifecycle from the app shell, database store and debug channel | #3299, #3313, #3315, #3318, #3325, pin gate | M |
| #3330 | Remove the tenant-binding root fallback from the collections tree | #3299, #3314, NodeSpaceAI/nodespace-docs#92 (ADR-083), pin gate | S |
| #3331 | Delete the Collaboration tab, membership store and service, and the Pro plugin from core | #3299, #3316, #3325, #3329, pin gate | M |
| #3332 | Delete the Pro sync store, consent and relogin modals, and the Pro variant machine | #3299, #3326, #3331, pin gate | M |
C6.1 needs only C1.1
C6.2 ──► C6.4a ──► C6.4b C6.4a also needs C3.5 and C5.2; C6.4b also needs C5.3
C6.3 needs C3.7 and D3
- Delete dead Pro residue: sync:* log listeners and the Recovered Items seed script #3328 can land as soon as Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299 has.
- Stop driving Pro sync lifecycle from the app shell, database store and debug channel #3329 and Remove the tenant-binding root fallback from the collections tree #3330 do not depend on each other.
- Delete the Collaboration tab, membership store and service, and the Pro plugin from core #3331 and Delete the Pro sync store, consent and relogin modals, and the Pro variant machine #3332 only delete code, and must run in that order. The collaboration components import
proSyncand the variant functions that Delete the Pro sync store, consent and relogin modals, and the Pro variant machine #3332 deletes. - Every sub-issue lowers
BASELINESinscripts/check-pro-boundary.ts(Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299) in the same PR.
Acceptance criteria
- All five sub-issues are merged.
- This search finds no code in
packages/desktop-app/src, only comments on Add the "Share / Sync this database" entry point that opens nodespace.ai #3362's or Remove Pro and cloud-sync wording from frontend comments, tests and the fly-out tooltip #3366's lists:rg -n "pro-sync|proSync|membership-service|stores/membership|components/collaboration|pro-plugin|first-pro-consent|pro-relogin|resolveProSyncVariant|isProSyncActive|ProSyncVariant|ROOT_COLLECTION_ID|activateProSync|proActivateChain|proSyncSettled" packages/desktop-app/src - No core frontend code invokes a
pro_*command, or listens forpro:tier-detected,sync:statusorsync:error. -
packages/desktop-app/package.jsonhas notest:free-usersscript. Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299's ratchet now holds the guarantee that core has no Pro frontend. -
packages/desktop-app/design-tokens-baseline.jsonhas no entry for a deleted file, andquality:design-tokenspasses. - After every sub-issue:
- core builds;
bun run testand the merge gate pass;bun run scripts/check-pro-boundary.tsexits 0 with loweredBASELINES.
- After every sub-issue, the free app is unchanged. Check against an isolated
NODESPACE_HOME:- a cold start loads schemas and collections;
- switching databases works;
- collection pages show no tab strip;
- no Pro modal appears.
- A Pro app built by nodespace-sync at a pin past Delete the Pro sync store, consent and relogin modals, and the Pro variant machine #3332, with counterparts (a) to (c), works:
- sign-in, then the consent modal, then connected;
- the relogin modal on an expired session;
- the Collaboration tab's roster and invites;
- sync re-targets on a database switch;
- the workspace root stays hidden in the sidebar.
- The open collaboration-view follow-up issue (core#3296) is transferred to nodespace-sync, in Delete the Collaboration tab, membership store and service, and the Pro plugin from core #3331.
Dependencies
- ADRs: ADR-081 (NodeSpaceAI/nodespace-docs#88 (ADR-081)). ADR-083 (NodeSpaceAI/nodespace-docs#92 (ADR-083)), for Remove the tenant-binding root fallback from the collections tree #3330. ADR-082 (NodeSpaceAI/nodespace-docs#90 (ADR-082)) comes in through Turn the UI-extension registry into ADR-082's build-time frontend extension API #3317.
- Core: Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299 (the ratchet), Turn the UI-extension registry into ADR-082's build-time frontend extension API #3317 (Add start, onDatabaseActivated and debugDump extension lifecycle hooks #3313, Stop importing the Pro extension in core; register it only through the build entry #3316, Publish the extension host API: services, ui and testing entries, version policy #3315 and Add the collectionTreeRoots extension point to the sidebar collection tree #3314), Add a neutral daemon:data-plane-ready event and stop reloading on pro:tier-detected #3318, and Move the Pro account, admission and synced-database settings out of core #3327 (Delete the Pro Account section, workspace-members card and tenant-admission calls #3325 and Delete the Add synced database dialog and tenant badge from Database settings #3326).
- Pin gate:
SYNC:Pro GUI and Pro daemon build from one pinned core rev, on Stop driving Pro sync lifecycle from the app shell, database store and debug channel #3329, Remove the tenant-binding root fallback from the collections tree #3330, Delete the Collaboration tab, membership store and service, and the Pro plugin from core #3331 and Delete the Pro sync store, consent and relogin modals, and the Pro variant machine #3332. - SYNC counterparts for this parent (nodespace-sync, filed later):
- (a) The Pro frontend package owns its own copies of everything Delete the Collaboration tab, membership store and service, and the Pro plugin from core #3331 and Delete the Pro sync store, consent and relogin modals, and the Pro variant machine #3332 delete.
NODESPACE_EXTENSIONSinjects it throughvirtual:nodespace-extensions, it imports core only through@nodespace/extension-api, and the Pro release build uses it. - (b) It drives the Pro lifecycle through Add start, onDatabaseActivated and debugDump extension lifecycle hooks #3313's hooks:
lifecycle.startrunsproSync.start();lifecycle.onDatabaseActivatedfires after the switch'sclearAll(), and runs the serializedpro_activate_database, the membership cache invalidation anddatabases.refreshDatabaseSettings();debugDumpreturns theproSyncsnapshot.
- (c) It contributes
collectionTreeRoots: the active database's bound tenant collection, falling back to the legacy root idc0000000-0000-0000-0000-000000000001.
- (a) The Pro frontend package owns its own copies of everything Delete the Collaboration tab, membership store and service, and the Pro plugin from core #3331 and Delete the Pro sync store, consent and relogin modals, and the Pro variant machine #3332 delete.
- Downstream:
- Delete the pro_* commands, ProClient, startup Pro probe and Pro rebind from core #3334 can delete the
pro:tier-detectedemit and thepro_*commands once Move the Pro sync and collaboration UI out of core #3333 has removed their last frontend callers. - Move Pro-owned data out of core's data model (ADR-083) #3345's registry, proto and DTO change for
boundTenant*waits for Remove the tenant-binding root fallback from the collections tree #3330 and Delete the Pro sync store, consent and relogin modals, and the Pro variant machine #3332 (ADR-083 §7). - Add the "Share / Sync this database" entry point that opens nodespace.ai #3362 removes
labsFlags.syncEnabledonce Move the Pro account, admission and synced-database settings out of core #3327 and Delete the Pro sync store, consent and relogin modals, and the Pro variant machine #3332 have removed its readers. - Remove Pro and cloud-sync wording from frontend comments, tests and the fly-out tooltip #3366 rewords what Move the Pro sync and collaboration UI out of core #3333 leaves. It skips the
daemon-reconnect-retry.test.tscomment and theisActiveDatabaseEventtest title indatabase.test.ts, which Stop driving Pro sync lifecycle from the app shell, database store and debug channel #3329 owns.
- Delete the pro_* commands, ProClient, startup Pro probe and Pro rebind from core #3334 can delete the
Plan key: C6 (pro-boundary DAG).
🤖 Generated with Claude Code
Sub-issues
Collapse Sub-issuesSub-issues
Loading 5 sub-issues
Metadata
Metadata
Assignees
Labels
pro-boundaryPro/core boundary: Pro code moves to nodespace-sync (ADR-081..085)
Activity
mstomar125 commentedon Oct 1, 2026
Superseded by #3412 (umbrella against the final ADR-081–085)