feat(exports): convert timeline sequence from string to int#782
feat(exports): convert timeline sequence from string to int#782fshowalter merged 2 commits intomainfrom
Conversation
- Add timeline_sequence_map to RepositoryData for integer sequence assignment - Create _build_timeline_sequence_map method that preserves original sort logic - Update JsonTimelineEntry TypedDict to use int for timelineSequence - Modify timeline entry builder to use sequence map lookup - Update export sorting to match new integer sequence ordering
|
Claude finished @fshowalter's task —— View job PR Review: Convert timeline sequence from string to intI've completed a comprehensive code review covering quality, best practices, potential bugs, performance, security, and test coverage. Review Checklist:
Code Review Summary✅ Strengths
|
- Changed timeline sequence to use chronological order (oldest=1, newest=highest) - Updated export to use reverse=True to maintain newest-first display order - Updated test snapshots to reflect corrected sequence numbers
|
Claude finished @fshowalter's task —— View job PR Review: Convert timeline sequence from string to intI've completed a comprehensive code review covering quality, best practices, potential bugs, performance, security, and test coverage. Review Checklist:
Code Review Summary✅ Strengths
|
Summary
timelineSequencefield in timeline exports from string to integertimeline_sequence_mapto efficiently map timeline entries to their sequence numbersChanges
Added
timeline_sequence_maptoRepositoryData: A new mapping that assigns integer sequence numbers to timeline entries based on their sort order.Created
_build_timeline_sequence_mapmethod: This method builds a map where:(timeline_date, last_timeline_date, reading_sequence)Updated
JsonTimelineEntryTypedDict: ChangedtimelineSequencefromstrtoint.Modified
_build_json_timeline_entryfunction: Now looks up the integer sequence from the map instead of creating a string.Updated export sorting: Removed
reverse=Truesince the sequence map already handles the reverse ordering.The conversion preserves the exact same ordering logic - entries are still sorted by
"{timeline_entry.date}-{reading.timeline[-1].date}-{reading.sequence}"in reverse chronological order, but now they're assigned sequential integer values (1, 2, 3, etc.) instead of using the string representation.Test plan
🤖 Generated with Claude Code