Skip to content

feat(active-times): add date to active time range for cross-midnight sessions#244

Merged
owieth merged 3 commits intomainfrom
feat/243-active-times-date
Mar 30, 2026
Merged

feat(active-times): add date to active time range for cross-midnight sessions#244
owieth merged 3 commits intomainfrom
feat/243-active-times-date

Conversation

@owieth
Copy link
Copy Markdown
Owner

@owieth owieth commented Mar 30, 2026

Summary

  • Stores firstActiveAt/lastActiveAt as yyyy-MM-dd'T'HH:mm instead of HH:mm so the date is embedded in the value
  • Formats the display range smartly: same-day shows HH:mm - HH:mm, cross-midnight shows MMM d, HH:mm - MMM d, HH:mm (e.g. Mar 29, 22:45 - Mar 30, 09:30)
  • Handles mixed legacy/ISO values gracefully — legacy HH:mm values already in the DB parse and display correctly without showing a bogus date

Test plan

  • Launch app fresh — active time shows HH:mm - HH:mm as before
  • Verify no "Jan 1" or raw ISO strings appear in the active time card
  • Let Mac sleep across midnight and wake — active time range should show MMM d, HH:mm - MMM d, HH:mm

Closes #243

🤖 Generated with Claude Code

owieth and others added 3 commits March 30, 2026 15:57
…sessions

Store firstActiveAt/lastActiveAt as yyyy-MM-dd'T'HH:mm instead of HH:mm.
Format the range smartly: same-day shows HH:mm - HH:mm, cross-day shows
MMM d, HH:mm - MMM d, HH:mm. Falls back gracefully for legacy HH:mm values.

Closes #243

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@owieth owieth self-assigned this Mar 30, 2026
@owieth owieth added the enhancement New feature or request label Mar 30, 2026
@owieth owieth merged commit a13b1db into main Mar 30, 2026
2 checks passed
@owieth owieth deleted the feat/243-active-times-date branch March 30, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add date to active times display for cross-midnight sessions

1 participant