Admin dashboard cleanup + shadcn-style CSS refresh #29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/admin-dashboard-cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
get_overview_stats()and JSON API unchanged for backward compatibilityTest plan
ruff check admin_dashboard.pypasses/admin/— Overview shows 7 stat cards + 3 cost cards/admin/api/overviewJSON API still returns all fields🤖 Generated with Claude Code
Approved
This is a clean UI/CSS refactoring of the admin dashboard. The changes modernize the styling by introducing CSS custom properties (shadcn-style design tokens), update the visual design (pill badges, underline-style nav, border-based cards instead of shadows), and remove redundant granular metric cards (input/output tokens, premium/free cost breakdowns) while keeping the totals. No bugs, security issues, or performance problems found.
Suggestions
total_input_tokensandtotal_output_tokensare still being computed inget_overview_stats()(lines ~167-168) and fetched via SQL (lines ~151-152), but are no longer displayed in any template and aren't used in any calculations. Consider removing those SQL columns and dict assignments to avoid unnecessary computation, or keep them intentionally since the/api/overviewJSON endpoint still exposes them.premium_cost_usdandfree_cost_usdare removed from the template display but still computed. Unlike the token keys,premium_cost_usdis actively used to calculatepremium_profit_loss(line ~221), so it must stay.free_cost_usdcould be cleaned up if not needed by API consumers.header-topwrapper div around<h1>currently has no sibling elements. If no additional header elements are planned (e.g., user avatar, logout button), it could be simplified to just the<h1>without the wrapper.Thanks for the review! Addressed:
header-topwrapper: Removed in99bf643— simplified to just<h1>since there are no sibling elements.total_input_tokens/total_output_tokens/free_cost_usdin SQL: Keeping intentionally — the/api/overviewJSON endpoint returns these fields and removing them could break API consumers.