Skip to content

Delete the pro_* commands, ProClient, startup Pro probe and Pro rebind from core #3334

Closed as not planned

Description

@mstomar125

Summary

Delete the Pro command layer and the Pro gRPC client from core's desktop app:

  • commands/pro_sync.rs, the 27 pro_* commands;
  • services/pro_client.rs: ProClient, ProTier and the generated nodespace.pro.v1 bindings;
  • the startup Pro capability probe, its pro:tier-detected emit and app_handle.manage(pro);
  • the 27 entries in core_commands();
  • the ProClient::rebind call in probe_and_recover_channel.

Before this merges, the Pro package registers its replacements through #3322's hooks:

  • a Tauri plugin whose commands keep the same payloads; the moved Pro frontend calls the plugin names (ADR-082 (proposed) §3.3);
  • the tier probe, as a channel-ready task;
  • the rebind, as a channel-rebuilt hook;
  • its own copy of the proto.

This PR is a pure deletion. The free app loses one wasted RPC at startup and nothing else.

Context

Scope (locate by symbol; lines at af8ddb6)

  1. Delete src-tauri/src/commands/pro_sync.rs (1-1219). It contains:
    • the module doc and pb imports; DEFAULT_WORKER_URL; STREAM_SPAWNED, SUBSCRIBE_TIMEOUT, RETRY_BACKOFF and MEMBERSHIP_RPC_TIMEOUT;
    • pro_tier, pro_current_status, SyncStatusSnapshot, pro_subscribe_sync_status and emit_disconnected;
    • pro_initiate_oauth, pro_signout, pro_enable_sync and pro_activate_database;
    • the tenant membership and bind commands;
    • the 13 collection-membership, invite and request commands, with their DTOs and membership_client;
    • pro_current_person;
    • the tenant admission commands;
    • mod tests, 13 tests.
  2. Delete src-tauri/src/services/pro_client.rs (1-360). It contains pb, ProClient, ProClientInner, ProTier, the probe, rebind and mod tests (5 tests).
  3. src-tauri/src/commands/mod.rs: remove pub mod pro_sync;.
  4. src-tauri/src/services/mod.rs: remove pub mod pro_client; and pub use pro_client::{ProClient, ProTier};.
  5. src-tauri/src/lib.rs, in run_with (formerly run):
  6. src-tauri/src/commands/nodes.rs probe_and_recover_channel:
    • Delete the rebind block (600-605).
    • Replace its doc paragraph (568-570) with one sentence: channel-rebuilt hooks run inside GrpcClient::reconnect, before the re-probe.
    • Remove the now-unused app: AppHandle parameter, and trim use tauri::{AppHandle, Manager, State}; to use tauri::State;. Nothing else in the file uses the other two.
    • Callers are unaffected: Tauri injects AppHandle itself, and the frontend invokes this command with no arguments (daemon-status.ts:182).

Out of scope

Steps

  1. Run the CLAUDE.md startup sequence with worktree issue-<N>-delete-pro-tauri-layer:

    • git pull origin main;
    • EnterWorktree;
    • bun install;
    • a bun run test baseline;
    • bun run gh:assign <N> "@me";
    • bun run gh:status <N> "In Progress".
  2. Pre-check that no frontend caller or listener is left. Both of these must print nothing. A hit inside a comment that calls nothing is acceptable; list it in the PR.

    rg -n "[\"'\`]pro_[a-z_]+[\"'\`]" packages/desktop-app/src
    rg -n "pro:tier-detected|[\"'\`]sync:(status|error)[\"'\`]" packages/desktop-app/src
    
  3. Confirm the gates:

  4. Make the deletions and edits in Scope.

  5. Build the Pro app from sync, pinned to this PR's head commit, and smoke-test each of these:

    • tier detection;
    • sign-in;
    • the signed-in state after a webview reload;
    • sync:status updates;
    • the collaboration roster;
    • the workspace members card;
    • the add-synced-database dialog;
    • wedge recovery.

    Link the evidence in the PR.

  6. Run bun run scripts/check-pro-boundary.ts and paste the printed BASELINES.

  7. Ship:

    • bun run test:changed;
    • bun run quality:fix, then commit;
    • git push origin HEAD:issue-<N>-delete-pro-tauri-layer;
    • gh pr create --repo NodeSpaceAI/nodespace-core --head issue-<N>-delete-pro-tauri-layer;
    • /pragmatic-code-review, then /address-review;
    • after the user approves, bun run merge <PR#> in the background.

Acceptance criteria

  • pro_sync.rs and pro_client.rs are deleted, together with their module wiring.
  • rg -n -e 'pro_sync|ProClient|ProTier|pro_client|pro:tier-detected|CloudSyncService|nodespace\.pro\.v1|DEFAULT_WORKER_URL' packages/desktop-app/src-tauri/src returns nothing. Point it at the library package's src if Split the desktop Tauri crate and add ADR-082's Tauri extension points #3322 split the crate.
  • core_commands() registers no pro_* command. The startup task makes no CloudSyncService call and has no channel binding.
  • probe_and_recover_channel still rebuilds and re-probes a wedged channel, and Add daemon-ready tasks and a channel-rebuilt hook to AppExtensions #3307's channel-rebuilt hook tests pass.
  • cargo clippy -p nodespace-app --all-targets -- -D warnings -D clippy::unused-async is clean, with no #[allow] added.
  • Free app, run with bun run dev:tauri against a dev daemon:
    • it starts, and the log has no Pro capability probe line;
    • schemas and collections load, through the data-plane event and the reconnect loads;
    • switching databases works, with no invoke error.
  • Evidence from the Pro build is linked in the PR.
  • bun run scripts/check-pro-boundary.ts passes, with BASELINES lowered to the printed counts. Expected at af8ddb6:
    • proNamedFiles −2;
    • proCommands about −95;
    • tenantWording about −79;
    • proProtocol about −63;
    • proWording about −53;
    • proEvents about −16;
    • cloudWording −3;
    • editionBranching −3;
    • cloudBindState −1;
    • proSyncModule −1.

Tests and verification

Dependencies

Risks and rollback


Plan key: C4.5 (pro-boundary DAG).

🤖 Generated with Claude Code

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