Add tier trial UI components and activation flow - #2506
Merged
MusabShakeel576 merged 1 commit intoSep 10, 2026
Conversation
The app side of the admin gift. A trial the user has been given shows up as a card on the wallet screen — "You've received a gift", with the admin's own message when they wrote one — and the popup behind it opens once by itself so a gift is not left sitting unnoticed. Activating it is required and is the only thing that starts the clock, which is what makes "Maybe later" a real answer rather than a way of losing the gift: the offer stays on the account and the card is still there to tap. That is also why the card has no ✕, unlike the card-funnel banners it sits with — a dismissal would leave a live gift with nothing in the app pointing at it. Once it is running the card reads "You're on Prime", and the rewards screen grows the countdown the design puts between the tier name and the points. Tapping it answers the question a temporary tier actually raises — what happens at the end — with the expiry and the plain fact that the tier then goes back to being whatever the points and FUSE balance earn. The upgrade celebration is rebuilt to the design and is now genuinely shared: one card, mounted on the protected layout, that a points milestone, a confirmed FUSE balance and a just-activated trial all arrive at through the same tier change. Only the words differ, and a trial gets the extra line saying how long it runs. Nothing has to open it: activation writes the new tier into the rewards cache and the existing upgrade watcher takes it from there. Its three headline stats come from the tier-benefits endpoint rather than the user's own payload, because a gift is usually a tier they do not hold yet — their own numbers are Core's zeroes, and a per-cardholder cashback override is not what "Welcome to Prime" is announcing. That retires getConfirmedUpgradeBenefits, which built the old list from those numbers. Two small extractions keep this testable: the subscription rate is now served as a number alongside the prose it already had, and getTierDisplayName moved to lib/tierNames so the copy module can name a tier without pulling in the asset registry. constants/rewards re-exports it, so no call site changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TkJ3tWhLMMe8ifA3VGQx1Z
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
MusabShakeel576
deleted the
claude/admin-dashboard-profile-page-uuvq4r
branch
September 10, 2026 12:16
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
Implements the complete UI and logic for tier trials (admin gifts and welcome offers), including opt-in popups, activation, countdown displays, and upgrade celebrations.
Key Changes
New Components
Copy and Logic
trialOfferCopy(): Generates text for pending trials (admin gifts vs. welcome offers)upgradeCelebrationCopy(): Generates celebration text based on upgrade source (trial, points, FUSE)tierPopupStats(): Extracts tier benefits for displaytrialRemainingLabel(),trialDaysRemaining(),durationLabel()API and State Management
Type Definitions
pendingTierTrialandactiveTierTrialfieldsRefactoring
getTierDisplayName()fromconstants/rewards.tsto newlib/tierNames.tsto reduce circular dependenciesRewardsUpgradeFeedbackcelebration logic with newTierPopup-based implementationgetConfirmedUpgradeBenefits()in favor of tier-benefits endpoint dataIntegration Points
TierTrialPillto show countdown under tier nameTierTrialSlotto wallet screen for trial banner and popuptrialCountdownprop for trial displayNotable Implementation Details
hoursRemainingrather thanexpiresAtto prevent pill/backend disagreementhttps://claude.ai/code/session_01TkJ3tWhLMMe8ifA3VGQx1Z