Skip to content

feat: Integrate user profile API#45

Open
syed-tp wants to merge 7 commits intoref/relocate-home-screenfrom
feat/integrate-user-api
Open

feat: Integrate user profile API#45
syed-tp wants to merge 7 commits intoref/relocate-home-screenfrom
feat/integrate-user-api

Conversation

@syed-tp
Copy link
Collaborator

@syed-tp syed-tp commented Mar 23, 2026

  • Integrated user profile API (GET and PATCH /me)
  • Added local DB caching for user profile (Drift)
  • Updated UI to use reactive profile data
  • Added loading and error handling in edit profile
  • Enabled avatar update with image picker

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the application's user profile management by integrating a real backend API for fetching and updating user data. It establishes a clear separation between authentication state and user profile data, leveraging a local database for caching and reactive updates. This change ensures that user-specific information is always up-to-date and consistent across the application, improving the overall user experience by providing real-time profile data and enabling server-side persistence of edits.

Highlights

  • User Profile API Integration: Implemented new API endpoints (GET and PATCH /api/v2.5/me/) for fetching and updating user profile details, moving away from hardcoded mock data.
  • Decoupled Authentication and User Profile: Refactored AuthProvider to solely manage authentication status (boolean isLoggedIn), while user profile data is now managed by a new UserRepository and UserProvider in the profile package, streaming data from a local Drift database.
  • Local Database Caching for User Profiles: Introduced a new UsersTable in the Drift database (AppDatabase schema version 7) to cache user profile metadata, supporting offline access and reactive UI updates.
  • Repository and Data Source Enhancements: Updated DataSource and HttpDataSource interfaces and implementations to support getProfile and updateProfile operations. The UserDto model was expanded to include more profile fields and fromJson/toCompanion factories.
  • UI Updates for Profile Management: Modified EditProfileScreen, PaidActiveHomeScreen, and PaidActiveProfileScreen to reactively display and update user profile information using the new UserProvider. Image picking functionality was added to EditProfileScreen for avatar updates.
  • Dependency Updates: Added image_picker and file_selector related packages across different platforms (iOS, Linux, macOS, Windows) to support image selection for profile avatars.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 41bae11639

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gemini-code-assist
Copy link

Warning

Gemini is experiencing higher than usual traffic and was unable to create the review. Please try again in a few hours by commenting /gemini review.

@syed-tp
Copy link
Collaborator Author

syed-tp commented Mar 24, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully integrates the user profile API, decoupling authentication state from user metadata. The changes introduce a reactive data flow for user profiles using a database-first approach, which is a significant architectural improvement. The implementation of profile fetching and updating via DataSource and UserRepository is well-structured.

My review includes a few key suggestions:

  • Aligning the API specification documentation with the implementation to prevent confusion.
  • Addressing code duplication in the new UserRepository to maintain clear domain boundaries.
  • Improving the user experience on the 'Edit Profile' screen by adding loading and error handling states as specified in the requirements.

Overall, this is a solid contribution that modernizes the app's session and profile management.

@syed-tp syed-tp force-pushed the ref/relocate-home-screen branch from aafeb79 to 1ca0b74 Compare March 24, 2026 06:29
@syed-tp syed-tp force-pushed the feat/integrate-user-api branch from 366dcdc to 25e8d59 Compare March 24, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant