Skip to content

Conversation

@manikv12
Copy link

Summary

  • Shorten absolute reset timestamps (time-only today, weekday+time within 7 days, month/day+time otherwise), including runs-out copy.
  • Move the reset date/time toggle to Display → Menu content.
  • Update tests + changelog.

Testing

  • ./Scripts/compile_and_run.sh
  • swift test

Screenshots

  • Not provided (text-only change).

Notes

  • pnpm check fails locally because swiftformat/swiftlint are not installed.

Issue

Copilot AI review requested due to automatic review settings January 26, 2026 02:59
@manikv12
Copy link
Author

This is how it looks like.
Code 2026-01-25 20 52 45

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines the absolute reset timestamp display feature by shortening the format and improving the UI organization. The changes replace verbose absolute timestamps (e.g., "tomorrow, 4:30 PM" or "Jan 26, 2026 4:12 PM") with more compact formats: time-only for same day (e.g., "4:30 PM"), weekday+time within 7 days (e.g., "Thu 4:30 PM"), or month/day+time for later dates (e.g., "Jan 26 4:30 PM"). The setting toggle is also moved from the Advanced preferences pane to the Display preferences pane under "Menu content."

Changes:

  • Introduced resetAbsoluteDescription method with shortened timestamp formats for better readability
  • Updated all "Resets" and "Runs out" messages to use absolute timestamps when the setting is enabled
  • Moved the reset time display toggle from Advanced to Display → Menu content section with updated title and subtitle
  • Added comprehensive test coverage for the new formatting behavior

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Sources/CodexBarCore/UsageFormatter.swift Added resetAbsoluteDescription method with compact timestamp formats; updated resetLine to use it
Sources/CodexBar/UsagePaceText.swift Added resetStyle parameter propagation throughout; updated "Runs out" messages for absolute style
Sources/CodexBar/StatusItemController+Menu.swift Updated to call resetAbsoluteDescription instead of resetDescription for absolute style
Sources/CodexBar/MenuDescriptor.swift Pass resetStyle parameter to weeklySummary
Sources/CodexBar/MenuCardView.swift Pass resetStyle parameter to weeklyPaceDetail
Sources/CodexBar/PreferencesDisplayPane.swift Updated toggle title/subtitle and placed under "Menu content" section
Sources/CodexBar/PreferencesAdvancedPane.swift Removed divider after CLI section (minor UI cleanup)
Tests/CodexBarTests/UsagePaceTextTests.swift Added test for absolute reset style in weekly pace detail
Tests/CodexBarTests/UsageFormatterTests.swift Added tests for absolute formatting and year omission
CHANGELOG.md Added entry describing the refinement

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add setting for absolute reset date/time in usage view

2 participants