Skip to content

FEAT [GUI] Display signed-in user info in top bar and populate operator label with username#1636

Merged
behnam-o merged 25 commits intomicrosoft:mainfrom
behnam-o:dev/gui-username
Apr 22, 2026
Merged

FEAT [GUI] Display signed-in user info in top bar and populate operator label with username#1636
behnam-o merged 25 commits intomicrosoft:mainfrom
behnam-o:dev/gui-username

Conversation

@behnam-o
Copy link
Copy Markdown
Contributor

@behnam-o behnam-o commented Apr 21, 2026

Adds a component to display the currently-signed-in user on the top right of the GUI, and sets the operator label value as the username on load/login

This is what it looks like:
image

If running locally, the top bar component is not added, and the label value is not updated. i.e.
image

Note:
Testing in local is a little tricky in our current setup, because we have some logic in place to bypass auth altogether if a local env is detected. We need to fix that, but this is the workaround I used to force auth on local env, to test this change:

  1. create an app registration with http://localhost as its redirect URI
  2. set ENTRA_TENANT_ID and ENTRA_CLIENT_ID evn variables (from above) before running python dev.py start (which starts the backend and front end)
  3. in msalconfig.ts, return exactly ["openid"] instead of ["api://***"] (this basically means 'https://graph.microsoft.com/openid')
  4. for some reason, the LoginRedirect component is weird when running locally, so I had to comment it out in AuthProvider.ts and instead create a manual login button like this:
<UnauthenticatedTemplate>
 {/* <LoginRedirect /> */}
 <button onClick={() => msalInstance.loginRedirect(buildLoginRequest(authConfig.clientId))}>Log In</button>
</UnauthenticatedTemplate>

@behnam-o behnam-o marked this pull request as ready for review April 21, 2026 21:40
@romanlutz
Copy link
Copy Markdown
Contributor

romanlutz commented Apr 21, 2026

Needs tests for when it can't resolve the user. For example, if you're running it locally and aren't logged in.

Also, this should auto-populate the operator (with alias presumably?) so that people don't have to keep re-setting that.

@behnam-o behnam-o changed the title FEAT [GUI] Display signed-in user info in top bar FEAT [GUI] Display signed-in user info in top bar and populate operator label with username Apr 21, 2026
Comment thread frontend/src/components/UserAccountButton.test.tsx Outdated
Comment thread frontend/src/components/UserAccountButton.test.tsx
Comment thread frontend/src/components/UserAccountButton.test.tsx
Comment thread frontend/src/components/ErrorBoundary.test.tsx Outdated
Comment thread frontend/src/components/UserAccountButton.tsx Outdated
Comment thread frontend/src/components/UserAccountButton.tsx Outdated
Comment thread frontend/src/components/UserAccountButton.tsx Outdated
Copy link
Copy Markdown
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

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

Nice work! A few minor comments.

Comment thread frontend/src/App.tsx
Comment thread frontend/src/components/UserAccountButton.tsx Outdated
Comment thread frontend/src/components/UserAccountButton.test.tsx Outdated
Behnam Ousat and others added 6 commits April 22, 2026 11:42
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@behnam-o behnam-o merged commit a55eec5 into microsoft:main Apr 22, 2026
39 checks passed
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.

3 participants