Skip to content

Quality pass: app lifecycle & window management#94

Merged
dhilgaertner merged 2 commits intomainfrom
feature/crow-63-quality-pass-app-lifecycle
Apr 6, 2026
Merged

Quality pass: app lifecycle & window management#94
dhilgaertner merged 2 commits intomainfrom
feature/crow-63-quality-pass-app-lifecycle

Conversation

@dhilgaertner
Copy link
Copy Markdown
Contributor

@dhilgaertner dhilgaertner commented Apr 5, 2026

Summary

  • Add structured logging throughout startup/shutdown sequences for debuggability
  • Replace silent try? calls with proper error handling in Scaffolder, ConfigStore, and setup wizard — failures now surface to users
  • Extract path-traversal and session-name validation into testable CrowCore.Validation module using URL.standardizedFileURL (resolves symlinks)
  • Runtime dependency check now includes glab and code, stores missing deps in AppState.missingDependencies
  • Main window gets minSize constraint, frame autosave ordering fixed, config persisted on shutdown
  • 16 new tests covering validation, AppConfig codable, and ConfigStore persistence

Closes #63

Test plan

  • make build compiles without errors
  • swift test passes all 16 new tests (CrowCore + CrowPersistence)
  • Launch app — verify startup logs appear in Console.app
  • Delete devRoot, relaunch — verify setup wizard shows; use bad path — verify error message appears
  • Verify About and Settings windows open/reuse correctly
  • Verify main window respects minimum size constraint

🤖 Generated with Claude Code

@dhilgaertner dhilgaertner requested a review from dgershman as a code owner April 5, 2026 22:48
dhilgaertner and others added 2 commits April 5, 2026 21:39
…tests

Add structured logging throughout the startup and shutdown sequences so
issues are visible in Console.app. Replace silent `try?` calls with
proper error handling in Scaffolder, ConfigStore, and the setup wizard
flow — setup failures now surface to the user instead of being swallowed.

Extract path-traversal and session-name validation into a shared
CrowCore.Validation module so the logic is testable and uses
URL.standardizedFileURL (resolves symlinks) instead of the weaker
NSString.standardizingPath.

Other improvements:
- Runtime dependency check now includes glab and code, stores missing
  deps in AppState.missingDependencies for UI consumption
- Main window gets minSize constraint (800×500)
- center() called before setFrameAutosaveName() so saved frame wins
- Config persisted on shutdown to catch unsaved settings changes
- Scaffolder legacy migration uses case-insensitive replacement
- 16 new tests covering Validation, AppConfig codable, and ConfigStore

Closes #63

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The outer Task inherits @mainactor context so appState is accessed
safely after awaiting the detached child task's result.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dhilgaertner dhilgaertner force-pushed the feature/crow-63-quality-pass-app-lifecycle branch from d28a8e1 to f35ddcf Compare April 6, 2026 04:39
@dhilgaertner dhilgaertner merged commit 8c9c2da into main Apr 6, 2026
3 checks passed
@dhilgaertner dhilgaertner deleted the feature/crow-63-quality-pass-app-lifecycle branch April 6, 2026 04:42
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.

Quality Pass: App Lifecycle & Window Management

1 participant