Skip to content

feat: rename AuthorizedUser to AuthenticatedUser across the application#1572

Merged
yuto-trd merged 1 commit intomainfrom
yuto-trd/rename-authorized-authenticated
Mar 8, 2026
Merged

feat: rename AuthorizedUser to AuthenticatedUser across the application#1572
yuto-trd merged 1 commit intomainfrom
yuto-trd/rename-authorized-authenticated

Conversation

@yuto-trd
Copy link
Member

@yuto-trd yuto-trd commented Mar 8, 2026

Description

Rename all instances of AuthorizedUser to AuthenticatedUser throughout the application for consistency and clarity.

Breaking changes

The type AuthorizedUser has been replaced with AuthenticatedUser, which may affect any external references or dependencies.

Fixed issues

None.

Copilot AI review requested due to automatic review settings March 8, 2026 09:29
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

No TODO comments were found.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.AuthorizedUser with AuthenticatedUser, including sign-in/restore flows.
  • Renamed the user model type to AuthenticatedUser and updated refresh/usage call sites.
  • Updated affected ViewModels (settings + extensions) to reference AuthenticatedUser and renamed IsAuthorizedIsAuthenticated.

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 to AuthenticatedUser.cs to match the type name (consistent with the other Beutl.Api.Objects files) 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

  • user is 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 use user (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.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

Code Coverage

Package Line Rate Branch Rate Complexity Health
Beutl.Editor 82% 76% 864
Beutl.Extensibility 12% 14% 110
Beutl.Operators 0% 100% 1
Beutl.Language 0% 17% 1069
Beutl.ProjectSystem 10% 5% 3030
Beutl.Threading 98% 87% 122
Beutl.Engine 20% 18% 14339
Beutl.Configuration 40% 20% 306
Beutl.Utilities 73% 67% 358
Beutl.Core 38% 35% 3058
Summary 24% (13102 / 55739) 23% (3632 / 16033) 23257

Minimum allowed line rate is 0%

@yuto-trd yuto-trd merged commit 831b6ba into main Mar 8, 2026
14 checks passed
@yuto-trd yuto-trd deleted the yuto-trd/rename-authorized-authenticated branch March 8, 2026 09:43
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