-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
Two files create their own ISO8601DateFormatter instances and parseTimestamp functions:
ClaudeConversationIndex.swift (lines 76-86, 385-389)
- Two formatters: one with fractional seconds, one without
parseTimestampreturnsDate?— tries fractional first, then plain, returns nil on failure
TranscriptParser.swift (lines 175-184)
- One formatter: fractional seconds only
parseTimestampreturnsDate— falls back toDate()on failure (masks parse errors)
Differences
The two implementations have subtly different semantics:
ClaudeConversationIndexhandles timestamps both with and without fractional secondsTranscriptParseronly handles fractional seconds — timestamps without them silently returnDate()(current time)
Proposal
Create a shared DateParsing utility (or extend the existing ShellUtilities.swift) with:
enum DateParsing {
static func parseISO8601(_ value: String?) -> Date? { ... }
}Both callers adopt the shared version, with TranscriptParser using ?? Date() at the call site if it needs that fallback.
🤖 Generated with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request