feat(lobby): account block + ⋮ menu in the sidebar footer#331
Merged
Conversation
974fcc0 to
53d1f77
Compare
Replace the three stacked text buttons (Home / Network Inspector / Versions) with an account-aware footer: the signed-in identity on the left, a "more" (⋮) menu of those utility actions on the right. - Account block reflects the selected server: avatar (initial on a primaryContainer tile), display name, and email. Name resolves givenName+familyName -> preferred_username -> email -> "Signed in". Unauthenticated or no-auth servers (and no selection) show Guest / "G" / no email. A Watch on the per-entry session signal keeps it live across sign-in/expiry without a server-map mutation. - The ⋮ menu collapses Home / Network Inspector / Versions into icon+text items, de-emphasising the dev-oriented destinations. Adds account-block widget tests covering the authenticated identity (name/email/initial), both Guest fallbacks (no-auth + not-signed-in), the preferred_username fallback, and the menu routing — the auth-path coverage that can't be exercised manually without credentials. All 77 lobby tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Add Server button already routes to the (confusingly named) home screen, so a Home item in the ⋮ menu was redundant — remove it; the menu now holds just Network Inspector and Versions. Also tighten the sidebar chrome: a shared horizontal gutter, a wider logo→name gap, and simpler Add Server spacing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1b0ccfc to
0e667b7
Compare
The wide two-pane layout has no AppBar and the narrow Drawer adds no inset of its own, so the sidebar's brand header and account bar could render under the status bar, notch, or home indicator. Wrap the wide body and the drawer content in SafeArea. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The server tile subtitle and the account block each derived a display name from the user profile, but only the account block consulted preferred_username, so the same profile could render different names in the two places. Extract a single _signedInName helper both call; this also gives the tile the preferred-username fallback. Derive the account avatar's initial from the resolved name (via characters.first, so a non-ASCII leading character isn't split) rather than carrying it as a separate record field that could drift out of sync. Add account-block coverage for the live session-flip update, the profile-absent "Signed in" fallback, and email omission when empty. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Replaces the three stacked text buttons with an account-aware footer: signed-in identity on the left, a ⋮ menu of utility actions on the right.
primaryContainertile), display name, email. Name resolves givenName+familyName → preferred_username → email → "Signed in". Unauthenticated / no-auth / no selection → Guest / "G" / no email. AWatchon the per-entry session signal keeps it live across sign-in/expiry.Test plan
flutter test(full suite) green — 1598 tests. Adds the auth-path widget coverage that can't be run manually without credentials: authenticated identity (name/email/initial), both Guest fallbacks, preferred_username fallback, and ⋮ routing.Lobby polish stack (review/merge bottom-up):
polish/lobby→feat/lobby-single-server→feat/lobby-branded-header→feat/lobby-account-bar.polish/segmented-button-radiusis independent (offmain).🤖 Generated with Claude Code