Session date validation & merge fixes
Changes
- Validate session timestamps before use —
buildRecentSessionsForRemotenow checks that timestamps are parseable dates. Sessions with no valid timestamp are dropped instead of silently usingnew Date(), which could produce incorrect dates. - Refresh dates on remote merge — when a session already exists in the remote store, its
datefield is now updated if the local timestamp yields a different (corrected) value. - Extracted
buildRecentSessionsForRemote— factored out ofmergeAndPushfor clarity and testability.
Tests
- Added tests for
buildRecentSessionsForRemote(valid, invalid, and missing timestamps). - Added tests for date-refresh behavior in
mergeIntoRemote.
Full Changelog: v0.3.0...v0.3.1