Skip to content

fix(billing): stop the AI credits row from scrolling the usage table - #2533

Merged
Makisuo merged 2 commits into
mainfrom
fix/billing-ai-credits-row-overflow
Nov 12, 2026
Merged

Makisuo merged 2 commits into
mainfrom
fix/billing-ai-credits-row-overflow

Conversation

@Makisuo

@Makisuo Makisuo commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

The AI credits row on the billing page showed this cycle's spend by feature ("Code review $230.82 · Security audits $216.05 · ..."). That line was wider than the usage column and pushed the whole usage table into a horizontal scroll.

The row now keeps only the "Details" link to Settings › Billing › AI credits, which already shows the full breakdown. The load failure line with "Try again" is unchanged.

Test plan

  • billing.scene.test.ts passes (11/11)
  • oxlint clean on the touched files

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Changes
    • The AI credits row no longer displays a per-source spending breakdown.
    • The row shows a “Details” link, including when usage information fails to load.
    • The usage error message and retry option have been removed from the AI credits row.

…e table stops scrolling

The per-feature spend line under AI credits was wider than the usage column and
pushed the table into a horizontal scroll. The row now links to the AI credits
page with Details, which carries the full breakdown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Makisuo Makisuo added the preview:web Deploy a Workers-only PR preview (no ingest/Electric); see docs/pr-previews.md label Nov 12, 2026
@Makisuo
Makisuo deployed to preview-tinybird November 12, 2026 16:16 — with GitHub Actions Active
@maple-review-bot

This comment has been minimized.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The AI credits row now shows a Details link instead of per-source usage details and retry controls. The billing model and update function no longer include the AI usage retry message and handler. The test checks that the row and link appear after a failed usage read.

Changes: Billing row display

Layer / File(s) Summary
Simplify AI credits row
apps/web/src/page/settings/billing/model.ts, apps/web/src/page/settings/billing/update.ts, apps/web/src/page/settings/billing/view-usage.ts, apps/web/src/page/settings/billing/billing.scene.test.ts
The AI usage retry message and handler are removed. The AI credits row renders a Details link instead of per-source usage or retry controls. The test checks that the row and link appear after a failed usage read.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Merge Risk: Minimal · up to 84368

The billing page's AI credits row now shows a Details link instead of the wider per-source breakdown. No merge-blocking risk is evident.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the fix and its scope: the AI credits row on the billing page no longer scrolls the usage table. The PR removes the per-feature AI credits breakdown, the load-failure message, and the …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the fix and its scope: the AI credits row on the billing page no longer scrolls the usage table. The PR removes the per-feature AI credits breakdown, the load-failure message, and the retry handler, and adds a Details link. The title covers the main change in brief terms and matches the PR objectives. It does not name the Details link or the removal of the retry path, which is expected for a short title.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f1321a06-56dc-473d-8458-060c5ba621db
Commits

Reviewing files that changed from the base of the PR and between 9843d7f and 84368f4.

Files selected for processing: 4

  • apps/web/src/page/settings/billing/billing.scene.test.ts
  • apps/web/src/page/settings/billing/model.ts
  • apps/web/src/page/settings/billing/update.ts
  • apps/web/src/page/settings/billing/view-usage.ts
Files with no reviewable changes: 2

  • apps/web/src/page/settings/billing/model.ts
  • apps/web/src/page/settings/billing/update.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

@maple-review-bot maple-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 inline note from Maple's review. The score and summary are in the review comment above.

… read fails

The link needs no data, so a failed read no longer swaps it for a retry line
naming a breakdown the row no longer shows. The retry message goes with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Makisuo
Makisuo deployed to preview-tinybird November 12, 2026 16:21 — with GitHub Actions Active
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🍁 Maple PR preview

Note

Preview resources were removed when this pull request closed.

Final commit 84368f4 · View workflow run

@Makisuo
Makisuo deployed to pr-preview November 12, 2026 16:22 — with GitHub Actions Active
@maple-review-bot

maple-review-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Maple review

🟢 Confidence 10/10 · safe to merge. The failure branch and its retry message are gone, so the Details link renders from row data alone; a scene test pins that on a failed read.
no findings · tests covered · risk low

The AI credits row drops its per-source spend line, keeping only the Settings › Billing › AI credits link, so the usage table no longer scrolls. F1 is fixed: the link now renders whether or not the AI usage read succeeds.

  • aiCreditsLink replaces aiSourcesLine and needs no aiUsage data
  • ClickedRetryAiUsage and its retry branch are removed
  • A scene test pins the Details link on a failed AI usage read

Fixed since the last review

  • ✅ F1 · Failed aiUsage read still hides the row's only content behind "Couldn't load where it went"

84368f4 · What was checked, coverage and telemetry details are on the Maple / review check. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@Makisuo
Makisuo deployed to pr-preview November 12, 2026 16:24 — with GitHub Actions Active
@Makisuo
Makisuo merged commit a4918b7 into main Nov 12, 2026
28 checks passed
@Makisuo
Makisuo deleted the fix/billing-ai-credits-row-overflow branch November 12, 2026 16:27
@Makisuo
Makisuo deployed to pr-preview November 12, 2026 16:27 — with GitHub Actions Active
@Makisuo
Makisuo deployed to preview-tinybird November 12, 2026 16:27 — with GitHub Actions Active

This branch was successfully deployed

2 active deployments
pr-preview — 84368f41 Deployed Nov 12, 2026 by Makisuo via deploy-pr-preview #11663
preview-tinybird — 84368f41 Deployed Nov 12, 2026 by Makisuo via branch #1232
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview:web Deploy a Workers-only PR preview (no ingest/Electric); see docs/pr-previews.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant