Add multi-day calendar selection with custom popover UI#393
Merged
Conversation
Replace native DatePicker with a custom-themed CalendarPopover supporting non-contiguous multi-day selection. Add --days CLI flag for comma-separated date filtering that post-filters from the bounding range scan. CLI: parseDaysFlag() parses and validates dates, filterProjectsByDays() filters turns to only selected days. Verified that sum of individual --day calls matches --days output across cost, calls, activities, models, and providers. Swift: DataClient passes --days for multi-day, with single-day fallback. AppStore tracks selectedDays as Set<String> with PayloadCacheKey support. CalendarPopover uses pending state committed only on Done tap.
When user clears all selected days and taps Done, switch back to the active period instead of silently keeping the old day selection.
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
--daysCLI flag with comma-separated dates, post-filters from bounding range scan--from/--to, dashboard day nav)What changed
CLI (
src/):parseDaysFlag()incli-date.ts: parses, validates, deduplicates comma-separated datesfilterProjectsByDays()inparser.ts: post-filters turns to only selected days--daysoption onstatuscommand, wired into menubar-json with filtering on all paths (projects, providers, daily cache)--from/--toadded tostatusfor contiguous rangesdkey, arrow nav, DayBanner)Swift menubar (
mac/):PeriodSegmentedControl: calendar icon inline in period strip, custom CalendarPopover with month nav, multi-day toggle, Done/Clear buttonsAppStore:selectedDays: Set<String>,switchTo(days:),PayloadCacheKeywith days fieldDataClient: passes--daysfor multi-day, single-day fallback fordays.count == 1Verification
--daycalls matches--daysoutput across cost, calls, activities (12 categories), models (9), and providers (12)Test plan