Skip to content

feat(dashboard): add trial-ended upgrade page - #5999

Merged
alx-xo merged 13 commits into
mainfrom
GRW-49-trial-end-page
Sep 4, 2026
Merged

feat(dashboard): add trial-ended upgrade page#5999
alx-xo merged 13 commits into
mainfrom
GRW-49-trial-end-page

Conversation

@alx-xo

@alx-xo alx-xo commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

GRW-49

Summary

  • Add an authenticated /trial-ended experience that routes expired trials to clear self-serve PAYG and sales-assisted upgrade paths while preserving active-trial, never-trialed, and multi-organization gating behavior.
  • Move PAYG checkout into a shared flow with request locking, HTTPS-only redirect validation, inline errors, and checkout telemetry.
  • Extract the Cal.com booking experience into reusable inline and modal components with account prefill, trusted-origin validation, responsive viewport sizing, an email fallback, and source-specific booking attribution.
  • Remove /talk-to-us; trial-status and inference-cap sales actions now open the shared booking modal in place with context appropriate to each surface.
  • Add accessible RadioCard primitives whose arrow-key selection is separate from explicit activation, including leading-icon, nested-control, focus, and keyboard behavior.
  • Refine the trial-ended and BookDemo layouts for a focused upgrade experience across desktop and short viewports.

Motivation

Expired trials previously fell into the same sales gate used by other account states, leaving no dedicated recovery path and no self-serve billing option. This change gives expired organizations a focused decision point, keeps sales booking available wherever it is needed without route changes, and consolidates checkout and calendar behavior so safety, accessibility, and telemetry remain consistent across dashboard surfaces.

Visual

Updated end of trial page

Trial-ended upgrade page

Modal Booking Calendar
image

New ui component Radio Card

image

@alx-xo
alx-xo requested review from a team as code owners September 3, 2026 00:22
@linear-code

linear-code Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

GRW-49

@changeset-bot

changeset-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: eceb059

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Running ultrareview automatically — This PR changes authenticated trial-gating redirects and introduces a new upgrade path that can initiate Stripe PAYG checkout, while refactoring shared booking flows and telemetry across the dashboard.. I'll post findings when complete.

@alx-xo alx-xo added the preview Spawn a preview environment label Sep 3, 2026
cubic-dev-ai[bot]

This comment was marked as resolved.

@alx-xo
alx-xo marked this pull request as draft September 3, 2026 00:44
@alx-xo
alx-xo force-pushed the GRW-49-trial-end-page branch 2 times, most recently from d1bc719 to ebdf5b1 Compare September 3, 2026 19:17
@alx-xo
alx-xo marked this pull request as ready for review September 3, 2026 20:07
@cubic-dev-ai

cubic-dev-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Running ultrareview automatically — Adds a trial-ended upgrade flow with billing checkout hooks, trial-expiry redirects, and reusable booking calendar components — high risk if routing or checkout logic regresses.. I'll post findings when complete.

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

Ultrareview completed in 41m 7s

All reported issues were addressed across 17 files

Linked issue analysis

Linked issue: GRW-49: feat: create an end of trial page

Status Acceptance criteria Notes
Expired-trial organizations are redirected to /trial-ended. AuthHandler uses the refreshed trial lifecycle and navigates expired trials to the new route.
Users without an expired trial cannot remain on /trial-ended. TrialEnded redirects non-expired or missing trials, while AuthHandler preserves the existing non-expired gate behavior.
The page explains that the trial ended and workspace data remains available, with PAYG and sales choices initially unselected. The page copy communicates continued workspace availability and controls the radio choice with an initial null value.
PAYG activation starts the existing checkout flow with locking, safe URL validation, error handling, and telemetry. The extracted checkout hook retains the mutation, organization lock, safe external URL validation, redirect, error state, and telemetry.
Sales activation opens the reusable booking calendar modal with prefilled details, email contact, and booking telemetry. The sales card opens BookingCalendarModal with gate defaults and an email footer; BookingCalendar retains account prefill and booking telemetry.
Page views and each choice selection or switch are tracked. The page captures a page-view event and records each choice with the previous selection.
Arrow-key navigation changes selection without launching checkout or sales. RadioCard only invokes onSelect for explicit activation, and the component tests cover arrow navigation without actions.
Explicit card activation launches the action, including repeat activation of the selected card. Surface clicks and Enter/Space activation invoke onSelect independently of selection state; tests cover repeat clicks and keyboard activation.
Choice cards support keyboard interaction, visible focus, disabled behavior, and nested controls do not activate the card. RadioGroupItem provides the focusable radio behavior, focus styling is defined on the card, and tests cover disabled cards and nested controls.
Active-trial, never-trialed, and multi-organization routing behavior remains intact. The existing multi-organization switch remains before lifecycle routing, while non-expired sessions continue through the existing gate paths.
Generic RadioCard and RadioCardGroup components are provided with configurable indicators and orientation. Reusable components expose group-level indicator configuration and vertical or horizontal orientation, with stories and tests.
⚠️ The responsive layout works on mobile and desktop. The page uses a horizontal card layout and responsive sizing for the booking calendar, but the diff does not provide clear mobile-specific layout coverage or tests.

Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.

Re-trigger cubic

@alx-xo alx-xo removed the preview Spawn a preview environment label Sep 3, 2026
@speakeasy-api speakeasy-api deleted a comment from speakeasybot Sep 3, 2026
@alx-xo
alx-xo force-pushed the GRW-49-trial-end-page branch from ebdf5b1 to a9bb02f Compare September 4, 2026 08:06

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

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

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread client/dashboard/src/components/billing/inference-cap-control.tsx Outdated

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

All reported issues were addressed across 1 file (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread client/dashboard/src/pages/demo/TrialEnded.tsx Outdated

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

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

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread client/dashboard/src/pages/demo/components/DemoBookingFlow.tsx

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

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

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread client/dashboard/src/components/ui/RadioCard/index.test.tsx Outdated
@alx-xo
alx-xo force-pushed the GRW-49-trial-end-page branch from 07d481a to eceb059 Compare September 4, 2026 18:46
@alx-xo
alx-xo added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit 7226fcc Sep 4, 2026
46 checks passed
@alx-xo
alx-xo deleted the GRW-49-trial-end-page branch September 4, 2026 19:46
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants