Repository navigation
Description
Summary
Delete the Pro command layer and the Pro gRPC client from core's desktop app:
commands/pro_sync.rs, the 27pro_*commands;services/pro_client.rs:ProClient,ProTierand the generatednodespace.pro.v1bindings;- the startup Pro capability probe, its
pro:tier-detectedemit andapp_handle.manage(pro); - the 27 entries in
core_commands(); - the
ProClient::rebindcall inprobe_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
-
Every
pro_*command has frontend callers until Move the Pro account, admission and synced-database settings out of core #3327 and Move the Pro sync and collaboration UI out of core #3333 move them:membership-service.ts;- the
pro-syncandmembershipstores; database.svelte.ts, which callspro_activate_databaseon every database switch;- the account, admission and add-synced-database settings surfaces;
first-pro-consent-slotandpro-relogin-*.
Deleting a command while a caller remains turns that call into a rejected invoke. In the free app, that would hit startup (
proSync.start()invokespro_tier) and every database switch. -
The free app's reload no longer depends on
pro:tier-detected. Add a neutral daemon:data-plane-ready event and stop reloading on pro:tier-detected #3318 moved it todaemon:data-plane-ready. -
After Route the desktop app through run(extensions, context) with no extensions in core #3306, the 27 entries live in
core_commands()'scommand_set![…]. At af8ddb6 they are intauri::generate_handler![…],lib.rs710-736. -
After Add daemon-ready tasks and a channel-rebuilt hook to AppExtensions #3307:
- channel-ready hooks take their channel from the managed
GrpcClient, solet channel = grpc_client.channel().await;(597) serves only the Pro probe; - channel-rebuilt hooks run inside
GrpcClient::reconnect, so nothing inprobe_and_recover_channelhas to call one; - the
GrpcClientchannel docs are already reworded.
- channel-ready hooks take their channel from the managed
-
The pin gate. sync builds the Pro GUI from a pinned core rev, so this deletion reaches Pro only at sync's next pin bump. By then its own copy is live.
Scope (locate by symbol; lines at af8ddb6)
- Delete
src-tauri/src/commands/pro_sync.rs(1-1219). It contains:- the module doc and
pbimports;DEFAULT_WORKER_URL;STREAM_SPAWNED,SUBSCRIBE_TIMEOUT,RETRY_BACKOFFandMEMBERSHIP_RPC_TIMEOUT; pro_tier,pro_current_status,SyncStatusSnapshot,pro_subscribe_sync_statusandemit_disconnected;pro_initiate_oauth,pro_signout,pro_enable_syncandpro_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.
- the module doc and
- Delete
src-tauri/src/services/pro_client.rs(1-360). It containspb,ProClient,ProClientInner,ProTier, the probe,rebindandmod tests(5 tests). src-tauri/src/commands/mod.rs: removepub mod pro_sync;.src-tauri/src/services/mod.rs: removepub mod pro_client;andpub use pro_client::{ProClient, ProTier};.src-tauri/src/lib.rs, inrun_with(formerlyrun):- Setup comments (488-490, 592-594): drop "and Pro probe", and name the data-plane readiness check instead.
- Delete
let channel = grpc_client.channel().await;(597). - Delete the probe block (607-635). That covers:
ProClient::probe_on_channel;- the tier, status and attribution reads;
- the payload;
app_handle.manage(pro);- the
pro:tier-detectedemit; - the
Pro capability probe donelog line.
- Delete the 27
commands::pro_sync::*entries fromcore_commands(). - Keep
use tauri::Emitter;, which Add a neutral daemon:data-plane-ready event and stop reloading on pro:tier-detected #3318's emit uses. Also keep Add a neutral daemon:data-plane-ready event and stop reloading on pro:tier-detected #3318's data-plane block and Add daemon-ready tasks and a channel-rebuilt hook to AppExtensions #3307'srun_channel_ready_hooks(call.
src-tauri/src/commands/nodes.rsprobe_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: AppHandleparameter, and trimuse tauri::{AppHandle, Manager, State};touse tauri::State;. Nothing else in the file uses the other two. - Callers are unaffected: Tauri injects
AppHandleitself, and the frontend invokes this command with no arguments (daemon-status.ts:182).
Out of scope
- The vendored proto, its build step and its build deps (Delete the vendored nodespace_pro.proto, its build.rs step and its build-only deps #3335).
- The update source (Delete the Pro arm of core's built-in update source and its worker parsing #3323).
is_pro_build(), sockets, launchd labels andtauri.pro.conf.json(Remove Pro edition branching from the core app, daemon, CLI and installer #3357).- The frontend Pro UI and stores (Move the Pro account, admission and synced-database settings out of core #3327, Move the Pro sync and collaboration UI out of core #3333).
- Pro wording elsewhere in the codebase (Remove Pro, Supabase and nodespace-sync wording from core comments, docs and the skill #3372).
Steps
-
Run the CLAUDE.md startup sequence with worktree
issue-<N>-delete-pro-tauri-layer:git pull origin main;EnterWorktree;bun install;- a
bun run testbaseline; bun run gh:assign <N> "@me";bun run gh:status <N> "In Progress".
-
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 -
Confirm the gates:
- the Pro GUI builds from the pinned core rev;
- sync's main registers the Pro plugin,
ProClient, the tier probe and the rebind through Split the desktop Tauri crate and add ADR-082's Tauri extension points #3322's hooks.
-
Make the deletions and edits in Scope.
-
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:statusupdates;- the collaboration roster;
- the workspace members card;
- the add-synced-database dialog;
- wedge recovery.
Link the evidence in the PR.
-
Run
bun run scripts/check-pro-boundary.tsand paste the printedBASELINES. -
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.rsandpro_client.rsare 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/srcreturns nothing. Point it at the library package'ssrcif Split the desktop Tauri crate and add ADR-082's Tauri extension points #3322 split the crate. -
core_commands()registers nopro_*command. The startup task makes noCloudSyncServicecall and has nochannelbinding. -
probe_and_recover_channelstill 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-asyncis clean, with no#[allow]added. - Free app, run with
bun run dev:tauriagainst a dev daemon:- it starts, and the log has no
Pro capability probeline; - schemas and collections load, through the data-plane event and the reconnect loads;
- switching databases works, with no invoke error.
- it starts, and the log has no
- Evidence from the Pro build is linked in the PR.
-
bun run scripts/check-pro-boundary.tspasses, withBASELINESlowered to the printed counts. Expected at af8ddb6:proNamedFiles−2;proCommandsabout −95;tenantWordingabout −79;proProtocolabout −63;proWordingabout −53;proEventsabout −16;cloudWording−3;editionBranching−3;cloudBindState−1;proSyncModule−1.
Tests and verification
- 18 unit tests are deleted with the code: 13 in
pro_sync.rsand 5 inpro_client.rs. They move to sync, and core gets no replacement. bun run rust:test:app-unitscargo clippy -p nodespace-app --all-targets -- -D warnings -D clippy::unused-asynccargo fmt --all --checkNODESPACE_PRO_SUPABASE_URL=https://example.invalid NODESPACE_PRO_ANON_KEY=dummy cargo check -p nodespace-appbun run test:changed. The merge gate also runs the Tauri-seam integration tests, including Add a neutral daemon:data-plane-ready event and stop reloading on pro:tier-detected #3318's data-plane test and Add daemon-ready tasks and a channel-rebuilt hook to AppExtensions #3307's hook tests.
Dependencies
- NodeSpaceAI/nodespace-docs#88 (ADR-081)
- Add daemon-ready tasks and a channel-rebuilt hook to AppExtensions #3307
- Add a neutral daemon:data-plane-ready event and stop reloading on pro:tier-detected #3318
- Move the Pro account, admission and synced-database settings out of core #3327
- Move the Pro sync and collaboration UI out of core #3333
- SYNC: Pro GUI and Pro daemon build from one pinned core rev
- SYNC: Pro package registers its Tauri plugin (the
pro_*commands with the same payloads; the moved Pro frontend calls the plugin names),ProClient, tier probe and channel-rebuilt rebind via core hooks, and vendorsnodespace_pro.proto
Risks and rollback
- A frontend caller slips through. Its invoke would reject with "command not found". The pre-check in step 1 guards against this.
- Pro regression if the gates are skipped. A Pro build pinned past this commit without sync's copy would lose sign-in, sync status and collaboration.
- Both copies run until this merges. Core's probe and sync's channel-ready task both run and both emit
pro:tier-detected. That is harmless: the reload it triggers is idempotent, and the two client types are distinct. Plugin commands are namespaced, so they don't collide with core's barepro_*names. - Rollback: revert this PR. It is a pure deletion with no data or state changes. If Delete the vendored nodespace_pro.proto, its build.rs step and its build-only deps #3335 has already landed, revert Delete the vendored nodespace_pro.proto, its build.rs step and its build-only deps #3335 first.
Plan key: C4.5 (pro-boundary DAG).
🤖 Generated with Claude Code
Activity
mstomar125 commentedon Oct 1, 2026
Superseded by #3412 (umbrella against the final ADR-081–085)