feat: complete profile flow#107
Conversation
There was a problem hiding this comment.
Thanks for the PR — the overall direction is good and the page/component split is clean. The auth page and profile page structure are generally aligned with the project architecture, and shared components are being used consistently in many places.
That said, I noticed a few issues that should be addressed before merge:
- Real bug in
ProfileView
- In the allergies file section, the verification status is checking
profile.chronicDiseasesVerifiedinstead of the allergies verification field. - This means the UI can show the wrong verification state for allergy documents.
- Infinite loading case in
ProfileView
- If there is no
userentry in localStorage,profilenever gets initialized and the page stays stuck on"Loading...". - The component should distinguish between “initial hydration/loading” and “no profile data available”.
- Risky localStorage usage for uploaded files
- Files are being converted to base64 and stored inside localStorage.
- This can hit browser storage limits quickly and is risky even for demo scenarios.
- It would be better to store only lightweight metadata/mock references on the client, or move file storage to a proper backend/storage flow.
- Unused code in
CompleteProfileForm
useRouteris imported and initialized but never used.- This should be removed.
- Layout consistency concern in
CompleteProfileForm
- The page already renders inside
AuthLayout, but the form also wraps itself withAuthCard. AuthLayoutalready provides the auth page container/card structure, so this creates overlapping layout responsibility.- Please make sure only one level is responsible for the auth card shell.
- Typing quality
ProfileViewrelies heavily onanykeyword, which makes it easier to miss field mismatches like the verification bug above.- A typed profile model/interface would make this much safer and easier to maintain.
Summary:
The PR is structurally on the right track, but I would not merge it before fixing the verification bug, the infinite loading case, the localStorage file handling approach, and the hardcoded color usage.
erinc00
left a comment
There was a problem hiding this comment.
Thanks for the PR — the overall direction is good and the page/component split is clean. The auth page and profile page structure are generally aligned with the project architecture, and shared components are being used consistently in many places.
That said, I noticed a few issues that should be addressed before merge:
- Real bug in
ProfileView
- In the allergies file section, the verification status is checking
profile.chronicDiseasesVerifiedinstead of the allergies verification field.- This means the UI can show the wrong verification state for allergy documents.
- Infinite loading case in
ProfileView
- If there is no
userentry in localStorage,profilenever gets initialized and the page stays stuck on"Loading...".- The component should distinguish between “initial hydration/loading” and “no profile data available”.
- Risky localStorage usage for uploaded files
- Files are being converted to base64 and stored inside localStorage.
- This can hit browser storage limits quickly and is risky even for demo scenarios.
- It would be better to store only lightweight metadata/mock references on the client, or move file storage to a proper backend/storage flow.
- Unused code in
CompleteProfileForm
useRouteris imported and initialized but never used.- This should be removed.
- Layout consistency concern in
CompleteProfileForm
- The page already renders inside
AuthLayout, but the form also wraps itself withAuthCard.AuthLayoutalready provides the auth page container/card structure, so this creates overlapping layout responsibility.- Please make sure only one level is responsible for the auth card shell.
- Typing quality
ProfileViewrelies heavily onanykeyword, which makes it easier to miss field mismatches like the verification bug above.- A typed profile model/interface would make this much safer and easier to maintain.
Summary: The PR is structurally on the right track, but I would not merge it before fixing the verification bug, the infinite loading case, the localStorage file handling approach, and the hardcoded color usage.
I agree with these points. In particular, the verification field mismatch in ProfileView, the infinite loading state when localStorage has no user entry, and the current file/base64 localStorage approach should be fixed before merge. I also share the concern about overlapping layout responsibility in CompleteProfileForm and the reintroduction of hardcoded colors.
|
All feedback points have been addressed: Fixed verification field mismatch Ready for re-review. @kckagancan @erinc00 |
erinc00
left a comment
There was a problem hiding this comment.
Looks good to me now. The main issues from the previous review appear to be addressed, and I do not see any major remaining blocker from this diff.
kckagancan
left a comment
There was a problem hiding this comment.
Okey looks good now. Ready to merge.
This PR implements the complete profile flow and profile view. It introduces the /complete-profile page where users can enter their physical information, medical history, and detailed address (country, city, district, neighborhood, and extra address) with dynamic location selection. It also adds the /profile page to display and update this information.
The authentication flow is updated so that after successful email verification, users are redirected to the complete profile page. Additionally, the signup flow now preserves email and phone data so they can be merged into the profile later.
Profile data is stored in localStorage under the key “user”. During save, existing user data (such as email and phone) is merged with the newly entered profile data, and the profile page reads from the same source.
Changes are scoped to feature-level components and pages, and shared UI components were not modified to avoid breaking existing structure.