Repository navigation
Description
Spun off from architectural-audit #1228 (the C1b re-audit). This is NOT the C1b refactor — that re-audit concluded the data-vs-hierarchy ownership boundary is already clean (structureTree owns edges, shared-node-store owns the data cache + OCC, reactive-node-service holds no node data, per
frontend-state-and-persistence.md). What remains is dead code left behind by the C2/C2b/C3a/C5 work. Per CLAUDE.md's "delete dead code / no@deprecated" rule, clean it up.
Dead code to delete (all in packages/desktop-app/src/lib/services/shared-node-store.svelte.ts unless noted)
-
validateNodeReferences(~:2255) — carries a@deprecatedJSDoc tag (banned by project rules); only tests call it. Delete + its tests. -
ensureAncestorChainPersisted(~:2241) — no-op stub ("Backend handles relationships via graph edges"). No production caller (the only hit,navigation-service.ts:92, is a stale comment). Delete + fix the stale comment. - Pre-C5 client-side conflict subsystem —
detectConflict(:2329),handleConflict(:2356),setConflictResolver/getConflictResolver(:2389/:2396), theconflictResolverfield (:513), andcreateDefaultResolver. This is the client-side conflict detection path that ADR-026's C5 amendment made the daemon own ("the client consumes the verdict; it does not guess"). Still wired intoupdateNode(~:935-938) but only reachable if a caller setspreviousVersion— no production caller does (only tests).⚠️ Verify no caller passespreviousVersionbefore deleting; this touches the liveupdateNodepath. KeepconflictNotifications(the daemon-OCC path uses it). - Dead
OptimisticOperationManager—packages/desktop-app/src/lib/services/optimistic-operation-manager.svelte.tsis imported only by its own test; the service does snapshot/rollback inline. Delete the file + its test (the inline rollback already works — don't wire it in).
Doc fixes (packages/nodespace-docs/architecture/frontend-state-and-persistence.md — nodespace-docs repo, doc/ branch)
- Line ~425: lists
reactive-structure-tree.svelte.tsunderservices/— it's instores/. Fix the path. - Line ~154: claims indent/outdent use
OptimisticOperationManager— OOM is dead; the service uses inline rollback. Fix the claim.
Stale comments (doc nits, low priority)
-
reactive-node-service.svelte.ts:4-8"Phase 1.2 / Backward compatible" header — describes a finished migration. Update/remove. -
reactive-node-service.svelte.ts:~1632ReactiveNodeServicealias-export comment — stale.
Acceptance criteria
- All five vestigial members + their tests deleted; no
@deprecatedtags remain in the store. -
optimistic-operation-manager.svelte.ts+ its test deleted (or, if a reason to keep emerges, documented — but inline rollback works, so default is delete). - Confirmed no production caller passes
previousVersiontoupdateNodebefore removing the conflict subsystem. -
conflictNotificationsand the daemon-OCC conflict path (from C5/C5: Replace the client-side 5s conflict heuristic with the daemon's authoritative OCC version conflict (amends ADR-026) #1273) are untouched and still work. - Doc path + OOM claim fixed in
frontend-state-and-persistence.md(separatedoc/PR in nodespace-docs). - No lint suppression.
bun run testandbun run checkgreen.
Testing
-
bun run test(neverbun test) green after removals — especially the store + conflict tests (the conflict-subsystem removal is the one with live-path risk). -
bun run checkclean (no dangling type refs from the deleted members/file). -
bun run test:allbefore PR.
Risk
- Low overall (dead-code removal), with ONE caution: the
detectConflict/conflictResolversubsystem is reachable via the liveupdateNodepath. Verify it's truly dead (nopreviousVersioncaller) before deleting; if a caller exists, surface it rather than forcing the delete.
Standard NodeSpace startup / PR sequence
EnterWorktree({name: "issue-<N>-frontend-deadcode-cleanup"}), bun install, bun run test baseline, gh:*. createLogger not console; bun run test not bun test. Before PR: bun run test:all + bun run check, bun run quality:fix + commit, bun run gh:pr <N>, /pragmatic-code-review, then ExitWorktree + gh pr merge --squash --delete-branch. The doc fix is a small separate PR in nodespace-docs on a doc/ branch.
Spun off from #1228 (architectural audit), C1b re-audit — residual dead-code cleanup (C1b itself is resolved, no refactor needed).
Activity
malibio commentedon May 30, 2026
Frontend: 133 passed (3858 tests)
Frontend dead-code cleanup: vestigial conflict/validation members + d…