2.1 KiB
2.1 KiB
| summary | read_when | |||
|---|---|---|---|---|
| Checklist for recreating the lost CLI/Visualizer refactor |
|
Restoration Checklist (Nov 10, 2025)
A git reset --hard wiped the in-progress CLI runtime refactor + visualizer hardening. This file records what needs to be re-applied manually so we can recover without guessing. Reapply each section and tick it off in this doc when finished.
1. Visualizer Client Hardening
VisualizationClientimports AppKit and checksNSRunningApplicationto see if Peekaboo.app is running before connecting.- Connection retries no longer stop after 3 attempts; instead we back off (capped at 30 s) and keep retrying indefinitely, logging the “Peekaboo.app is not running” message only once per outage.
- Every
show*visual-feedback method re-callsconnect()when invoked while disconnected. docs/visualization.mdreflects the new reconnect behavior.
2. CLI Runtime Pattern (representative commands)
- Dock command + all subcommands use plain structs with
@RuntimeStorage, service bridges,nonisolated(unsafe)configurations, and runtime loggers instead of singletons. - Menu/MenuBar/System/Interaction commands follow the same shape (
run(using:)marked@MainActor,outputLoggerderived from the runtime, no@MainActor struct). FocusCommandOptions,WindowIdentificationOptions, and helper bridges useMainActor.assumeIsolatedwhere needed instead of reaching for shared singletons.
3. Shared Helpers & Docs
CommandUtilities.requireScreenRecordingPermissionandselectWindoware@MainActor.docs/archive/refactor/runtime-visualizer-2025-11.mdlogs the new tmux build IDs after each restoration batch.Core/*/Package.swiftfiles point toVendor/swift-argument-parserso SwiftPM stops warning about duplicate IDs.
Add more sections as we rediscover missing edits. Update the checkboxes (or add short notes) once each item is restored so future contributors know what’s still outstanding.