Repository navigation
Feat/lui 144 welcome badge - #98
Merged
Merged
Conversation
…tracking - Modified the sign-in flow for demo users to include a welcome flag in the redirect URL, ensuring a tailored experience. - Implemented a new function to record when users have seen the first-login welcome, preserving the welcome state for shared demo accounts without affecting future visitors.
…ayout - Added the WelcomeToaster component to display a welcome message for new users upon their first login. - Implemented logic to track whether the user has been welcomed, ensuring demo users receive a tailored greeting. - Wrapped the WelcomeToaster in a Suspense component to handle loading states effectively.
- Introduced the WelcomeToaster component to display tailored welcome messages for new users and demo accounts. - Implemented logic to ensure the welcome message is shown only once per user session, enhancing the onboarding experience. - Integrated with the existing ToastProvider for consistent user feedback across the application.
… French translations - Introduced new "welcome" section in `en.json` and `fr.json` to provide tailored greetings for first-time users and demo accounts. - Enhanced user onboarding experience by including specific messages for new users and demo exploration.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Strive PR Agent ReviewThe review could not be generated for this run (model unavailable or rate-limited). Push again to retry. |
…eter handling - Changed the icon displayed in the welcome toast from AudioWaveform to Hand for better visual representation. - Enhanced URL parameter management by ensuring only the welcome parameter is removed, preserving other query parameters and the hash in the URL.
5 tasks done
This branch was successfully deployed
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.
What
Adds a one-time welcome moment on first entry into the app, for a real first login and for demo entry. Closes LUI-144 (https://linear.app/luidgi-dev/issue/LUI-144/add-first-login-welcome-badgemoment-real-account-and-demo-account).
Why
Uxia synthetic user testing (LUI-142) found that first-time users landed on an empty Rhythm board with no acknowledgment of the sign-up to app transition, which reads as abrupt rather than as the calm coach voice.
How it works
Two triggers, because the two accounts are fundamentally different.
Real account. A
welcomed_atkey in the Supabase authuser_metadata, the same JSON the sign-up form already writesusernameandtimezoneinto. The protected layout reads it off theuserobject it already fetches, so there is no schema change, no migration, and no extra query.markWelcomed()persists it throughauth.updateUser({ data }), which merges into the existing metadata rather than replacing it. The result is exactly once per account, on any device, whatever the entry path (confirm CTA, a login days later, a fresh PWA install).user_metadatais client-writable by design, so it must never hold anything authorization depends on.tierstays inprofilesbehind RLS. A cosmetic "already greeted" flag is the correct use: the worst case if forged is that someone replays their own welcome toast.Demo account.
demo@striveapp.ccis a single shared user, so a per-user flag would be consumed by the first visitor in the world.signInAsDemo()redirects to/protected/flow?welcome=demoinstead, and the toaster strips the param withhistory.replaceStateonce shown, which also keeps an iOS standalone relaunch (it can restore the last URL) silent. Firing on every demo entry is intended: each entry is a different person.No new UI primitive. The toaster renders no markup of its own, it pushes through the existing
useToast().show()and inherits the card, the accent icon circle, the 5s auto-dismiss and the one-at-a-time queue already used by "Ritual defined".Copy
AudioWaveformCompassFR keys added in the same commit.
firstLoginreuses the onboarding line fromdocs/UX_WRITING.md;AudioWaveformis the icon already used by the Rhythm empty state, so the toast reads as part of Rhythm.Files
components/welcome/welcome-toaster.tsx(new) client component, mounted insideToastProviderapp/[locale]/protected/layout.tsxcomputesshowFirstLogin, mounts the toasterapp/[locale]/protected/actions.tsaddsmarkWelcomed()next tomarkNudgesSeenapp/[locale]/actions.tsdemo redirect carries?welcome=demomessages/en.json,messages/fr.jsonnewwelcomenamespaceRequired after merge
Every existing account lacks the metadata key, so all current beta users would see a "define your first ritual" toast despite already having rituals. Run this once, after the deploy is live, so only accounts created from then on are greeted:
Running it before the deploy would let any account created in between slip through.
Out of scope
proxy.ts(which intercepts/protectedbefore the forwarder page renders). Worth revisiting only if beta feedback still shows entry confusion.Testing
npm run lint,tsc --noEmit,npm run buildand the 76 unit tests pass?welcome=demoshows the demo toast and cleans the URL back to/protected/flowDEMO_USER_PASSWORDis stale and the Vercel variable is marked sensitive, so it cannot be read back