Skip to content

Migrate diagnostics to nodespace CLI subcommand; remove Tauri diagnostics commands #1139

Closed

Description

@malibio

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.rs and main.rs

Files to create

  • packages/cli/src/commands/diagnostics.rs — nodespace diagnostics subcommand

Reference Files

  • packages/desktop-app/src-tauri/src/commands/diagnostics.rs — existing implementation; preserve the reported fields in the CLI output
  • packages/daemon/src/services/node_service.rs — gRPC calls for node count, root count, recent node IDs
  • packages/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.rs deleted from Tauri app with all references removed
  • nodespace diagnostics CLI subcommand implemented in packages/cli
  • Reports: database path, existence, size, total node count, root node count, recent node IDs
  • Output is human-readable (table or labeled lines)
  • cargo build succeeds
  • bun run quality:fix passes

Dependencies

Related Issues

Activity

  1. malibio commented on May 18, 2026

    @malibio
    CollaboratorAuthor

    Baseline (worktree issue-1139-cli-diagnostics): Frontend 128 test files / 3918 tests passed

  2. self-assigned this
    on May 18, 2026
  3. added a commit that references this issue on May 18, 2026
    101ea37
  4. added a commit that references this issue on Jun 22, 2026
    365e755
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions