Fix Phase 17 inline review issues#245
Merged
Merged
Conversation
- Prefer payload price_id over config fallback in credit pack transaction metadata (stripe_price_id) - Reset hasInsufficientCredits in resetTargetSelection(), backToFormatStep(), goToSettingsStep(), and convertAnother() so stale error state cannot bleed into subsequent convert attempts - Replace text-white with color:var(--ca-on-primary) in buy-credits-cta component to use design token instead of hardcoded utility Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three inline review findings — all valid, all fixed.
1 —
stripe_price_idprefers payload over configCreditPackWebhookHandlerwas always writing$pack->stripePriceId(from local config/env). The webhook payload metadata may carry the actualprice_idthat Stripe used. Fixed: extract$metadata['price_id']and use it, falling back to$pack->stripePriceIdonly when null/empty.2 —
$hasInsufficientCreditsreset in all exit pathsThe flag was only cleared at the top of
convert(). Missing locations:resetTargetSelection()— now clears bothconvertErrorandhasInsufficientCredits; coversbackToUploadSummary()andresetCurrentUpload()(replace/remove file)backToFormatStep()— explicit reset added (doesn't callresetTargetSelection)goToSettingsStep()when navigating away from convert — explicit reset addedconvertAnother()— added both fields to the$this->reset([...])list3 —
text-white→color:var(--ca-on-primary)Design token
--ca-on-primary: #ffffffexists intheme.css. No Tailwind utility class exists for it yet. Replacedtext-whitewithcolor:var(--ca-on-primary)in the existing inline style on the<a>element. Nodocs/design/design-contract.mdfile exists in the repo — not created (not required by the finding).Test plan
composer testpasses (487 tests)composer lintpassesnpm run buildpasses🤖 Generated with Claude Code
Summary by cubic
Fixes three Phase 17 inline review issues. Uses the Stripe webhook’s
price_idwhen present, clears stale convert errors, and applies the--ca-on-primarydesign token for button text color.price_idfrom event metadata forstripe_price_id, falling back to$pack->stripePriceIdonly if missing.convertErrorandhasInsufficientCreditsingoToSettingsStep,backToFormatStep,resetTargetSelection, andconvertAnotherto prevent stale state.text-whitewithcolor:var(--ca-on-primary)in the buy-credits CTA to use the theme token.Written for commit e55ae46. Summary will update on new commits.