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
18/// - `ORGSTAR_SNAPSHOT`: after `ORGSTAR_SNAPSHOT_DELAY` seconds (default 3), render the main 18/// - `ORGSTAR_SNAPSHOT`: after `ORGSTAR_SNAPSHOT_DELAY` seconds (default 3), render the main
19/// window to this PNG path and quit. Rendering from inside the app needs no screen-recording 19/// window to this PNG path and quit. Rendering from inside the app needs no screen-recording
20/// permission. 20/// permission.
21/// The clock title key isn't read from the Keychain in such a run.
21enum DevelopmentHooks { 22enum DevelopmentHooks {
22 static var fileToOpen: String? { ProcessInfo.processInfo.environment["ORGSTAR_OPEN"] } 23 static var fileToOpen: String? { ProcessInfo.processInfo.environment["ORGSTAR_OPEN"] }
23 static var rootToAdd: String? { ProcessInfo.processInfo.environment["ORGSTAR_ROOT"] } 24 static var rootToAdd: String? { ProcessInfo.processInfo.environment["ORGSTAR_ROOT"] }
24 static var windowToOpen: String? { ProcessInfo.processInfo.environment["ORGSTAR_WINDOW"] } 25 static var windowToOpen: String? { ProcessInfo.processInfo.environment["ORGSTAR_WINDOW"] }
25 static var commandToRun: String? { ProcessInfo.processInfo.environment["ORGSTAR_COMMAND"] } 26 static var commandToRun: String? { ProcessInfo.processInfo.environment["ORGSTAR_COMMAND"] }
26 static var urlToOpen: String? { ProcessInfo.processInfo.environment["ORGSTAR_URL"] } 27 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 }
27 static var answers: [String] { ProcessInfo.processInfo.environment["ORGSTAR_ANSWERS"]?.split(separator: ",").map(String.init) ?? [] } 30 static var answers: [String] { ProcessInfo.processInfo.environment["ORGSTAR_ANSWERS"]?.split(separator: ",").map(String.init) ?? [] }
28 31
29 @MainActor 32 @MainActor
Sources/Orgstar/OrgstarApp.swift +5 · view
@@ -497,7 +497,12 @@ struct OrgstarApp: App {
497 @State private var clock = ClockModel() 497 @State private var clock = ClockModel()
498 @State private var scheduler = SystemReminderCenter.isAvailable ? ReminderScheduler(center: SystemReminderCenter()) : nil 498 @State private var scheduler = SystemReminderCenter.isAvailable ? ReminderScheduler(center: SystemReminderCenter()) : nil
499 @State private var session: DocumentSession = { 499 @State private var session: DocumentSession = {
500 #if APPSTORE
500 ClockTask.titleKey = ClockTitleKey.loadOrCreate() 501 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
501 let session = DocumentSession() 506 let session = DocumentSession()
502 session.defaults = Preferences.orgSettings 507 session.defaults = Preferences.orgSettings
503 // Before any window: capture and agenda edits can save before the main window opens. 508 // 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