feat(ui): rebuild Subscription on subturtle-ui - #67
Open
SomiVista wants to merge 1 commit into
Open
Conversation
Replaces the four standalone pricing cards with the design's tablist + detail panel: a current-plan usage strip, one tab per tier, and the selected tier's price, CTA and features in a single panel. All `st-` tokens, no raw hex and no `dark:` variants, so the screen reads correctly under both themes. No new components or icons were needed — StSwitch, StBadge, StButton, StCard, StSkeleton, StEmptyState, StModal and solar:check-circle-bold all already ship. Notable decisions, and where they depart from the prototype: - The usage strip serves every tier, so StarterUsageCard (used only here) is deleted and the paid "This month" block folds into the same four meters. - `bg-st-sunken` for the detail panel's left rail, not the design's `--ink-50`: the ink ramp inverts in dark, where ink-50 lands within one channel step of --surface-card and the rail disappears. - Meter fill stays rose at rest as drawn, but keeps the amber/red cap warning Council 004 specced — the prototype's all-zero demo never shows it. - An unlimited allowance renders an empty accent track; a full bar would read as "at your cap". A free tier never reads Unlimited (FREE_CAPS fallback), and a Reader with no voice budget keeps the "Upgrade to Learner" upsell instead of a dead 0 / 0. - The ribbon uses Stripe's `badge` metadata, falling back to the i18n string. - Manage/change/downgrade CTAs are preserved; goToPortal no longer branches on trialing (the off-ramp's own "continue" calls it, which would have recursed), manageSubscription owns that. - The strip waits on isSubscriptionFetching so its defaults never render as a real answer, and dead `isLoading` state is dropped. theme-tokens.css and CLAUDE.md carried a note saying the design system's subturtle-theme.css supersedes ui/'s dark layer wholesale. Per the screen handoff that note predates the theme PR; ui/'s is the one that ships (RGB channels for Tailwind, the .theme-switching rule, measured contrast). Corrected in both places — comments only, no palette change. The e2e spec asserted against the old card layout and VoiceMeter sub-line; its assertions are updated to the new structure. 8/8 pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The next screen in the pilotUI → subturtle-ui migration, from the
Subturtle Subscription.dc.htmlhandoff.What changed
The four standalone pricing cards become the design's tablist + detail panel: a current-plan usage strip, one tab per tier, and the selected tier's price, CTA and features in a single panel. Styled entirely with
st-classes andvar(--token)— no raw hex, nodark:variants — and verified underdata-theme="light"and"dark".No new
ui/components and no new icons.StSwitch,StBadge,StButton,StCard,StSkeleton,StEmptyState,StModalandsolar:check-circle-boldall already ship, soui/gains nothing but a comment fix.StarterUsageCardis deleted — it was used only by this page, and the strip now serves every tier.VoiceMeterstays untouched: two un-migrated screens still use itssmvariant.Departures from the prototype, and why
bg-st-sunkenfor the panel's left rail, not--ink-50ink-50lands within one channel step of--surface-cardand the rail disappears.FREE_CAPSfallback, carried over from the deleted card — a missing cap would otherwise promise something the tier does not give.0 / 0.badgemetadataManage / change plan / downgrade / checkout / Adaptive Pricing all behave as before.
Fixes found along the way
goToPortalrecursion. It branched ontrialingto open the retention off-ramp, but the off-ramp's own "continue" callsgoToPortal— trialing users could never reach the portal.manageSubscriptionnow owns that branch.getSubscriptionDetailslanded; it now waits onisSubscriptionFetching.isLoadingstate dropped rather than carried forward — it was read but never assigned.theme-tokens.cssand CLAUDE.md said the design system'ssubturtle-theme.csssupersedesui/'s dark layer wholesale. Per the handoff that note predates the theme PR —ui/'s is the one that ships (RGB channels for Tailwind, the.theme-switchingrule, measured contrast). Corrected in both. Comments only; no palette change.Testing
tests/e2e/specs/subscription-ui.spec.tsasserted against the old cards and the VoiceMeter sub-line; assertions updated to the new structure. 8/8 pass.yarn test:unit43/43,nuxi typecheckclean for the touched files (4 pre-existing errors remain inActivityChartOverview.vue, untouched).🤖 Generated with Claude Code