feature: profile avatar opens a user-menu dropdown instead of signing out (COG-1060) - #276
Open
hannahhkyme wants to merge 3 commits into
Open
hannahhkyme wants to merge 3 commits into
hannahhkyme wants to merge 3 commits into
Conversation
… out (COG-1060) Co-Authored-By: hannah.kyme <hannahhkyme@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: hannah.kyme <hannahhkyme@gmail.com>
Co-Authored-By: hannah.kyme <hannahhkyme@gmail.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
Fixes COG-1060: a user reported that clicking the profile icon sends them to the login page. The sidebar user block's only control was a bare
LogOuticon button next to the avatar, so a click there calledlogout()→window.location.href = "/login". The header showed the user's name as plain text with no menu.New
UserMenu(frontend/client-app/src/components/ui/user-menu.tsx): avatar-initials trigger (aria-haspopup="menu") that opens a dropdown with the user's name/email, Settings (/settings) and Sign out. Closes on outside click, Escape, or after picking an item. Props:align,placement,variant: "light" | "dark", pluschildrenrendered next to the avatar inside the trigger.Sidebarfooter: replaced avatar + logout-icon with<UserMenu variant="dark" align="left" placement="top">; now also rendered when the sidebar is collapsed (avatar only).AppShellheader: the plaindisplayNamespan is now inside<UserMenu>so the header has a real profile control too.Keyboard: opening focuses the first item (ArrowUp on the trigger opens at the last item); ArrowUp/Down wrap, Home/End jump, Escape closes and restores focus to the trigger, Tab / focus leaving closes.
Sign-out now only happens via the explicit menu item.
Screenshots
Sidebar menu:
Header menu:
Devin-Org: engineering
Link to Devin session: https://app.devin.ai/sessions/a7e415f08015474cbc674e74905cdc4c
Open in Devin Desktop: https://app.devin.ai/desktop/session/a7e415f08015474cbc674e74905cdc4c?variant=devin
Requested by: @hannahhkyme