Repository navigation
Description
Overview
A dead-code sweep of nodespace-core (Rust: cargo clippy --workspace --all-targets -W dead_code -W unused plus a repo-wide grep for #[allow(dead_code)]/#[deprecated]) came back completely clean — zero findings. The Rust side of this repo is genuinely well-maintained against the project's no-dead-code policy.
A follow-up lighter pass over packages/desktop-app/src/lib/ (grep every non-test .ts/.svelte file's basename against every import/reference in the whole repo, including .claude/worktrees/) turned up 4 real orphaned Svelte components — each verified individually, not just by the automated grep, to rule out dynamic imports, string-keyed registries, and stale-worktree false positives.
Problem Statement
None of these 4 files are imported, re-exported, or referenced anywhere outside themselves:
-
packages/desktop-app/src/lib/components/version-conflict-modal.svelte(383 lines) — the old OCC-era conflict-resolution modal from issue [DRAFT] Add Optimistic Concurrency Control to NodeOperations #333 (commit422c9a4b). Its siblingversion-conflict-resolverwas already deleted in "Delete 15 obsolete services replaced by LIVE SELECT" (Delete 15 obsolete services replaced by LIVE SELECT #594), but this modal was missed. The conflict-handling architecture has since moved on entirely: commitf68f31d6("Replace_possible_duplicatewith a generic conflict journal", ADR-068, Replace _possible_duplicate with a generic conflict journal (ADR-068) #2534) introduced the current, actually-wired conflict UI —lib/stores/conflicts.svelte.ts,lib/components/conflict-indicator-badge.svelte,lib/components/conflict-toast.svelte,lib/components/conflicts/conflicts-pane.svelte. This file is a leftover from the pre-ADR-068 design. -
packages/desktop-app/src/lib/components/agents/ai-onboarding-dialog.svelte(513 lines) andpackages/desktop-app/src/lib/components/agents/agent-selector.svelte(196 lines) — an ACP-agent-selection/onboarding UI pair from the original AI chat integration (feat: Chat UI, agent panel, model settings, and AI onboarding #1024, feat: Complete AI chat integration — ACP agents + local LLM with tool calling #1042). The AI chat viewer (lib/components/viewers/ai-chat-node-viewer.svelte) does not import either; it uses a different, apparently-later pair instead (lib/components/viewers/ai-chat-model-selector.svelteandlib/components/viewers/ai-chat-pty-session.svelte).ai-onboarding-dialog.sveltewas touched as recently as commit38fc4b84(2026-09-08, "Replace Gemini CLI with Antigravity CLI"), but that edit was a pureGemini CLI→Antigravity CLIstring find-replace across the codebase (confirmed viagit show), not evidence of active wiring — the file has had zero real importers throughout. -
packages/desktop-app/src/lib/components/chat/tool-call-display.svelte(144 lines) — a component for renderingToolExecutionRecordtool-call details in chat.ToolExecutionRecord/toolExecutionsdata is tracked in the AI chat data model and covered by tests (tests/components/ai-chat-viewer.test.ts, archival logic inai-chat-node-viewer.svelte), but no rendering path actually usesToolCallDisplay—chat-message.svelte(the component that renders each chat message) has zero references to tool calls at all. This looks like a feature that was built but never wired into the message-rendering path.
Verification method for all 4: grep -rn (case-insensitive, both kebab-case filename and PascalCase component name) across every .ts/.svelte/.js/.json file in the repo, explicitly excluding the stale .claude/worktrees/ copies (which are unrelated duplicate checkouts, not real usages) — zero hits outside each file's own definition.
Not filed as dead code (investigated, ruled out)
packages/desktop-app/src/lib/components/viewers/base-viewer.ts— also has zero importers, but its own doc comment states it is "for documentation and implementation guidance only" (the real contract lives inNodeViewerProps/node-viewers.ts). Intentional, not dead.packages/desktop-app/src/lib/services/developer-inspector.ts— also has zero importers, but is explicitly named as an intentionally-kept dev-only debugging tool:CLAUDE.md's logging-standards section calls out "Test files and DeveloperInspector are exempt," andvitest.config.tsexcludes it from coverage with the comment "Dev-only debugging tool." Documented intent, not dead.
Proposed Solution
Delete the 4 files (and anything that becomes newly-unused as a result, e.g. any type/import that only they consumed):
packages/desktop-app/src/lib/components/version-conflict-modal.sveltepackages/desktop-app/src/lib/components/agents/ai-onboarding-dialog.sveltepackages/desktop-app/src/lib/components/agents/agent-selector.sveltepackages/desktop-app/src/lib/components/chat/tool-call-display.svelte
If any of these represent a feature someone intends to finish wiring up (e.g. tool-call rendering in chat, or an ACP onboarding flow), the alternative is to actually wire it in — but that's a product decision for whoever picks this up, not implied by this filing.
Acceptance Criteria
- All 4 files deleted, or explicitly wired into a real caller with a comment/PR explaining the decision to keep instead
-
bun run quality:fixandbun run test:allclean after removal (no orphaned imports/types left behind) - If
lib/components/agents/ends up empty after removing both files in it, remove the directory too
Reference Files
packages/desktop-app/src/lib/components/version-conflict-modal.sveltepackages/desktop-app/src/lib/components/agents/ai-onboarding-dialog.sveltepackages/desktop-app/src/lib/components/agents/agent-selector.sveltepackages/desktop-app/src/lib/components/chat/tool-call-display.sveltepackages/desktop-app/src/lib/components/conflicts/conflicts-pane.svelte(current conflict UI, for contrast)packages/desktop-app/src/lib/components/viewers/ai-chat-model-selector.svelte,ai-chat-pty-session.svelte(current agent-selection UI, for contrast)
Priority
Low — pure cleanup, no functional impact; these components are unreachable from the app today.
Activity
mstomar125 commentedon Sep 14, 2026
Starting work on this issue in worktree
issue-2580-orphaned-components. Baselinebun run testclean (240 files, 4951 tests passed). Re-verifying each of the 4 files is still genuinely orphaned before deleting.mstomar125 commentedon Sep 14, 2026
Resolved in #2602.
Re-verified all 4 files immediately before deletion (repo-wide grep, both kebab-case filenames and PascalCase component names, excluding
.claude/worktrees/andnode_modules/) — all still had zero importers outside their own definitions, so nothing changed since filing. No discrepancies found; all 4 were deleted as proposed:packages/desktop-app/src/lib/components/version-conflict-modal.sveltepackages/desktop-app/src/lib/components/agents/ai-onboarding-dialog.sveltepackages/desktop-app/src/lib/components/agents/agent-selector.sveltepackages/desktop-app/src/lib/components/chat/tool-call-display.sveltelib/components/agents/was empty afterward and was removed with its contents, per the acceptance criteria. No co-located test files existed for any of the 4, so nothing else needed removing.1236 lines removed, 0 added.
bun run quality:fixandbun run test:allboth clean, and the pre-push gate (test:all + cargo build --bin nodespaced + full e2e suite) passed with zero failures.PR: #2602 (Closes #2580)