feat(sessions): keep every session, record review details, name and stamp the PDF
Sessions are now the unit of the product instead of an implicit capture run. - Nothing is deleted by default: the fixed 10-session cap is gone. An age limit (Never / 7 / 14 / 30 / 90 / 180 / 365 days) is chosen in Settings > Sessions and applied on launch, after archiving, and by "Clean up now". Sent PDFs are never touched. - Each session carries review details: lane, deployed version, commit, reviewer (pre-filled with the Mac user) and a free note. They persist in session.json and are inherited by the next session, so a review run is typed once. - PDF file names are Redline-<yyyyMMdd-HHmm>-<LANE>-<SHORTID>.pdf, and every page carries a two-line reference footer (tool, build time, session / lane, deployed build, commit, reviewer, note). The PDF document info carries the same values in Author and Keywords. - Verification: 159 tests, a headless panel self-test, and a LaunchServices-driven end-to-end run that types and clicks the real panel.
This commit is contained in:
@@ -3,7 +3,11 @@ import Foundation
|
||||
public enum DubaiTime {
|
||||
private static let stampFormatter = LockedDateFormatter(dateFormat: "d MMM yyyy, HH:mm 'Dubai'")
|
||||
private static let fileStampFormatter = LockedDateFormatter(dateFormat: "yyyyMMdd-HHmmss")
|
||||
private static let fileMinuteStampFormatter = LockedDateFormatter(dateFormat: "yyyyMMdd-HHmm")
|
||||
private static let checkTimeFormatter = LockedDateFormatter(dateFormat: "HH:mm 'Dubai'")
|
||||
private static let shortStampFormatter = LockedDateFormatter(dateFormat: "d MMM yyyy, HH:mm")
|
||||
private static let dayStampFormatter = LockedDateFormatter(dateFormat: "d MMM yyyy")
|
||||
private static let keywordStampFormatter = LockedDateFormatter(dateFormat: "yyyy-MM-dd HH:mm 'Dubai'")
|
||||
|
||||
public static func stamp(_ date: Date) -> String {
|
||||
stampFormatter.string(from: date)
|
||||
@@ -13,6 +17,28 @@ public enum DubaiTime {
|
||||
fileStampFormatter.string(from: date)
|
||||
}
|
||||
|
||||
/// `yyyyMMdd-HHmm` — used in PDF file names where minutes are the useful detail.
|
||||
public static func fileMinuteStamp(_ date: Date) -> String {
|
||||
fileMinuteStampFormatter.string(from: date)
|
||||
}
|
||||
|
||||
/// "31 Oct 2026, 10:31" — compact session-list timestamp (the timezone is stated
|
||||
/// once in the list header, not on every row).
|
||||
public static func shortStamp(_ date: Date) -> String {
|
||||
shortStampFormatter.string(from: date)
|
||||
}
|
||||
|
||||
/// "31 Oct 2026" — for day-granular expiry notices.
|
||||
public static func dayStamp(_ date: Date) -> String {
|
||||
dayStampFormatter.string(from: date)
|
||||
}
|
||||
|
||||
/// "2026-10-31 11:00 Dubai" — for PDF keywords, where a comma would be read as a
|
||||
/// keyword separator by the PDF format itself.
|
||||
public static func keywordStamp(_ date: Date) -> String {
|
||||
keywordStampFormatter.string(from: date)
|
||||
}
|
||||
|
||||
public static func checkTime(_ date: Date) -> String {
|
||||
checkTimeFormatter.string(from: date)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user