feat: rename AuthorizedUser to AuthenticatedUser across the application#1572
Merged
feat: rename AuthorizedUser to AuthenticatedUser across the application#1572
Conversation
Contributor
|
No TODO comments were found. |
Contributor
There was a problem hiding this comment.
Pull request overview
Renames the API/user model from AuthorizedUser to AuthenticatedUser and updates downstream ViewModels to use the new naming, aligning terminology across the Beutl API layer and UI.
Changes:
- Replaced
BeutlApiApplication.AuthorizedUserwithAuthenticatedUser, including sign-in/restore flows. - Renamed the user model type to
AuthenticatedUserand updated refresh/usage call sites. - Updated affected ViewModels (settings + extensions) to reference
AuthenticatedUserand renamedIsAuthorized→IsAuthenticated.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Beutl/ViewModels/SettingsPages/AccountSettingsPageViewModel.cs | Switched reactive bindings and sign-in flow typing to AuthenticatedUser. |
| src/Beutl/ViewModels/MainViewModel.cs | Renamed the HttpClient field used for API app construction. |
| src/Beutl/ViewModels/ExtensionsPages/RemoteUserPackageViewModel.cs | Updated auth checks/refresh calls to use AuthenticatedUser. |
| src/Beutl/ViewModels/ExtensionsPages/LibraryPageViewModel.cs | Constructor and stored user reference updated to AuthenticatedUser. |
| src/Beutl/ViewModels/ExtensionsPages/DiscoverPages/PackageDetailsPageViewModel.cs | Updated auth refresh gate to AuthenticatedUser. |
| src/Beutl/ViewModels/ExtensionsPages/DiscoverPageViewModel.cs | Updated auth refresh gate to AuthenticatedUser. |
| src/Beutl/ViewModels/ExtensionsPageViewModel.cs | Renamed IsAuthorized to IsAuthenticated and updated subscription source. |
| src/Beutl.Api/Objects/AuthorizedUser.cs | Renamed the class to AuthenticatedUser (file name not yet aligned). |
| src/Beutl.Api/BeutlApiApplication.cs | Introduced AuthenticatedUser reactive property and updated sign-in/sign-out/restore methods accordingly. |
Comments suppressed due to low confidence (2)
src/Beutl.Api/Objects/AuthorizedUser.cs:13
- This file still has the old filename (AuthorizedUser.cs) but now defines
AuthenticatedUser. Please rename the file toAuthenticatedUser.csto match the type name (consistent with the otherBeutl.Api.Objectsfiles) and avoid confusion/IDE navigation issues.
public class AuthenticatedUser(
Profile profile,
AuthResponse response,
BeutlApiApplication clients,
HttpClient httpClient,
DateTime writeTime)
src/Beutl/ViewModels/SettingsPages/AccountSettingsPageViewModel.cs:146
useris assigned from the sign-in switch but never used. If the intent is only to trigger sign-in side effects, assign to_/remove the local; otherwise useuser(e.g., for a null check or subsequent refresh) to avoid an unused-variable warning.
_cts.Value = new CancellationTokenSource();
AuthenticatedUser? user = provider switch
{
"Google" => await _clients.SignInWithGoogleAsync(_cts.Value.Token),
"GitHub" => await _clients.SignInWithGitHubAsync(_cts.Value.Token),
_ => await _clients.SignInAsync(_cts.Value.Token),
};
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Minimum allowed line rate is |
src/Beutl/ViewModels/ExtensionsPages/RemoteUserPackageViewModel.cs
Dismissed
Show dismissed
Hide dismissed
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.
Description
Rename all instances of
AuthorizedUsertoAuthenticatedUserthroughout the application for consistency and clarity.Breaking changes
The type
AuthorizedUserhas been replaced withAuthenticatedUser, which may affect any external references or dependencies.Fixed issues
None.