Skip to content

fix: refresh relative timestamps after midnight#477

Closed
agent-p1p wants to merge 2 commits into
masterfrom
pip/whitenoise-mac-470
Closed

fix: refresh relative timestamps after midnight#477
agent-p1p wants to merge 2 commits into
masterfrom
pip/whitenoise-mac-470

Conversation

@agent-p1p

@agent-p1p agent-p1p commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #470

Summary

  • Refreshes chat and message relative timestamp labels on NSCalendarDayChanged.
  • Refreshes after returning to the foreground when a day boundary was crossed while inactive.
  • Keeps date formatting out of ordinary chat/message row renders by preserving equatable row boundaries.
  • Makes timestamp formatting honor an injected reference date and adds a midnight regression test.

Verification

  • git diff --check — passed.
  • Conflict-marker sweep — passed.
  • Local macOS build/tests unavailable on this Linux worker (xcodebuild and swift are absent).
  • GitHub Mac CI will run the Swift format lint, unit suite, release smoke build, and static analysis.

Sensitive paths

None.


Open in Stage

Refresh chat and message timestamp projections when the calendar day changes or the app returns to the foreground. Keep formatting outside ordinary row renders and cover the day-boundary transition with a regression test.

Fixes #470
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@agent-p1p, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6d26e225-7e54-4dea-b6b2-16ff23d644b1

📥 Commits

Reviewing files that changed from the base of the PR and between 0454dbf and 560f641.

📒 Files selected for processing (6)
  • whitenoise-mac/ContentView.swift
  • whitenoise-mac/Models/MessengerModels.swift
  • whitenoise-mac/Views/MessageMediaViews.swift
  • whitenoise-mac/Views/MessengerShellView.swift
  • whitenoise-mac/Views/SidebarViews.swift
  • whitenoise-macTests/whitenoise_macTests.swift
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pip/whitenoise-mac-470

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@stage-review

stage-review Bot commented Jul 12, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 6 individual chapters for you:

Title
1 Support reference dates in timestamp formatting
2 Add model methods for relative timestamping
3 Manage reference date in the environment
4 Wire reference date through message views
5 Update sidebar chat row timestamps
6 Verify midnight boundary logic with tests
Open in Stage

Chapters generated by Stage for commit 560f641 on Jul 12, 2026 3:43am UTC.

@agent-p1p

Copy link
Copy Markdown
Contributor Author

Superseded: this PR accumulated red CI before the shared media-cache test stabilization landed. Reopening the fix as a clean stacked PR on #464; no code from the failing media tests is folded into #470.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant