Skip to content

Show onboarding when config directory is missing - #200

Open
muescha wants to merge 1 commit into
cmsj:mainfrom
muescha:fix/no-onboarding-on-missing-config-dir
Open

muescha wants to merge 1 commit into
cmsj:mainfrom
muescha:fix/no-onboarding-on-missing-config-dir

Conversation

@muescha

@muescha muescha commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Show onboarding when the configured configuration directory is missing.

Problem

If the saved configuration directory does not exist, startup logs an error and returns early. Because onboarding had already been marked as completed, the onboarding window is not shown and the user cannot choose a new configuration path.

Fix

  • Mark onboarding as incomplete when the configuration directory is missing.
  • Also mark onboarding as incomplete when the configured init.js file is missing.
  • Open the onboarding window when the onboarding state changes back to incomplete.
  • Add regression tests for missing config directory and missing config file.

Testing

Focused ManagerManagerTests passed with xcodebuild test for the Development scheme on macOS, using CODE_SIGNING_ALLOWED=NO.

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR restores onboarding when startup or reload finds that the configured directory or init.js is missing.

  • Resets the persisted onboarding-completion state on either missing-path condition.
  • Observes that state in the SwiftUI app and opens onboarding when it becomes incomplete.
  • Adds focused manager tests for missing directories and files.
  • Mirrors update, reload, and console actions in the application menus.

Confidence Score: 5/5

The PR appears safe to merge, with the missing-configuration recovery behavior covered by focused manager tests.

The changed manager paths persist an incomplete onboarding state when configuration resources are absent, and the application observes that state to present the existing onboarding window; no concrete blocking or independently actionable non-blocking issue remains.

Important Files Changed

Filename Overview
Hammerspoon 2/Lifecycle/Hammerspoon_2App.swift Opens the singleton onboarding window when completion becomes false and adds application-menu entry points for existing actions; no actionable defect identified.
Hammerspoon 2/Managers/ManagerManager.swift Marks onboarding incomplete when either the configured directory or file is missing, matching the stated recovery behavior.
Hammerspoon 2Tests/ManagerTests/ManagerManagerTests.swift Adds isolated regression coverage for both missing-path cases and updates onboarding setup for the expected template resources.

Reviews (1): Last reviewed commit: "Show onboarding when config directory is..." | Re-trigger Greptile

@muescha

muescha commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Note:

  • ~/.config/hammerspoon2 not exists: only error
  • ~/.config/hammerspoon2 exists, but empty/no init.js: Onboarding is shown

@muescha
muescha force-pushed the fix/no-onboarding-on-missing-config-dir branch from 53e330f to 3494b59 Compare September 16, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant