Skip to content

Configurable menubar status period#302

Open
ozymandiashh wants to merge 1 commit into
getagentseal:mainfrom
ozymandiashh:feat/menubar-status-period
Open

Configurable menubar status period#302
ozymandiashh wants to merge 1 commit into
getagentseal:mainfrom
ozymandiashh:feat/menubar-status-period

Conversation

@ozymandiashh
Copy link
Copy Markdown
Contributor

@ozymandiashh ozymandiashh commented May 11, 2026

Summary

Rebases the configurable menubar status period feature onto current main.

The always-visible macOS status item can now track Today, Week, Month, or 6 Months independently from the popover's selected period/provider filters.

Closes #291.

What changed

  • Add a persisted CodeBurnMenubarPeriod setting backed by UserDefaults.
  • Add a Settings picker for the supported status periods: Today, Week, Month, and 6 Months.
  • Keep the popover period/provider selection independent from the status item period.
  • Update status item rendering to read menubarPeriod / menubarPayload instead of always using today's payload.
  • Preserve current main refresh hardening while refreshing the configured status period and the Today payload when the popover still needs day-specific data.
  • Make menubarPeriod private(set) so callers must go through setMenubarPeriod, which validates allowed status periods and refreshes quietly.
  • Add suffixes for non-today status periods, for example /wk, /mo, and /6mo in compact mode.
  • Update README/changelog and add focused XCTest coverage for period mapping, persistence, and suffix formatting.

Validation

  • npx vitest run - 60 files / 860 tests passed.
  • npm run build - passed.
  • swift build - passed.
  • git diff --check - passed.
  • Argus-style local reviewer - PASS.
  • Claude Opus 4.7 effort max review - PASS, no required fixes.
  • Gemini 3.1 Pro Preview review - REQUIRED_FIXES on first pass, then PASS after migrating the new test from Swift Testing to XCTest.

Notes

  • swift test --filter MenubarPeriodSettingsTests is still blocked locally by existing Swift test files that import Testing (no such module 'Testing'). The new MenubarPeriodSettingsTests file now uses XCTest and is no longer the source of that blocker.
  • No local project names, prompts, paths, session IDs, usage values, or private product details are included here.

@ozymandiashh
Copy link
Copy Markdown
Contributor Author

Validation run on macOS arm64 with real local usage data. No project names, prompts, paths, session IDs, or internal product details are included here.

Commands run:

  • swift build from mac/
  • npx vitest run tests/menubar-json.test.ts

Results:

  • Swift app target builds successfully.
  • Menubar JSON tests passed: 16/16.

Swift unit tests were not used for this validation because the current local Swift test target is blocked by the pre-existing no such module 'Testing' issue in CapacityEstimatorTests.swift.

@ozymandiashh ozymandiashh force-pushed the feat/menubar-status-period branch from 426a71c to 1f9b444 Compare May 17, 2026 16:00
@ozymandiashh
Copy link
Copy Markdown
Contributor Author

Visual validation for #302 after the latest rebase.

  • Menubar status item shows the configured Month period suffix.

Screenshot reviewed and approved by the contributor before posting.

image

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

Labels

needs-validation PR requires validation against real-world usage before review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: configurable period for menubar status icon (today / week / month)

2 participants