Skip to content

Show an uninstall path for the Windows daemon autorun entry #1519

Closed

Description

@malibio

Overview

The Windows daemon setup writes an HKCU Run autorun key with no surfaced uninstall path.

Problem Statement

A user cannot easily discover or remove the autorun registration.

Proposed Solution

Surface an uninstall/cleanup path that removes the HKCU Run entry (and document it).

Acceptance Criteria

  • The autorun entry can be removed through a surfaced path
  • Code passes bun run quality:fix; tests pass

Technical Specifications

Reference Files

  • packages/desktop-app/src-tauri/src/daemon_setup.rs (~842-874)

Related Issues

  • (none)

Activity

  1. self-assigned this
    on Aug 6, 2026
  2. mstomar125 commented on Aug 7, 2026

    @mstomar125
    Contributor

    Board → Blocked (needs a Windows build environment). This is #[cfg(windows)] code; the current remote is darwin, and the pre-push gate builds the macOS nodespaced and never compiles the Windows cfg block — so it can't be implemented or verified here. Pick up on a Windows toolchain. (Note: #1498 unblocks nodespace-sync#246.)

  3. self-assigned this
    on Sep 14, 2026
  4. mstomar125 commented on Sep 14, 2026

    @mstomar125
    Contributor

    Baseline: Frontend 240 test files / 4951 tests passed (85.17s). Starting implementation.

  5. mstomar125 commented on Sep 14, 2026

    @mstomar125
    Contributor

    Implemented in #2613.

    Summary: register_autorun_windows writes an HKCU Software\Microsoft\Windows\CurrentVersion\Run entry so the daemon restarts on login, but there was no way to discover or remove it. Added autorun_windows_present()/remove_autorun_windows() in daemon_setup.rs (same reg.exe-via-Command mechanism as the write side — no new registry crate dependency), wired behind two Tauri commands (windows_autorun_present, remove_windows_autorun) that are always registered but only act on Windows.

    Surfaced in: Settings → About (diagnostics-settings.svelte). A "Remove" action appears only when an entry actually exists (checked on mount via windows_autorun_present) — never on macOS/Linux, never on a clean Windows install — so no frontend OS-detection code was needed. Investigated scripts/uninstall.sh/CLI uninstall (POSIX-only, out of this issue's stated scope) and the Tauri bundle config (no Windows NSIS/WiX hooks defined) before landing on this as the minimal, clearly-scoped surface.

    Real Windows verification (extracted the write/query/remove logic verbatim into a standalone Rust binary — the full desktop-app crate can't build on the test Windows box due to a missing libclang — and ran it for real over SSH against a distinct test registry value):

    Baseline: reg query ... /v NodeSpaceDaemonHarnessTest
      ERROR: The system was unable to find the specified registry key or value. (exit 1)
    
    register -> reg.exe add succeeds
    Independent reg query confirms:
      HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
          NodeSpaceDaemonHarnessTest    REG_SZ    "C:\fake\path\nodespaced-harness-test.exe"
    
    present -> true (exit 0)
    
    remove -> "nodespaced removed from HKCU autorun", removed=true (exit 0)
    Independent reg query confirms it is gone:
      ERROR: The system was unable to find the specified registry key or value. (exit 1)
    
    present again -> false (exit 1)
    remove again on clean state -> removed=false, exit 0 (safe no-op, not an error)
    

    bun run test:all and bun run quality:fix both clean; full pre-push gate (test:all + cargo build + test:e2e) passed before the push. New frontend test file: packages/desktop-app/src/tests/components/settings/diagnostics-settings.test.ts (4 tests covering hidden/shown/success/failure states).

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