Repository navigation
Fix sidebar avatar loading fallback - #9375
Conversation
📝 WalkthroughWalkthroughChangesAccount avatar loading now supports a configured system icon and adjusted fallback colors. Sidebar account presentation now uses the profile icon during session restoration. Tests cover the restoration presentation. Account avatar rendering and restoration
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant HostAccountFlow
participant SidebarAccountButton
participant SidebarAccountButtonPresentation
participant StackAccountAvatarView
HostAccountFlow->>SidebarAccountButton: expose isRestoringSession
SidebarAccountButton->>SidebarAccountButtonPresentation: resolve account presentation
SidebarAccountButtonPresentation-->>SidebarAccountButton: select profile icon during restoration
SidebarAccountButton->>StackAccountAvatarView: configure signedOutSystemName
StackAccountAvatarView-->>SidebarAccountButton: render loading system icon
Possibly related PRs
Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (22 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Sources/Auth/StackAccountAvatarView.swift`:
- Around line 59-71: Update the .systemIcon branch of loadingView to pass the
existing CmuxSystemSymbolImage through framedAvatar(...), preserving its
systemName, pointSize, weight, and foregroundStyle configuration so all loading
states share the avatar framing.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 24cf1224-dda8-41f0-a884-58b57838e5cc
📒 Files selected for processing (2)
Sources/Auth/StackAccountAvatarView.swiftSources/VerticalTabsSidebar+EmptyAreasAndFooter.swift
2c67313 to
1094425
Compare
The bottom-left account avatar now shows the profile icon while a remote image is loading. Missing or failed images use the name initial with neutral gray styling; loaded images remain unchanged.
Verified with tagged macOS build
avloadand UI-test auth fixtures for a stalled image request and a user without a profile image. No user-facing strings changed.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Improve sidebar account avatar loading fallback: show an optional system icon while the image loads and use neutral gray styling during loading; accent color only when no loading icon. Keep the icon visible during session restore; loaded images remain unchanged.
StackAccountAvatarViewacceptsloadingSystemNameand renders that icon at avatar size withsecondaryLabelColorwhile loading; the sidebar passessignedOutSystemNameand keeps it during session restore.isRestoringSession(exposed byHostAccountFlow) to avoid showing a profile picture while restoring; fallback tint derives fromloadingSystemName.Written for commit 1e7d2ca. Summary will update on new commits.
Summary by CodeRabbit