feat: Pomerium assertion headers used in UI now to display user info#42
Merged
feat: Pomerium assertion headers used in UI now to display user info#42
Conversation
- Added UserContext using @pomerium/js-sdk to extract Pomerium assertion headers. - Updated Chat component to greet user by name, similar to Claude. - Enhanced Header to show user's email and profile picture. - Wrapped app in UserProvider for global access to user identity. - Added @pomerium/js-sdk to package.json and lockfile.
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds Pomerium-based user identity to the UI and personalizes components accordingly
- Introduces
UserContextto fetch and provide user info via@pomerium/js-sdk - Wraps the app in
UserProviderand updatesHeaderandChatto display name, email, and avatar - Adds
@pomerium/js-sdkdependency
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/routes/__root.tsx | Wrapped <ModelProvider> in <UserProvider> |
| src/contexts/UserContext.tsx | New context to fetch and expose Pomerium user info |
| src/components/Header.tsx | Displays user’s email, name, and profile picture in the header |
| src/components/Chat.tsx | Personalizes initial chat greeting with the user’s first name |
| package.json | Added @pomerium/js-sdk dependency |
Comments suppressed due to low confidence (2)
src/contexts/UserContext.tsx:36
- [nitpick] Using a generic
['user']key can collide with other queries. Rename to['userInfo']or similar to make it more specific.
queryKey: ['user'],
src/contexts/UserContext.tsx:20
- Core logic in
fetchUserInfoandUserProviderlacks unit tests. Add tests to verify fallback behavior and error handling ofgetBrowserUser.
async function fetchUserInfo(): Promise<UserInfo> {
nickytonline
added a commit
that referenced
this pull request
Jun 11, 2025
…42) - Added UserContext using @pomerium/js-sdk to extract Pomerium assertion headers. - Updated Chat component to greet user by name, similar to Claude. - Enhanced Header to show user's email and profile picture. - Wrapped app in UserProvider for global access to user identity. - Added @pomerium/js-sdk to package.json and lockfile.  For the avatar URL, I was looking at the Enterprise Console source code and we handle it differently @wasaga and we seem to extend the UserInfo with some getters/setters. We can chat tomorrow when you're in SF. Closes #41
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.
For the avatar URL, I was looking at the Enterprise Console source code and we handle it differently @wasaga and we seem to extend the UserInfo with some getters/setters. We can chat tomorrow when you're in SF.
Closes #41