Skip to content

Conversation

neelanshsahai
Copy link
Contributor

No description provided.

Copy link

Summary of Changes

Hello @neelanshsahai, 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 integrates the Credential Manager Signal API into the application, significantly enhancing its ability to manage and communicate credential states with the Android system. It introduces new user-facing features for updating profile information and more granular control over passkey management, aiming to provide a more robust and user-friendly authentication experience.

Highlights

  • Credential Manager Signal API Integration: Implemented the Credential Manager Signal API, introducing new functions to signal unknown credentials, accepted credential IDs, and user details (name, display name) to the credential manager. This enhances the communication between the app and the system's credential management services.
  • New 'Update Profile' Feature: Added a dedicated 'Update Profile' screen and associated ViewModel, allowing users to modify their username and display name. This functionality leverages the new Signal API to update user metadata within the credential management system.
  • Enhanced Passkey Management UI: The Passkey Management screen now includes checkboxes for individual passkeys and a new button to 'Accept selected credentials'. This allows users to select multiple passkeys and signal their acceptance to the credential manager, improving passkey lifecycle management.
  • Credential Manager Library Update: Updated the AndroidX Credential Manager library to version 1.6.0-alpha05, which likely provides the necessary APIs for the new Signal functionality.
  • Data Persistence for Credential Information: Introduced new DataStore keys (RP_ID_KEY, USER_ID_KEY, CRED_ID) and logic to persist the Relying Party ID, User ID, and Credential ID. This ensures that essential credential-related identifiers are stored and accessible for signaling purposes.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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

@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 introduces the Signal API from the Credential Manager, which is a great addition. The implementation is mostly well-done, but there are several critical issues that need to be addressed, primarily unresolved merge conflicts in multiple files. Additionally, I've found a duplicated UI element, potential null-handling issues when constructing JSON objects, and a confusing variable name. Once these issues are resolved, the pull request will be in good shape.

@neelanshsahai
Copy link
Contributor Author

/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 implements the Credential Manager Signal API, which includes signaling unknown, accepted, and updated user credentials. It also adds a new screen for updating user profiles and refactors some UI components.

My review focuses on improving code maintainability by reducing duplication, enhancing clarity by using appropriate variable names, and correcting the state management in the new UpdateProfileViewModel to ensure the UI behaves as expected. Overall, the implementation of the Signal API is well done, but there are opportunities for refinement in the new UI and ViewModel code.

Comment on lines +46 to +59
private val _uiState = MutableStateFlow(UpdateProfileState())
val uiState = _uiState.asStateFlow()

init {
viewModelScope.launch {
_uiState.update {
UpdateProfileState(
userId = dataStore.read(USER_ID_KEY) ?: "",
rpId = dataStore.read(RP_ID_KEY) ?: "",
credentialId = dataStore.read(CRED_ID) ?: "",
)
}
}
}

Choose a reason for hiding this comment

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

medium

The _uiState is initialized and populated in the init block, but it's never collected or used by the UpdateProfileScreen. The screen uses its own local state, which starts empty. This means the user has to re-enter their information instead of editing it.

The ViewModel should expose the current username and displayName (e.g., by fetching them from AuthRepository), and the UpdateProfileScreen should collect this state to pre-populate the text fields. The current implementation of UpdateProfileState and the init block seems to be unused.

@cy245
Copy link
Contributor

cy245 commented Oct 13, 2025

Can we have a better title? It's unclear from the current one what this PR is supposed to be doing

@neelanshsahai neelanshsahai changed the title Cherry Pick Signal API implementation from branch Add Signal API implementation (RP Side) Oct 13, 2025
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.

2 participants