Repository navigation
Description
Overview
Remove commands/diagnostics.rs from the Tauri app and implement diagnostics as a nodespace diagnostics CLI subcommand. No gRPC service is needed — diagnostics are a developer debugging tool, not a production UI feature.
Problem Statement
commands/diagnostics.rs reports database path, DB existence, directory size, node counts, and recent node IDs. Under ADR-031 this data lives in nodespaced, not the Tauri process, so the existing Tauri command cannot access it correctly. The intended audience (developers debugging persistence issues) uses the CLI, not the UI — a CLI subcommand is the correct surface. Keeping a Tauri diagnostics command would require a dedicated gRPC service for debugging data, which is not worth the maintenance overhead.
Proposed Solution
Delete commands/diagnostics.rs from the Tauri app. Implement nodespace diagnostics as a CLI subcommand in packages/cli that queries NodeService and SettingsService via gRPC and prints a human-readable summary to stdout.
Technical Specifications
Files to delete
packages/desktop-app/src-tauri/src/commands/diagnostics.rs- All references in
packages/desktop-app/src-tauri/src/lib.rsandmain.rs
Files to create
packages/cli/src/commands/diagnostics.rs—nodespace diagnosticssubcommand
Reference Files
packages/desktop-app/src-tauri/src/commands/diagnostics.rs— existing implementation; preserve the reported fields in the CLI outputpackages/daemon/src/services/node_service.rs— gRPC calls for node count, root count, recent node IDspackages/cli/src/main.rs— register new subcommand here
CLI output format
NodeSpace Diagnostics
─────────────────────────────────────
Database path: ~/.nodespace/daemon-db
Database exists: yes
Database size: 142 MB
Total nodes: 1,847
Root nodes: 23
Recent node IDs: node:abc123, node:def456, ...
Acceptance Criteria
-
commands/diagnostics.rsdeleted from Tauri app with all references removed -
nodespace diagnosticsCLI subcommand implemented inpackages/cli - Reports: database path, existence, size, total node count, root node count, recent node IDs
- Output is human-readable (table or labeled lines)
-
cargo buildsucceeds -
bun run quality:fixpasses
Dependencies
- Implement nodespace CLI binary with node subcommands #1116
- Migrate Tauri command handlers to thin gRPC proxy wrappers #1113
Related Issues
- Implement nodespace CLI binary with node subcommands #1116 (nodespace CLI binary — must exist first)
- Migrate Tauri command handlers to thin gRPC proxy wrappers #1113 (NodeService gRPC client for node count queries)
- Add SettingsService gRPC: daemon config via RPC, display prefs stay in Tauri #1138 (SettingsService for database path)
Activity
malibio commentedon May 18, 2026
Baseline (worktree issue-1139-cli-diagnostics): Frontend 128 test files / 3918 tests passed
Migrate diagnostics to nodespace CLI subcommand (closes #1139)
Migrate diagnostics to nodespace CLI subcommand (closes #1139) (#1150)