Skip to content

fix(webapp): show usage on the 1st of the month - #7323

Merged
macko911 merged 2 commits into
masterfrom
matej/nan-6845-show-usage-on-the-first-day-of-the-month-instead-of-a-blank
Sep 1, 2026
Merged

fix(webapp): show usage on the 1st of the month#7323
macko911 merged 2 commits into
masterfrom
matej/nan-6845-show-usage-on-the-first-day-of-the-month-instead-of-a-blank

Conversation

@macko911

@macko911 macko911 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Problem

On the 1st of every month the Connections and Sync records charts on /team/billing render as bare axes — no data — while the row above them shows a real number. It reads as a broken page, and it fixes itself on the 2nd.

The data is there. Those are running-average metrics, drawn as an area, and on the 1st the series holds a single day. An area spanning one point has no width to paint.

Solution

  • Show the point marker when only one day of the chart carries data, for both the single series and the stacked breakdown.
  • Add countDaysWithData next to the chart-row builders in useChartData.ts, with unit tests.

Counter metrics are unaffected — they draw bars, and one day is one visible bar.

Fixes NAN-6845

Testing

Verified against dev data on Sept 1 (a natural repro): single series, grouped by integration, and August as a no-regression check.

image

Connections and Sync records are running-average metrics, drawn as an
area. On the 1st of the month the series holds a single day, and an area
spanning one point has no width to paint, so the chart rendered as bare
axes even though the row above it showed a real number.

Show the point marker when only one day carries data, for both the
single series and the stacked breakdown. Counter metrics are unaffected:
they draw bars, and one day is one visible bar.
@linear-code

linear-code Bot commented Sep 1, 2026

Copy link
Copy Markdown

NAN-6845

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Preview Deploys

Preview Status URL Deploy Logs Last Updated
Webapp ✅ Ready Preview URL Deploy Logs 1 Sept 2026, 11:21 UTC
Storybook ✅ Ready Preview URL Deploy Logs 1 Sept 2026, 11:21 UTC

@macko911
macko911 deployed to development September 1, 2026 11:06 — with GitHub Actions Active
@macko911
macko911 deployed to development September 1, 2026 11:06 — with GitHub Actions Active
@macko911
macko911 marked this pull request as ready for review September 1, 2026 11:15

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/webapp/src/components/patterns/chart/useChartData.ts Outdated
The old name and its comment claimed a numeric cell always means real
data. That holds for a base series, but the breakdown builder zero-fills
missing past days, so a row of zeros counted too. What the function
actually measures is how many days the chart plots, which is what the
single-point check needs either way.
@macko911
macko911 deployed to development September 1, 2026 11:18 — with GitHub Actions Active
@macko911
macko911 deployed to development September 1, 2026 11:18 — with GitHub Actions Active
@macko911 macko911 changed the title fix(webapp): show usage on the 1st of the month (NAN-6845) fix(webapp): show usage on the 1st of the month Sep 1, 2026

@gabrielle-svg gabrielle-svg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice touch on the point marker!

@macko911
macko911 added this pull request to the merge queue Sep 1, 2026
Merged via the queue into master with commit f214861 Sep 1, 2026
41 checks passed
@macko911
macko911 deleted the matej/nan-6845-show-usage-on-the-first-day-of-the-month-instead-of-a-blank branch September 1, 2026 14:41
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.

2 participants