Skip to content

feat(Web UI): add User Details view#60586

Merged
alexhemard merged 2 commits intomasterfrom
alexhemard/user-details
Nov 21, 2025
Merged

feat(Web UI): add User Details view#60586
alexhemard merged 2 commits intomasterfrom
alexhemard/user-details

Conversation

@alexhemard
Copy link
Copy Markdown
Contributor

@alexhemard alexhemard commented Oct 24, 2025

Description

Issue: #60398
e PR: https://github.com/gravitational/teleport.e/pull/7469

Adds a User Details view to the Users page.

Clicking on a user will show the user details side panel

Screenshot 2025-11-07 at 1 29 48 PM

Includes

  • storybooks
  • deep linking for Users view
  • added Total Count in ListUsersAccessListResponse proto

changelog: Added User Details view to Web UI

@alexhemard alexhemard changed the title feat: Added User Details view feat: [Web UI] Added User Details view Oct 26, 2025
@alexhemard alexhemard changed the title feat: [Web UI] Added User Details view feat(Web UI): Added User Details view Oct 26, 2025
@alexhemard alexhemard force-pushed the alexhemard/user-access-lists branch 4 times, most recently from 1d6ac25 to 6a3a12c Compare October 29, 2025 15:52
Base automatically changed from alexhemard/user-access-lists to master October 29, 2025 21:25
@alexhemard alexhemard force-pushed the alexhemard/user-details branch 13 times, most recently from ef88c8b to 7446085 Compare November 7, 2025 19:21
@alexhemard alexhemard changed the title feat(Web UI): Added User Details view feat(Web UI): add User Details view Nov 7, 2025
@alexhemard alexhemard marked this pull request as ready for review November 7, 2025 19:51
@github-actions github-actions bot requested review from bl-nero and kimlisa November 7, 2025 19:51
@alexhemard alexhemard force-pushed the alexhemard/user-details branch 2 times, most recently from 8b73fc6 to 70ddd69 Compare November 11, 2025 16:34
@alexhemard alexhemard force-pushed the alexhemard/user-details branch 6 times, most recently from a645963 to b52b29a Compare November 14, 2025 14:42
@alexhemard alexhemard force-pushed the alexhemard/user-details branch 3 times, most recently from 45844a0 to 1c4eb58 Compare November 17, 2025 14:58
@alexhemard alexhemard force-pushed the alexhemard/user-details branch 2 times, most recently from fc2750f to df611f1 Compare November 19, 2025 19:50
@alexhemard alexhemard force-pushed the alexhemard/user-details branch from df611f1 to 668cc5d Compare November 19, 2025 21:57
Comment on lines +124 to +128
// this effect will open the user details panel if the selected user is found
// in the pagination results, otherwise it will close the panel and clear the
// user URL param
useEffect(() => {
if (params.user && user) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

By adding the selected item to the URL, I'm assuming you're enabling deeplinking/bookmarking - otherwise you'd have just used react state.

When deeplinking, the selected item might not be in the first page and will be treated like it doesn't exist. Plus, this isn't obvious to the user went it happens.

It would be better to have the side panel fetch the user itself. That way it's self-sufficient and doesn't rely on the item being in the list.

I think it's ok to show an item's detail without it necessarily also being visible in the list. That said, if you added the next page param to the URL, then the selected item is likely (bot not guaranteed) to be on the list.

Comment on lines +131 to +132
const onEdit =
usersAcl.edit && !botOrExternal ? () => onStartEdit(user) : undefined;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The edit dialog in web/packages/teleport/src/Bots/Edit/EditDialog.tsx can be easily reused to allow editing a bot. It fetches it's own data.

Comment on lines +136 to +144
<UserDetailsTitle
user={selectedUser}
onEdit={() => onStartEdit(selectedUser)}
onReset={() => onStartReset(selectedUser)}
onDelete={() => onStartDelete(selectedUser)}
canEdit={usersAcl.edit}
canDelete={usersAcl.remove}
panelWidth={detailsPanelWidth}
/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In addition to the lock status, it feels like a missed opportunity not to allow locking and unlocking for users (and bots).

You can use the bot details page (web/packages/teleport/src/Bots/Details/BotDetails.tsx) as a reference implementation.

);
}

function renderAuthType(user: User): AuthTypeInfo {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It was a bit confusing to find a "render" function that didn't actually render a React node, so consider renaming it. How about toAuthTypeInfo?

Copy link
Copy Markdown
Contributor

@nicholasmarais1158 nicholasmarais1158 left a comment

Choose a reason for hiding this comment

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

Happy to get this in without my suggested additions (bot edit, locks, deeplinking, etc).

Copy link
Copy Markdown
Contributor

@kimlisa kimlisa left a comment

Choose a reason for hiding this comment

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

bot

@alexhemard alexhemard added this pull request to the merge queue Nov 21, 2025
Merged via the queue into master with commit 1f0d291 Nov 21, 2025
45 checks passed
@alexhemard alexhemard deleted the alexhemard/user-details branch November 21, 2025 22:59
alexhemard added a commit that referenced this pull request Nov 24, 2025
* feat: add User Details view

* cleanup
alexhemard added a commit that referenced this pull request Nov 24, 2025
* feat: add User Details view

* cleanup
@zmb3
Copy link
Copy Markdown
Collaborator

zmb3 commented Nov 24, 2025

@alexhemard @r0mant do you think we can call #36592 complete now that this is merged?

(Also don't forget to close #60398)

github-merge-queue bot pushed a commit that referenced this pull request Nov 25, 2025
* feat: add User Details view

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants