Skip to content

Add usage stats admin view and harden WebUI build flow#243

Open
ronghuaxueleng wants to merge 2 commits intoCJackHwang:devfrom
ronghuaxueleng:pr/usage-stats-20260407
Open

Add usage stats admin view and harden WebUI build flow#243
ronghuaxueleng wants to merge 2 commits intoCJackHwang:devfrom
ronghuaxueleng:pr/usage-stats-20260407

Conversation

@ronghuaxueleng
Copy link
Copy Markdown
Contributor

Summary

  • add in-memory usage statistics tracking and admin-facing usage stats UI
  • expose usage aggregation in the admin panel for account/model visibility
  • harden WebUI build/bootstrap flow for rolldown optional native bindings and consistent static output

Testing

  • npm run build --prefix webui
  • bash -n scripts/build-webui.sh

Notes

  • today's branch includes two commits: usage stats work plus follow-up WebUI build fixes

caoqiang added 2 commits April 7, 2026 15:42
Track API calls by account, model, and interface surface (openai_embeddings,
chat/responses, claude, gemini). Stats kept in memory with snapshot endpoint
/admin/stats/usage and WebUI dashboard page.

- Add internal/usagestats package with thread-safe counter store
- Record usage in OpenAI embeddings, chat, and responses handlers
- Expose GET /admin/stats/usage API endpoint
- Add UsageStatsContainer and useUsageStats hook in WebUI
- Add i18n strings for usage stats page (en/zh)
- Auto-fix Rolldown native binding in start.mjs
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

Someone is attempting to deploy a commit to the cjack's projects Team on Vercel.

A member of the Team first needs to authorize it.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@CJackHwang CJackHwang changed the base branch from main to dev April 7, 2026 09:03
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ds2api Ready Ready Preview, Comment Apr 7, 2026 9:05am

@CJackHwang
Copy link
Copy Markdown
Owner

CJackHwang commented Apr 7, 2026

处理一下,没过门槛检查的话只能等我以后有空再处理了

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