Skip to content

fix(frontend): plan page dark-mode loader and checkout popup - #2900

Merged
riderx merged 4 commits into
mainfrom
cursor/29ce5f5c
Aug 7, 2026
Merged

fix(frontend): plan page dark-mode loader and checkout popup#2900
riderx merged 4 commits into
mainfrom
cursor/29ce5f5c

Conversation

@riderx

@riderx riderx commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary (AI generated)

  • Plan subscribe spinner now inherits button text color so it stays visible on dark-mode white buttons
  • Web checkout always uses a confirm dialog with a real _blank link after Stripe session creation, avoiding popup blockers
  • DialogV2 lets target="_blank" anchors open natively instead of preventDefault + window.open
  • openBlank falls back to a confirm link when the browser blocks the popup

Visual verification (AI generated)

Local dark-mode run on this worktree (ENV=local Vite + worktree Supabase). Clicked Upgrade with checkout delayed so the loader stays visible on the white dark-mode button.

Plan button loader in dark mode

Plans page loader in dark mode

Motivation (AI generated)

Dark mode made the subscribe loading spinner invisible (text-white on dark:bg-white). Checkout also opened with window.open after an async API call, which browsers often block.

Business Impact (AI generated)

Users can see checkout loading in dark mode and complete plan upgrades without a blocked Stripe tab.

Test Plan (AI generated)

  • Open /settings/organization/plans in dark mode and click a plan CTA — spinner is visible on black and white buttons
  • Confirm checkout dialog appears on web and opens Stripe in a new tab
  • Cancel the confirm dialog — loading stops and no tab opens
  • If a browser blocks window.open, confirm the fallback dialog can open the URL

Generated with AI

Made with Cursor


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Web checkout now opens in a new browser tab.
    • Added a fallback link when the browser blocks the new tab.
    • Added localized messaging explaining how to open checkout manually.
  • Bug Fixes

    • Improved checkout handling across web, mobile, and iOS platforms.
    • Stripe portal links now reliably open or provide a manual fallback.
    • Updated checkout confirmation messaging and tracking.

Inherit spinner color for dark-mode plan buttons and open Stripe checkout via a confirm link so browsers do not block the tab after async session creation.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 28 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 53178591-fb2a-42f1-8e9a-13583c9549c9

📥 Commits

Reviewing files that changed from the base of the PR and between 2a2d877 and a21b9ff.

⛔ Files ignored due to path filters (2)
  • docs/pr/2900/plan-button-loader-dark.png is excluded by !**/*.png
  • docs/pr/2900/plans-page-loader-dark.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • playwright/e2e/subscription-checkout.spec.ts
  • src/services/stripe.ts
📝 Walkthrough

Walkthrough

Web Stripe checkout now uses a confirmation flow across web platforms. Blocked popups show a manual checkout link. Dialog handling and E2E coverage were updated for the new-tab flow.

Changes

Stripe checkout flow

Layer / File(s) Summary
Web checkout routing
src/pages/settings/organization/Plans.vue, messages/en.json
Web platforms use the generic checkout confirmation flow. Safari-specific detection and tracking were removed. New localization strings describe new-tab checkout and blocked-popup recovery.
Blocked popup fallback
src/services/stripe.ts, src/components/DialogV2.vue
openBlank now returns an asynchronous result and shows a manual external link when window.open fails. _blank links close the dialog without blocking navigation. Stripe portal confirmation awaits the result.
Checkout flow validation
playwright/e2e/subscription-checkout.spec.ts
The E2E test validates the visible confirmation link and Stripe emulator checkout URL before navigation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Plans
  participant openBlank
  participant Browser
  participant DialogV2
  Plans->>openBlank: Open Stripe checkout URL
  openBlank->>Browser: Call window.open
  Browser-->>openBlank: Return popup result
  openBlank->>DialogV2: Show manual link when blocked
  DialogV2->>Browser: Open checkout link in a new tab
Loading

Possibly related PRs

Suggested labels: codex

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title clearly identifies the two primary changes: the dark-mode plan loader and checkout popup behavior.
Description check ✅ Passed The description explains the changes, motivation, impact, visual checks, and test plan, but the checklist is not completed.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Aug 6, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_7fb8b852-c486-4fbd-9945-848987c09f8d)

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/services/stripe.ts Outdated
Comment thread src/pages/settings/organization/Plans.vue
@codspeed-hq

codspeed-hq Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing cursor/29ce5f5c (a21b9ff) with main (b8e9443)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Propagate iOS action-sheet cancel from openBlank and align the subscription checkout E2E with the confirm-link web flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Aug 6, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_aae79b41-24a0-411a-8712-24009d1719b1)

@coderabbitai coderabbitai Bot added the codex label Aug 6, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/services/stripe.ts`:
- Around line 62-64: Update the popup-opening flow around the opened result from
globalThis.open to set opened.opener to null before returning true; preserve the
existing null-return fallback unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0fe8e1e1-4d43-4f9d-9e1b-c246893fda06

📥 Commits

Reviewing files that changed from the base of the PR and between 0fdf275 and 2a2d877.

📒 Files selected for processing (5)
  • messages/en.json
  • playwright/e2e/subscription-checkout.spec.ts
  • src/components/DialogV2.vue
  • src/pages/settings/organization/Plans.vue
  • src/services/stripe.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • Cap-go/capacitor-updater (manual)

Comment thread src/services/stripe.ts

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread playwright/e2e/subscription-checkout.spec.ts Outdated
Local screenshots from the worktree app showing the subscribe button spinner visible on the dark-mode white button.

Co-authored-by: Cursor <cursoragent@cursor.com>
@riderx

riderx commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

Visual verification (AI generated)

Local dark-mode screenshot from this branch (ENV=local Vite + worktree Supabase). Upgrade click held open by delaying Stripe checkout so the loader is visible on the white dark-mode plan button.

Plan button loader in dark mode

Plans page loader in dark mode

@cursor

cursor Bot commented Aug 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_267f4f97-792c-4819-9297-6ed1edf7dc0c)

Null window.opener after a successful openBlank, and assert Stripe checkout via the Confirm dialog's native target=_blank popup.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Aug 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_c73cace6-8233-4e46-907a-1ac982667674)

@riderx
riderx merged commit d76ef26 into main Aug 7, 2026
82 of 86 checks passed
@riderx
riderx deleted the cursor/29ce5f5c branch August 7, 2026 10:20
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant