Skip to content

fix(frontend): preserve post-checkout dashboard redirect#5036

Open
senamakel wants to merge 2 commits into
tinyhumansai:mainfrom
senamakel:fix/post-checkout-dashboard-redirect
Open

fix(frontend): preserve post-checkout dashboard redirect#5036
senamakel wants to merge 2 commits into
tinyhumansai:mainfrom
senamakel:fix/post-checkout-dashboard-redirect

Conversation

@senamakel

@senamakel senamakel commented Jul 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Separate the public pricing destination from the authenticated billing dashboard destination.
  • Keep all pricing, upgrade, top-up, and usage-limit actions pointed at https://tinyhumans.ai/pricing.
  • Restore only payment success/cancel deep-link returns to https://tinyhumans.ai/dashboard.
  • Add focused regression tests for both payment return paths.

Problem

  • PR fix(frontend): redirect pricing links to public page #5035 intentionally redirected pricing actions to the public pricing page, but its shared constant was also used by Stripe checkout success/cancel deep links.
  • Completed or cancelled checkout flows must return to the authenticated billing dashboard rather than starting another pricing flow.

Solution

  • Introduce a dedicated PRICING_URL for pricing-facing UI and restore BILLING_DASHBOARD_URL for post-checkout account flows.
  • Migrate every pricing consumer to PRICING_URL, leaving only desktopDeepLinkListener.ts on the billing dashboard constant.

Submission Checklist

If a section does not apply to this change, mark the item as N/A with a one-line reason. Do not delete items.

  • Tests added or updated (happy path + at least one failure / edge case) per Testing Strategy — payment success and cancellation paths are both covered.
  • Diff coverage ≥ 80% — focused tests exercise both redirect constants and CI will enforce merged diff coverage.
  • N/A: Coverage matrix update — behavior-only redirect correction.
  • N/A: Affected feature IDs — no coverage-matrix feature row changed.
  • No new external network dependencies introduced (mock backend used per Testing Strategy).
  • N/A: Manual smoke checklist — no release workflow changed.
  • N/A: Linked issue — this follows review feedback on PR fix(frontend): redirect pricing links to public page #5035 rather than a separate issue.

Impact

  • Pricing CTAs still open the requested public pricing page.
  • Stripe checkout success/cancel callbacks once again open the authenticated dashboard.
  • No performance, security, migration, mobile, or CLI impact.

Related


AI Authored PR Metadata (required for Codex/Linear PRs)

Keep this section for AI-authored PRs. For human-only PRs, mark each field N/A.

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: fix/post-checkout-dashboard-redirect
  • Commit SHA: 5d3916ea48f1e1d9842f5b5d56041252b8382ed4

Validation Run

  • pnpm --filter openhuman-app format:check (via pre-push hook)
  • pnpm typecheck
  • Focused tests: five files, 60 tests passed via pnpm debug unit
  • Rust fmt/check (if changed): root formatting and clippy passed via pre-push hook; no Rust files changed
  • Tauri fmt/check (if changed): Tauri formatting and clippy passed via pre-push hook; no Tauri files changed

Validation Blocked

  • command: N/A
  • error: N/A
  • impact: None

Behavior Changes

  • Intended behavior change: Preserve the pricing redirect while restoring the post-checkout dashboard return.
  • User-visible effect: Pricing actions open pricing; completed/cancelled checkout returns to the dashboard.

Parity Contract

  • Legacy behavior preserved: Payment deep-link event dispatch, navigation, and browser-opening behavior are unchanged apart from restoring the prior dashboard destination.
  • Guard/fallback/dispatch parity checks: Payment success and cancellation redirect tests pass; pricing component tests remain green.

Duplicate / Superseded PR Handling

Summary by CodeRabbit

  • Bug Fixes

    • Updated upgrade, billing, subscription, and usage-limit links to open the pricing page.
    • Corrected billing dashboard links to open the dashboard instead of the pricing page.
    • Preserved payment success and cancellation navigation to the billing dashboard.
  • Tests

    • Added coverage verifying payment deep links open the correct billing dashboard destination.
    • Updated link assertions for pricing-related actions.

@senamakel
senamakel requested a review from a team July 18, 2026 05:13
@coderabbitai

coderabbitai Bot commented Jul 18, 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: 50 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: CHILL

Plan: Pro

Run ID: 08c92d6a-f946-4649-86f8-e595df8baf01

📥 Commits

Reviewing files that changed from the base of the PR and between 5d3916e and 1a4fbe4.

📒 Files selected for processing (2)
  • app/src/components/settings/panels/BillingPanel.test.tsx
  • app/src/config/__tests__/navConfig.test.ts
📝 Walkthrough

Walkthrough

Pricing-related frontend actions now open https://tinyhumans.ai/pricing, while payment deep links continue opening the corrected billing dashboard URL. Shared constants and focused tests were updated accordingly.

Changes

Pricing link routing

Layer / File(s) Summary
Shared URL contract
app/src/utils/links.ts
Adds PRICING_URL and corrects BILLING_DASHBOARD_URL to use /dashboard.
Pricing CTA wiring
app/src/components/..., app/src/config/navConfig.ts, app/src/features/conversations/Conversations.tsx
Updates billing, upgrade, usage-limit, subscription, top-up, and avatar-menu actions to open PRICING_URL.
Destination regression coverage
app/src/components/home/__tests__/HomeBanners.test.tsx, app/src/components/orchestration/MedullaOverviewPanel.test.tsx, app/src/utils/__tests__/desktopDeepLinkListener.test.ts
Updates pricing destination assertions and adds payment deep-link checks for the billing dashboard URL.

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

Suggested labels: bug

Suggested reviewers: aqilaziz

Poem

I’m a bunny with links in a row,
Pricing now has the right place to go.
Dashboard stays for payment’s flight,
CTAs hop to the public site.
Tests nibble errors out of sight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes one of the main changes: preserving the post-checkout dashboard redirect.
Linked Issues check ✅ Passed The PR matches #5035 by moving pricing-related actions to the public pricing page and updating tests, while also preserving dashboard return flows.
Out of Scope Changes check ✅ Passed The added dashboard redirect fixes and test updates are consistent with the stated pricing-link and checkout-return objectives.

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

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d3916ea48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/src/components/settings/panels/BillingPanel.tsx Outdated

@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: 2

🧹 Nitpick comments (1)
app/src/components/home/__tests__/HomeBanners.test.tsx (1)

4-4: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the shared pricing constant consistently in this test file.

The import now introduces PRICING_URL, but other pricing assertions still hard-code the URL and the test names still describe the destination as the billing dashboard. Rename those descriptions to “pricing page” and use PRICING_URL for every pricing CTA assertion.

Also applies to: 48-48, 80-80

🤖 Prompt for 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.

In `@app/src/components/home/__tests__/HomeBanners.test.tsx` at line 4, Update the
HomeBanners test descriptions to call the destination the “pricing page” instead
of the billing dashboard, and replace every hard-coded pricing URL in the
pricing CTA assertions with the imported PRICING_URL constant. Keep unrelated
Discord assertions unchanged.
🤖 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 `@app/src/components/OpenhumanLinkModal.tsx`:
- Around line 314-317: Update the billing CTAs in
app/src/components/OpenhumanLinkModal.tsx lines 314-317 and
app/src/components/settings/panels/BillingPanel.tsx lines 32-34 to use new
pricing-oriented i18n keys instead of the dashboard copy, and add those keys
with appropriate translations to every locale.

In `@app/src/features/conversations/Conversations.tsx`:
- Around line 2788-2789: Update both pricing CTA handlers in Conversations.tsx,
including the handlers near openUrl(PRICING_URL) and the top-up CTA, to add
namespaced debug logging before the external navigation and error logging when
it rejects. Replace the bare fire-and-forget calls with promise rejection
handling while preserving the existing PRICING_URL behavior.

---

Nitpick comments:
In `@app/src/components/home/__tests__/HomeBanners.test.tsx`:
- Line 4: Update the HomeBanners test descriptions to call the destination the
“pricing page” instead of the billing dashboard, and replace every hard-coded
pricing URL in the pricing CTA assertions with the imported PRICING_URL
constant. Keep unrelated Discord assertions unchanged.
🪄 Autofix (Beta)

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: CHILL

Plan: Pro

Run ID: eea1561f-f020-40df-92a8-771a07016a54

📥 Commits

Reviewing files that changed from the base of the PR and between d13a559 and 5d3916e.

📒 Files selected for processing (12)
  • app/src/components/OpenhumanLinkModal.tsx
  • app/src/components/chat/TokenUsagePill.tsx
  • app/src/components/home/HomeBanners.tsx
  • app/src/components/home/__tests__/HomeBanners.test.tsx
  • app/src/components/orchestration/MedullaOverviewPanel.test.tsx
  • app/src/components/orchestration/MedullaOverviewPanel.tsx
  • app/src/components/settings/panels/BillingPanel.tsx
  • app/src/components/upsell/GlobalUpsellBanner.tsx
  • app/src/config/navConfig.ts
  • app/src/features/conversations/Conversations.tsx
  • app/src/utils/__tests__/desktopDeepLinkListener.test.ts
  • app/src/utils/links.ts

Comment thread app/src/components/OpenhumanLinkModal.tsx Outdated
Comment thread app/src/features/conversations/Conversations.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant