Skip to content

feat(band): add MTD and Last month periods to the board - #1382

Open
omeraloni wants to merge 1 commit into
DietrichGebert:mainfrom
omeraloni:feat-band-board-month-periods
Open

omeraloni wants to merge 1 commit into
DietrichGebert:mainfrom
omeraloni:feat-band-board-month-periods

Conversation

@omeraloni

Copy link
Copy Markdown

Closes #1381

Adds two calendar periods to the board's period selector: MTD (month to date) and Last month. Cost is tracked per calendar month, so rolling windows don't match a month's spend.

  • Every figure follows the selector: KPI cards, chart, session table, busiest-day fact and share card.
  • The KPI delta compares MTD with the same days of last month, and Last month with the month before it.
  • The window logic moves into one period() helper (days, comparison days, wording) in place of five copies of span()/days().
  • No new dependency, no change to the ruleset, so no benchmark.

Checks: npm test (143/144; the one failure is the pandas test, which needs pandas installed and fails the same on main), check-rule-copies.js, check-versions.js. The new test in tests/band.test.tsx covers the buttons and the month ranges; I ran its assertions in three timezones.

🤖 Generated with Claude Code

Cost is tracked per calendar month, so rolling windows do not match a
month's spend. MTD compares with the same days of last month, Last month
with the month before it. One period() helper replaces the span()/days()
pairs so every figure follows the selector.

Closes DietrichGebert#1381

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

Board: add Month to date and Last month periods

1 participant