Skip to content

CONV-273: Show buy credits CTA on insufficient credits#242

Merged
menvil merged 1 commit into
developfrom
feature/CONV-273-show-buy-credits-cta-on-insufficient-credits
Jun 2, 2026
Merged

CONV-273: Show buy credits CTA on insufficient credits#242
menvil merged 1 commit into
developfrom
feature/CONV-273-show-buy-credits-cta-on-insufficient-credits

Conversation

@menvil

@menvil menvil commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds $hasInsufficientCredits: bool to DashboardConverter — set when InsufficientCreditsException is caught
  • Shows compact Buy Credits CTA inside the error block when user has insufficient credits
  • Error message now includes current balance for clarity
  • No conversion job created; no queue job dispatched

Test plan

  • tests/Feature/Livewire/DashboardConverterCreditsTest.php — insufficient credits flow shows "Not enough credits" + "Buy credits"
  • composer test passes (486 tests)
  • composer lint passes
  • npm run build passes

🤖 Generated with Claude Code


Summary by cubic

Shows a compact “Buy credits” CTA when a conversion fails due to insufficient credits and updates the error to include required credits and the user’s current balance. Meets CONV-273.

  • New Features
    • Added $hasInsufficientCredits to DashboardConverter, set on InsufficientCreditsException.
    • Error now shows required credits and current balance via CreditLedger.
    • Renders <x-billing.buy-credits-cta variant="compact" /> in the error block; no job is created when credits are insufficient.

Written for commit b239b0e. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 00ee8aea-8f8f-49cd-8ec1-8951fcef69c7

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/CONV-273-show-buy-credits-cta-on-insufficient-credits

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 and usage tips.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@menvil menvil force-pushed the feature/CONV-273-show-buy-credits-cta-on-insufficient-credits branch from 5b81309 to b239b0e Compare June 2, 2026 18:33
@menvil menvil merged commit c817a6b into develop Jun 2, 2026
1 check was pending
@menvil menvil deleted the feature/CONV-273-show-buy-credits-cta-on-insufficient-credits branch June 2, 2026 18:33
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