Skip to content

TUI wizard runs every launch — should only run on first use #8

Description

@eshork

Symptom

The first-boot wizard appears every time the TUI is launched, not just the first time.

Expected Behavior

The wizard should run once on first use, then never again. Choices made during the wizard should be persisted — either written as permanent config changes (e.g., enabling SSH, setting passwords) or saved to a config file (e.g., /etc/neuraldrive/config.yaml or similar).

On subsequent TUI launches, the wizard should be skipped entirely. The sentinel file /etc/neuraldrive/first-boot-complete exists for this purpose but either isn't being checked or isn't being written after wizard completion.

Suggested Fix

  1. Check for the sentinel file before pushing the wizard screen
  2. Ensure the wizard writes the sentinel on successful completion
  3. Persist wizard choices to a config file and/or apply them as system changes immediately

Activity

  1. eshork commented on Apr 23, 2026

    @eshork
    ContributorAuthor

    Design Decision (from planning session)

    Config persistence format: YAML (config.yaml)

    Storage location priority:

    1. Persistent USB storage (when persistence partition exists)
    2. Overlay filesystem as fallback (when no persistence partition)

    Root cause identified: The wizard's _finalize() wraps ALL writes in a broad try/except Exception: pass that silently swallows errors. Since the TUI runs as neuraldrive-admin (not root), writing to /etc/neuraldrive/ likely fails with a permission error → sentinel never created → wizard runs again every launch.

    Fix approach:

    1. Fix permissions so wizard can write config (use sudo or have first-boot.sh set ownership)
    2. Replace silent exception swallowing with proper error logging/display
    3. Move config storage to YAML file on persistent storage
    4. Sentinel check should also consider alternative signals (e.g., config.yaml existence)
  2. eshork commented on Apr 24, 2026

    @eshork
    ContributorAuthor

    resolved in #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions