Skip to content

feat(frontend): show account profile row with logout - #408

Open
MohakGupta2004 wants to merge 4 commits into
truefoundry:mainfrom
MohakGupta2004:main
Open

feat(frontend): show account profile row with logout#408
MohakGupta2004 wants to merge 4 commits into
truefoundry:mainfrom
MohakGupta2004:main

Conversation

@MohakGupta2004

@MohakGupta2004 MohakGupta2004 commented Aug 22, 2026

Copy link
Copy Markdown

Surfaces the logged-in user's email/role instead of a bare logout icon, so a shared/self-hosted deployment shows whose session is active.

Summary

Closes #363

Changes

  • Replace LogoutButton.tsx/LogoutButton.css with UserProfile.tsx/UserProfile.css: avatar+email trigger row → Account modal (email, role, Log out) → existing logout confirm dialog

  • Cache email/role from auth.me() in authSession.ts alongside the existing oidc-connected flag

  • Add user icon to the shared icon registry (@truefoundry/trueforge-ui)

  • Add changeset for frontend and @truefoundry/trueforge-ui

How was this tested?

pnpm test

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

Low Risk
UI-only identity display and the same logout path; no auth protocol or session-validation changes.

Overview
Replaces the shell’s bare logout icon with an account control so OIDC sessions show who is logged in.

The ShellActionsActionSlot override is now UserProfile: an initial-letter avatar opens an Account modal with email, role, and Log out, then the existing confirm-and-redirect logout flow. auth.me() results cache email and role next to the oidc-connected flag so remounts still show identity. A user icon is registered in trueforge-ui for the no-email fallback.

Reviewed by Cursor Bugbot for commit d37bf2a. Bugbot is set up for automated code reviews on this repo. Configure here.

MOHAK GUPTA added 2 commits August 22, 2026 23:53
Surfaces the logged-in user's email/role instead of a bare logout
icon, so a shared/self-hosted deployment shows whose session is
active.
@changeset-bot

changeset-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d37bf2a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@truefoundry/trueforge Patch
@truefoundry/trueforge-ui Patch
frontend Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4184595. Configure here.

Comment thread packages/frontend/src/UserProfile.tsx
Comment thread packages/frontend/src/UserProfile.tsx
frontend is private (bundled into @truefoundry/trueforge); the
changeset must bump the published package, not the private one.
@chiragjn chiragjn added the ui label Aug 24, 2026
@jayesh9747

Copy link
Copy Markdown
Contributor

@MohakGupta2004 u can put the screenshot as well so that reviewer get better idea about ur pr

@MohakGupta2004

Copy link
Copy Markdown
Author

@jayesh9747

Screen.Recording.2026-08-24.at.6.18.46.PM.mov

Would this be good? Please suggest me any changes if you want to make it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show logged in User Profile

3 participants