Skip to content

Move the Pro sync and collaboration UI out of core #3333

Closed as not planned
5 of 5 issues completed
Closed as not planned

Description

@mstomar125

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 architecture and pro-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, which NODESPACE_EXTENSIONS sets.
    • It imports core only through @nodespace/extension-api.
    • Contributions carry when() predicates.
    • The API includes collectionTreeRoots, the lifecycle hooks start and onDatabaseActivated, and debugDump.
    • Its host API includes databases.refreshDatabaseSettings().
  • 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

Pro calls left in shared code for #3333

  • app-shell.svelte calls proSync.start() on every launch. Community builds therefore invoke pro_tier, pro_current_status and pro_subscribe_sync_status, which do nothing.
  • database.svelte.ts:
    • invokes pro_activate_database on every load and switch;
    • invalidates the Pro membership cache;
    • hydrates and pins the DatabaseSettingsNode, only so that the Pro variant machine can read sync_enabled and auth_status.
  • collections.svelte.ts hides the Pro tenant's workspace root (boundTenantCollection, falling back to ROOT_COLLECTION_ID).
  • tauri-sync-listener.ts logs sync:* events that nothing useful emits.
  • debug-channel.ts dumps proSync.

Gate semantics

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:

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

Acceptance criteria

Dependencies


Plan key: C6 (pro-boundary DAG).

🤖 Generated with Claude Code

Sub-issues

Sub-issues

5 of 5 Issues completed
Loading 5 sub-issues

Activity

  1. self-assigned this
    on Sep 30, 2026
  2. added
    pro-boundary
    on Sep 30, 2026
  3. mstomar125 commented on Oct 1, 2026

    @mstomar125
    ContributorAuthor

    Superseded by #3412 (umbrella against the final ADR-081–085)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

pro-boundary

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions