feat: session/weekly time window selection for menu bar percent & pace#21
Merged
Conversation
…nd pace Restores the time-window picker dropped during the upstream 0.31.1 sync. Lets the percent and pace values in the menu bar each track either the session or the weekly window independently. - MenuBarTimeWindow enum (session/weekly) - Two persisted settings with backward-compatible defaults (percent=session, pace=weekly) - Segmented pickers in the Display preferences pane, gated on display mode - StatusItemController selects the percent/pace window per setting (session -> menuBarPercentWindow / UsagePaceText.sessionPace, weekly -> secondary / UsageStore.weeklyPace) - Round-trip test for the new settings Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
johnlarkin1
force-pushed
the
feat-menu-bar-time-window
branch
from
May 30, 2026 14:12
0318302 to
7b95964
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restores the session vs weekly time-window picker for the menu-bar percent and pace values. This fork feature was originally added in #6 (commit
3c947f1c) and was silently dropped during the sync to upstream 0.31.1 (commiteb255aba, "normalize merged Sources to upstream baseline"). TheMenuBarDisplayModeBoth/Percent/Pace dropdown survived, but the separate Session/Weekly control did not.Re-applied onto the new upstream baseline (upstream refactored
displayText/paceTextto take aUsagePace?directly, so the integration is cleaner than the original).What it does
Under Settings → Display, below the Display-mode and Separator rows, a new Time windows block with two segmented pickers:
Each value can independently track the rolling session window (~5h for Claude/Codex) or the weekly window. Defaults preserve prior behavior: percent = Session, pace = Weekly.
Changes
MenuBarTimeWindowenum (session/weekly)menuBarPercentTimeWindow,menuBarPaceTimeWindow) with backward-compatible defaults, wired throughSettingsStore(++Defaults,+MenuObservation, state, load)PreferencesDisplayPane, gated on display mode (percent picker dims in pace-only mode and vice-versa)StatusItemController+Animationselects the percent/pace window per settingmenuBarPercentWindow/UsagePaceText.sessionPacesecondary(with codex projection / abacus fallbacks) /UsageStore.weeklyPaceVerification
swift build✅swift test --filter StatusItemAnimationTests(27 tests) ✅./Scripts/lint.sh lint— 0 violations ✅🤖 Generated with Claude Code