Skip to content

Fix admin user null statistics - #59

Draft
sunnylqm wants to merge 1 commit into
mainfrom
agent/fix-admin-user-null-stats
Draft

Fix admin user null statistics#59
sunnylqm wants to merge 1 commit into
mainfrom
agent/fix-admin-user-null-stats

Conversation

@sunnylqm

@sunnylqm sunnylqm commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Treat Redis-backed user quota statistics as nullable in the admin API contract.
  • Render unavailable quota statistics and app PV counts as - in the user detail drawer.

Why

When Redis statistics are unavailable, the server intentionally returns last7Days, today's quota values, and app check counts as null. The admin UI assumed those values were always present and crashed while reading last7Days.avg.

Impact

The /admin-users detail drawer now remains usable during Redis statistics degradation and clearly marks unavailable values.

Validation

  • bun run typecheck
  • bun run lint
  • bun test (249 passed)
  • bun run build

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for pushy ready!

Name Link
🔨 Latest commit 8e60009
🔍 Latest deploy log https://app.netlify.com/projects/pushy/deploys/6a791c80f9f481000893342c
😎 Deploy Preview https://deploy-preview-59--pushy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ec5379f-5fdd-43ec-95b8-361c7af58cfb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant