From 60c5a37d5905d0dbd8383ad053e4d3c17c9408d9 Mon Sep 17 00:00:00 2001 From: Yvette Carlisle Date: Fri, 8 May 2026 08:01:00 +0800 Subject: [PATCH] {"schema":"maestro/commit/1","summary":"Add status menu maintenance actions","authority":"manual"} --- docs/spec/settings.md | 5 +++- .../RsnapNativeHostKit/NativeHostApp.swift | 30 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/docs/spec/settings.md b/docs/spec/settings.md index aa371364..0dcf3360 100644 --- a/docs/spec/settings.md +++ b/docs/spec/settings.md @@ -38,7 +38,10 @@ Defines: ## Status Menu -- The status menu must expose New Capture, Settings, and Quit. +- The status menu must expose New Capture, Open Screenshots Folder, Check for Updates, Settings, + and Quit. +- Open Screenshots Folder must open the configured output directory, creating it first when needed. +- Check for Updates must invoke the same Sparkle-backed update check flow as the About section. - The status menu must not expose Cancel Capture. Capture cancellation is handled in-session by `Esc` and secondary click in both live and Frozen modes. - The status menu must not expose Permissions as a separate menu item. Permission status and diff --git a/native/macos-host/Sources/RsnapNativeHostKit/NativeHostApp.swift b/native/macos-host/Sources/RsnapNativeHostKit/NativeHostApp.swift index 8c28139c..e5089b96 100644 --- a/native/macos-host/Sources/RsnapNativeHostKit/NativeHostApp.swift +++ b/native/macos-host/Sources/RsnapNativeHostKit/NativeHostApp.swift @@ -438,6 +438,27 @@ public final class NativeHostApplicationController: NSObject, NSApplicationDeleg settingsWindowController.present() } + @objc + private func openScreenshotsFolder(_ sender: Any?) { + let outputDirectory = settingsStore.settings.outputDirectory + do { + try FileManager.default.createDirectory( + at: outputDirectory, + withIntermediateDirectories: true) + NSWorkspace.shared.open(outputDirectory) + NativeHostTelemetry.lifecycleEvent("native_host.output_directory_opened") + } catch { + NativeHostTelemetry.lifecycleWarning( + "native_host.output_directory_open_failed", + detail: "reason=create_or_open_failed") + } + } + + @objc + private func checkForUpdates(_ sender: Any?) { + softwareUpdater.checkForUpdates(sender) + } + private func scheduleLaunchPermissionOnboardingIfNeeded() { DispatchQueue.main.async { [weak self] in _ = self?.presentPermissionRecoveryIfNeeded( @@ -523,6 +544,15 @@ public final class NativeHostApplicationController: NSObject, NSApplicationDeleg keyEquivalent: "" ) menu.addItem(.separator()) + menu.addItem( + withTitle: "Open Screenshots Folder", + action: #selector(openScreenshotsFolder(_:)), + keyEquivalent: "") + menu.addItem( + withTitle: "Check for Updates…", + action: #selector(checkForUpdates(_:)), + keyEquivalent: "") + menu.addItem(.separator()) menu.addItem( withTitle: "Settings…", action: #selector(openSettings(_:)), keyEquivalent: ",") menu.addItem(.separator())