Clarify first-run login onboarding and conditional auth messaging across Web/Desktop - #2
Merged
Conversation
…essaging, progress feedback (fixes ramseur#27)
Copilot created this pull request from a session on behalf of
xingh
July 30, 2026 22:42
View session
xingh
marked this pull request as ready for review
July 30, 2026 22:42
There was a problem hiding this comment.
Pull request overview
This PR updates the Web (Blazor) and Desktop (Avalonia) login experiences to be more state-driven: clearly distinguishing first-run onboarding (first user becomes admin), hiding irrelevant registration/approval messaging, and adding in-flight progress feedback during sign-in/registration.
Changes:
- Added explicit first-run onboarding messaging and a dedicated “Create administrator account” primary action.
- Made registration/approval UI conditional on server state, and surfaced “pending approval” as informational feedback instead of an error.
- Added busy/progress indicators and disabled inputs/actions while auth operations are in flight.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Sovrant.Web/wwwroot/css/sovrant.css | Adds styles for first-run info box, success/info messaging, and busy status/spinner. |
| src/Sovrant.Web/Components/Pages/Login.razor | Implements first-run explainer/action, conditional registration + approval note, and busy status UI. |
| src/Sovrant.Desktop/Views/LoginWindow.axaml | Aligns Desktop login UI with first-run/conditional messaging and adds busy label display. |
| src/Sovrant.Desktop/ViewModels/LoginViewModel.cs | Adds state-driven properties/messages and operation-specific busy labels for login/register flows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+117
to
+120
| _firstRun = await IdentityService.IsFirstRunAsync().ConfigureAwait(false); | ||
| _registrationOpen = await IdentityService.IsRegistrationOpenAsync().ConfigureAwait(false); | ||
| _approvalRequired = !_firstRun && _registrationOpen | ||
| && await IdentityService.IsApprovalRequiredAsync().ConfigureAwait(false); |
Comment on lines
+44
to
+47
| IsFirstRun = await _identity.IsFirstRunAsync().ConfigureAwait(true); | ||
| IsRegistrationOpen = await _identity.IsRegistrationOpenAsync().ConfigureAwait(true); | ||
| IsApprovalRequired = !IsFirstRun && IsRegistrationOpen | ||
| && await _identity.IsApprovalRequiredAsync().ConfigureAwait(true); |
Comment on lines
+61
to
+64
| <TextBlock Text="{Binding InfoMessage}" | ||
| Foreground="Green" | ||
| TextWrapping="Wrap" | ||
| IsVisible="{Binding InfoMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/> |
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.
This change makes first-run account creation explicit (first user becomes admin), removes irrelevant auth UI states, and adds in-flight progress feedback during sign-in/registration. It aligns Web and Desktop login behavior so users only see messages/actions that apply to their current server state.
First-run onboarding clarity
State-driven messaging and actions
Progress feedback during auth operations
Role correctness on post-registration sign-in path