feat(webapp): Improve the Usage page billing panels - #4820
Conversation
Presentation-only redesign of the org Usage page: wrap the Credits and Month-to-date panels in cards with a baseline-aligned value + title row and a full-width bar, add a Set/Update billing limit link, match the two bars' styling, drop the bar load animation, and tidy the Tasks header and empty state. No loader/logic changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
WalkthroughThe billing usage bar now uses static Merge Risk: ⚪ Minimal · up to This update only refreshes the Usage page layout and adds navigation to the existing billing-limits page without changing billing calculations, data access, or authorization. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/webapp/app/components/billing/UsageBar.tsx (1)
26-71: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winAdd required crumbs to the changed UI blocks.
Add
//@Crumbsmarkers or `// `#region` `@crumbsblocks while implementing these changes. Remove them withagentcrumbs stripbefore merge.
apps/webapp/app/components/billing/UsageBar.tsx#L26-L71: add crumbs for the static usage-indicator rendering.apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.usage/route.tsx#L166-L248: add crumbs for the credits and billing-limit card rendering.apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.usage/route.tsx#L277-L340: add crumbs for the task-note and empty-state rendering.As per coding guidelines,
**/*must “Add crumbs as you write code.”Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5003653b-6434-4a1c-b797-d9c2cc512af5
📒 Files selected for processing (2)
apps/webapp/app/components/billing/UsageBar.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.settings.usage/route.tsx
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📜 Review details
⏰ Context from checks skipped due to timeout. (33)
- GitHub Check: report
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (24, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (19, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (22, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (23, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (17, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (21, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (20, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (13, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (14, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (18, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (15, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (16, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (12, 24)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (11, 24)
- GitHub Check: obsmap / 🧪 Unit Tests: Observability Map
- GitHub Check: fk-cascade-guard / fk-cascade-guard
- GitHub Check: runops-guard / runops-guard
- GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (1, 2)
- GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (2, 2)
- GitHub Check: typecheck / typecheck
- GitHub Check: code-quality / code-quality
- GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (7)
For dashboard changes, visually verify the running Remix app with Chrome DevTools MCP, using snapshots, screenshots, interaction, and console-message checks as appropriate.
📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)
Files:
apps/webapp/app/components/billing/UsageBar.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.settings.usage/route.tsx
**Prefer static imports over dynamic imports.** Only use dynamic `import()` when:
📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/webapp/app/components/billing/UsageBar.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.settings.usage/route.tsx
Add crumbs as you write code — not just when debugging. Mark lines with
📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/webapp/app/components/billing/UsageBar.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.settings.usage/route.tsx
Use zod for validation in packages/core and apps/webapp
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
apps/webapp/app/components/billing/UsageBar.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.settings.usage/route.tsx
Access environment variables through the `env` export of `env.server.ts` instead of directly accessing `process.env`
📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)
Files:
apps/webapp/app/components/billing/UsageBar.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.settings.usage/route.tsx
Use function declarations instead of default exports
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
apps/webapp/app/components/billing/UsageBar.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.settings.usage/route.tsx
Use types over interfaces for TypeScript
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
apps/webapp/app/components/billing/UsageBar.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.settings.usage/route.tsx
|
Thanks @devin-ai-integration and @coderabbitai for the reviews. Summary of how each point was handled: Devin — ✅ No issues found. Nothing to action. CodeRabbit
changeset-bot — intentionally no changeset/ All required checks are green and the two AI reviews pass, so this should be good to merge. 🟢 |
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
|
Tip For best results, initiate chat on the files or code changes.
The No further action is required from my review. 🐇 ✅ ✏️ Learnings added
You are interacting with an AI system. |
UI-only update of the Usage page (
/orgs/…/settings/usage). No logic or data changes: the loader is byte-identical tomainand the usage-bar calculations are unchanged.What changed
$valueand title on one baseline-aligned row and the progress bar full-width beneath.TableBlankRow.