From 3b598a3443008aa051b6405831e464c0b1a36a59 Mon Sep 17 00:00:00 2001 From: Micah Alpern Date: Tue, 2 Jun 2026 09:47:43 -0700 Subject: [PATCH 1/2] fix(gallery): remove dead copyValidationErrorsToClipboard stub (#693) PackDetailView's copyValidationErrorsToClipboard() was an empty placeholder that's never called and has no validation-error state to copy. The working implementation lives in the overlay path (LiveKeyboardOverlayView). Delete the dead stub. Co-Authored-By: Claude Opus 4.8 (1M context) --- Sources/KeyPathAppKit/UI/Gallery/PackDetailView+Helpers.swift | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Sources/KeyPathAppKit/UI/Gallery/PackDetailView+Helpers.swift b/Sources/KeyPathAppKit/UI/Gallery/PackDetailView+Helpers.swift index 9a8c380b0..3bf944baa 100644 --- a/Sources/KeyPathAppKit/UI/Gallery/PackDetailView+Helpers.swift +++ b/Sources/KeyPathAppKit/UI/Gallery/PackDetailView+Helpers.swift @@ -74,10 +74,6 @@ extension PackDetailView { } return 20 } - - func copyValidationErrorsToClipboard() { - // Placeholder for future implementation - } } // MARK: - Undo snapshot From 0929b57e1363a6dd944c67b97061f218580a210b Mon Sep 17 00:00:00 2001 From: Micah Alpern Date: Tue, 2 Jun 2026 09:47:43 -0700 Subject: [PATCH 2/2] fix(kindavim): flush telemetry on app quit (#690) The KindaVim telemetry store flushes on a ~5s timer and skips a final flush in deinit (MainActor restriction), so up to one interval of aggregate counters was lost on quit. Call the existing MainActor-safe flushNow() from applicationWillTerminate. No-op when telemetry is disabled. Co-Authored-By: Claude Opus 4.8 (1M context) --- Sources/KeyPathAppKit/App.swift | 3 +++ .../Services/KindaVim/KindaVimTelemetryStore.swift | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Sources/KeyPathAppKit/App.swift b/Sources/KeyPathAppKit/App.swift index 9cb699149..119acb227 100644 --- a/Sources/KeyPathAppKit/App.swift +++ b/Sources/KeyPathAppKit/App.swift @@ -309,6 +309,9 @@ class AppDelegate: NSObject, NSApplicationDelegate { // after the UI app quits. Only ServiceLifecycleCoordinator.stopKanata() // should broadcast service state changes. DistributedNotificationBridge.stop() + // Flush pending KindaVim telemetry so counters aren't lost on quit (up to one + // ~5s flush interval would otherwise be dropped — see #690). No-op when disabled. + KindaVimTelemetryStore.shared.flushNow() kanataManager?.cleanupSync() AppLogger.shared.info("✅ [AppDelegate] Cleanup complete, app terminating") } diff --git a/Sources/KeyPathAppKit/Services/KindaVim/KindaVimTelemetryStore.swift b/Sources/KeyPathAppKit/Services/KindaVim/KindaVimTelemetryStore.swift index ef8591399..ff9dc064d 100644 --- a/Sources/KeyPathAppKit/Services/KindaVim/KindaVimTelemetryStore.swift +++ b/Sources/KeyPathAppKit/Services/KindaVim/KindaVimTelemetryStore.swift @@ -164,10 +164,9 @@ final class KindaVimTelemetryStore { deinit { flushTask?.cancel() - // No final flush from deinit — the @MainActor restriction makes - // it impractical, and the `flushNow()` API + app-deactivation - // hook (TODO in a follow-up) covers correctness for the cases - // that matter (Pack Detail viewing, app quit). + // No final flush from deinit — the @MainActor restriction makes it + // impractical. Correctness is covered by the `flushNow()` API: called + // when viewing Pack Detail and from applicationWillTerminate on app quit (#690). } // MARK: - Opt-in gate