feat: design onboarding and profile settings flows#517
Open
Guddy0101 wants to merge 1 commit intoStellerCraft:mainfrom
Open
feat: design onboarding and profile settings flows#517Guddy0101 wants to merge 1 commit intoStellerCraft:mainfrom
Guddy0101 wants to merge 1 commit intoStellerCraft:mainfrom
Conversation
- Add website (URL, optional) and connectionStatus (enum: online/offline/busy/away) fields to profileSchema, updateProfileAction, and ProfileSettingsForm - Create /app/onboarding page with entry state (form) and completion state (success checkmark + Go to dashboard link) - Add completeOnboardingAction reusing profileSchema for consistent validation - Add 12 tests for onboarding action covering validation, success, and error paths Closes StellerCraft#8
|
@Guddy0101 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
feat: design onboarding and profile settings flows (#8)
Summary
Implements the first-run onboarding flow and extends the profile settings
form as specified in issue #8. New users are guided through a dedicated
onboarding page immediately after sign-up, and the profile settings form
now captures website and connection status alongside the existing fields.
Changes
Profile Settings — new fields
Files:
apps/frontend/src/app/app/settings/profile/actions.ts,ProfileSettingsForm.tsx,page.tsxwebsitefield toprofileSchema: optional URL, validated byZod (
z.string().url()or empty string).connectionStatusfield toprofileSchema: enum ofonline | offline | busy | away, defaults toonline.updateProfileActionand sent toPUT /api/profile.ProfileSettingsFormrenders a URL input for website (with inlineerror) and a
<select>for connection status, consistent with theexisting field style (TailwindCSS,
aria-invalid,aria-describedby).page.tsxpasses the new default values to the form.Onboarding page —
/app/onboardingFiles:
apps/frontend/src/app/app/onboarding/page.tsx,OnboardingForm.tsx,actions.tsEntry state
"Welcome to CRAFT — Let's set up your profile."
displayName(required),bio(optional, 160-char max),website(optional URL),connectionStatus(select).profile settings).
aria-required,aria-invalid,aria-describedby,role="alert"on errors.Completion state
completeOnboardingActionresponse."Go to dashboard" link to
/app.role="status"andaria-live="polite"for screen-readerannouncement.
completeOnboardingActionactions.ts; reusesprofileSchemafrom profilesettings for consistent validation — no duplicated schema logic.
PUT /api/profileon success.ProfileState(idle / success / error +optional
fieldErrors) consumed by the client component.Tests
File:
apps/frontend/src/app/app/onboarding/actions.test.ts12 new tests, all passing (18 total including existing profile tests):
PUT /api/profilecallTest results
Test Files 2 passed (2)
Tests 18 passed (18)
Checklist
profileSchema(no duplication)max-w-md)data-testidattributesCloses #8