Skip to content

feat: complete profile flow#107

Merged
kckagancan merged 3 commits into
developmentfrom
clean-profile-flow-2
Mar 25, 2026
Merged

feat: complete profile flow#107
kckagancan merged 3 commits into
developmentfrom
clean-profile-flow-2

Conversation

@gulcetahtasiz

Copy link
Copy Markdown
Contributor

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.

@kckagancan kckagancan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Real bug in ProfileView
  • In the allergies file section, the verification status is checking profile.chronicDiseasesVerified instead of the allergies verification field.
  • This means the UI can show the wrong verification state for allergy documents.
  1. Infinite loading case in ProfileView
  • If there is no user entry in localStorage, profile never gets initialized and the page stays stuck on "Loading...".
  • The component should distinguish between “initial hydration/loading” and “no profile data available”.
  1. 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.
  1. Unused code in CompleteProfileForm
  • useRouter is imported and initialized but never used.
  • This should be removed.
  1. Layout consistency concern in CompleteProfileForm
  • The page already renders inside AuthLayout, but the form also wraps itself with AuthCard.
  • AuthLayout already 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.
  1. Typing quality
  • ProfileView relies heavily on any keyword, 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 erinc00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Real bug in ProfileView
  • In the allergies file section, the verification status is checking profile.chronicDiseasesVerified instead of the allergies verification field.
  • This means the UI can show the wrong verification state for allergy documents.
  1. Infinite loading case in ProfileView
  • If there is no user entry in localStorage, profile never gets initialized and the page stays stuck on "Loading...".
  • The component should distinguish between “initial hydration/loading” and “no profile data available”.
  1. 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.
  1. Unused code in CompleteProfileForm
  • useRouter is imported and initialized but never used.
  • This should be removed.
  1. Layout consistency concern in CompleteProfileForm
  • The page already renders inside AuthLayout, but the form also wraps itself with AuthCard.
  • AuthLayout already 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.
  1. Typing quality
  • ProfileView relies heavily on any keyword, 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.

@gulcetahtasiz

Copy link
Copy Markdown
Contributor Author

All feedback points have been addressed:

Fixed verification field mismatch
Fixed infinite loading case
Replaced base64 storage with lightweight metadata only to avoid localStorage limits (backend storage will be handled separately)
Removed unused code
Fixed layout overlap
Improved typing significantly

Ready for re-review. @kckagancan @erinc00

@erinc00
erinc00 requested review from erinc00 and kckagancan March 25, 2026 18:44

@erinc00 erinc00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 kckagancan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okey looks good now. Ready to merge.

@kckagancan
kckagancan merged commit 16f393c into development Mar 25, 2026
@kckagancan
kckagancan deleted the clean-profile-flow-2 branch March 25, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants