Commit 7e98a2ca20

7e98a2ca205eea3866d838a6b794b9a2e5627cfd

parent: 0adc91d2a0

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-26 22:08 UTC

Snapshot runs don't read the clock title key from the Keychain

Layout: unified · split

Changed files (2)
Sources/Orgstar/DevelopmentHooks.swift +3 · view
@@ -18,12 +18,15 @@ import OrgEditorAppKit
1818/// - `ORGSTAR_SNAPSHOT`: after `ORGSTAR_SNAPSHOT_DELAY` seconds (default 3), render the main
1919/// window to this PNG path and quit. Rendering from inside the app needs no screen-recording
2020/// permission.
21/// The clock title key isn't read from the Keychain in such a run.
2122enum DevelopmentHooks {
2223 static var fileToOpen: String? { ProcessInfo.processInfo.environment["ORGSTAR_OPEN"] }
2324 static var rootToAdd: String? { ProcessInfo.processInfo.environment["ORGSTAR_ROOT"] }
2425 static var windowToOpen: String? { ProcessInfo.processInfo.environment["ORGSTAR_WINDOW"] }
2526 static var commandToRun: String? { ProcessInfo.processInfo.environment["ORGSTAR_COMMAND"] }
2627 static var urlToOpen: String? { ProcessInfo.processInfo.environment["ORGSTAR_URL"] }
28 /// `ORGSTAR_SNAPSHOT` is set: the run renders a window and quits.
29 static var snapshotting: Bool { ProcessInfo.processInfo.environment["ORGSTAR_SNAPSHOT"] != nil }
2730 static var answers: [String] { ProcessInfo.processInfo.environment["ORGSTAR_ANSWERS"]?.split(separator: ",").map(String.init) ?? [] }
2831
2932 @MainActor
Sources/Orgstar/OrgstarApp.swift +5 · view
@@ -497,7 +497,12 @@ struct OrgstarApp: App {
497497 @State private var clock = ClockModel()
498498 @State private var scheduler = SystemReminderCenter.isAvailable ? ReminderScheduler(center: SystemReminderCenter()) : nil
499499 @State private var session: DocumentSession = {
500 #if APPSTORE
500501 ClockTask.titleKey = ClockTitleKey.loadOrCreate()
502 #else
503 // A snapshot run is a renamed, ad hoc signed copy, which the Keychain would stop at a prompt.
504 ClockTask.titleKey = DevelopmentHooks.snapshotting ? nil : ClockTitleKey.loadOrCreate()
505 #endif
501506 let session = DocumentSession()
502507 session.defaults = Preferences.orgSettings
503508 // Before any window: capture and agenda edits can save before the main window opens.
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form