Repository navigation
Description
Summary
Delete two pieces of Pro residue that nothing uses:
- the log-only
sync:errorandsync:statuslisteners ininitializeTauriSyncListeners(); scripts/seed-recovered-item.ts, a dev script written for a Pro "Recovered Items" UI that core no longer has.
This issue absorbs #3328, which deleted the same script. #3336 no longer lists it.
Neither change needs a nodespace-sync counterpart or the pin gate, because the Pro build uses neither. Part of #3333 (ADR-081, proposed).
Context
Line numbers are at main @ af8ddb6. If they have shifted, locate the code by the quoted symbol.
The listeners
initializeTauriSyncListeners() in packages/desktop-app/src/lib/services/tauri-sync-listener.ts registers listen('sync:error', …) and listen('sync:status', …) at lines 538-550. Both only log.
sync:error: nothing emits it, neither core's Rust nor the dev proxy.sync:status: only the Pro command layer emits it (src-tauri/src/commands/pro_sync.rs), with the payload{state, detail, user_email, database_id}.- The listener reads
payload.statusandpayload.reason, so it logsSync status: undefined. - The Pro sync store has its own
sync:statuslistener, so the Pro app loses nothing.
- The listener reads
The script
scripts/seed-recovered-item.ts (lines 1-165) appends a synthetic entry to ~/.nodespace/recovered-items-<user>.jsonl, so that the Pro Recovered Items UI could be smoke-tested.
- That store and its badge were already deleted. Comments in three files record the deletion, all under
packages/desktop-app/src/lib:stores/conflicts.svelte.ts:53;components/conflict-indicator-badge.svelte:9;components/layout/app-shell.svelte:74.
- No
package.jsonscript, workflow, doc or test references the script. - CLAUDE.md prefers deleting a one-off script once its purpose is served.
- A copy under
.claude/worktrees/_gate/belongs to the merge gate's checkout and is not a reference. Exclude.claudewhen searching.
Scope
packages/desktop-app/src/lib/services/tauri-sync-listener.ts:- Delete both listeners and their comments (lines 538-550), plus one adjacent blank line.
- Leave the
log.info('Real-time sync listeners initialized successfully')line, the burst coalescing and every other listener untouched.
packages/desktop-app/src/tests/services/tauri-sync-listener.test.ts:- In the registration test under
describe('Environment Detection'), delete these two lines (202-203):expect(mockEventListeners.has('sync:error')).toBe(true)expect(mockEventListeners.has('sync:status')).toBe(true)
- Do not turn them into absence assertions:
- Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299's ratchet already fails if a quoted
sync:*event name comes back (itsproEventsmarker). - A quoted absence check would itself count under that marker, and would need an exemption under Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299's absence-test convention.
- Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299's ratchet already fails if a quoted
- Under
describe('Error Handling'), deleteit('should handle sync:error events')andit('should handle sync:status events')(lines 1263-1281).
- In the registration test under
scripts/seed-recovered-item.ts: delete the file.scripts/check-pro-boundary.ts: lowerBASELINESto the counts the CLI prints.
Out of scope
- The Pro sync store's own
sync:statuslistener (Delete the Pro sync store, consent and relogin modals, and the Pro variant machine #3332), and the one inadd-synced-database-dialog.svelte(Delete the Add synced database dialog and tenant badge from Database settings #3326). - The Rust
sync:statusemitter inpro_sync.rs(Move the Pro Tauri layer out of core: pro_* commands, ProClient, proto, update source #3336). - The historical Recovered Items comments in
conflicts.svelte.ts,conflict-indicator-badge.svelte,app-shell.svelteandconflicts.test.ts(Remove Pro, Supabase and nodespace-sync wording from core comments, docs and the skill #3372). ConflictKind::SupersededEditinpackages/core/src/models/conflict.rs(Move Pro-owned data out of core's data model (ADR-083) #3345).
Steps
- Startup, per core's CLAUDE.md:
- On the primary checkout, run
git status, thengit fetch origin && git pull origin main. - Run
EnterWorktree({name: "issue-<N>-pro-residue-cleanup"}). - Inside the worktree, run
bun install, thenbun run testfor the baseline. - Run
bun run gh:comment <N> "Frontend: X passed",bun run gh:assign <N> "@me"andbun run gh:status <N> "In Progress".
- On the primary checkout, run
- Delete the two listeners from
tauri-sync-listener.ts. - Update the two test locations described under Scope.
- Run
git rm scripts/seed-recovered-item.ts. - Check for leftovers:
rg -n seed-recovered-item . -g '!node_modules' -g '!target' -g '!.claude'finds nothing.rg -n "'sync:(error|status)'" packages/desktop-app/srcfinds only files that other issues own:stores/pro-sync.svelte.tsand its tests (Delete the Pro sync store, consent and relogin modals, and the Pro variant machine #3332);add-synced-database-dialog.svelteand its test, if Delete the Add synced database dialog and tenant badge from Database settings #3326 has not merged yet.
- Run
bun run scripts/check-pro-boundary.tsand paste the printedBASELINESblock intoscripts/check-pro-boundary.ts.- At af8ddb6, this change alone lowers
proEventsby 6,proWordingby 2 andcloudWordingby 1. - Take the real numbers from the CLI.
- At af8ddb6, this change alone lowers
- Finish:
- Run
bun run test:changed. The diff reachesscripts/, so the scripts tier runs. - Run
bun run test:scriptsandbun run quality:scripts:check. - Run
bun run --cwd packages/desktop-app quality:fix, then commit. - Run
git push origin HEAD:issue-<N>-pro-residue-cleanup. The push runs lint only. - Run
gh pr create --repo NodeSpaceAI/nodespace-core --base main --head issue-<N>-pro-residue-cleanup, thenbun run gh:status <N> "In Review". - Run
/pragmatic-code-review, then/address-review. - Merge only after the user approves. Run
bun run merge <PR#>in the background, thenExitWorktree.
- Run
Standards:
- Run tests with
bun run test, neverbun test. - No lint suppression.
- No GitHub issue numbers in code comments.
Acceptance criteria
-
tauri-sync-listener.tsregisters nosync:errororsync:statuslistener. - The registration test no longer lists
sync:*events, and the two log-only tests are gone. -
scripts/seed-recovered-item.tsis deleted, and the search in step 4 finds nothing. -
BASELINESinscripts/check-pro-boundary.tsis lowered to the printed counts, andbun run scripts/check-pro-boundary.tsexits 0. -
bun run test:changed,bun run test:scripts,bun run quality:scripts:checkandbun run --cwd packages/desktop-app quality:fixall pass.
Tests and verification
bun run --cwd packages/desktop-app test src/tests/services/tauri-sync-listener.test.tsbun run test:scripts, which includes Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299's real-repo ratchet test.bun run quality:scripts:check.tsc -p scripts/tsconfig.jsonno longer sees the script.bun run test:changed- No manual check is needed, because neither listener has a visible effect.
Dependencies
- Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299: the ratchet exists, so this PR lowers its baselines.
- No SYNC gate.
Risks and rollback
- Risk: Pro debug logs lose one line, which already printed
undefined. Nothing changes functionally for the free or the Pro app. - Rollback: revert the PR. The revert also restores the previous baselines.
Plan key: C6.1 (pro-boundary DAG).
🤖 Generated with Claude Code
Activity
mstomar125 commentedon Sep 30, 2026
Frontend after change: test:changed passed (frontend Happy-DOM, scripts, browser tiers); tauri-sync-listener.test.ts 50 passed. PR: #3373. Ratchet script not on main yet; delta proEvents -6, proWording -2, cloudWording -1 documented in the PR.
Delete dead Pro residue: sync:* log listeners and the Recovered Items…