project-pegaprox icon indicating copy to clipboard operation
project-pegaprox copied to clipboard

[Bug] [Bug] User Management table: auth-source badge wraps into the Tenant column and the avatar collapses on long usernames

Open kglowinska opened this issue 2 months ago • 3 comments

Describe the bug

In Settings → User Management the Users table breaks its own columns on realistic data — long usernames plus a custom role name.

Two separate layout problems:

1. The auth-source badge wraps and spills toward the Tenant column. In the ROLE cell the role badge and the auth-source badge are plain inline siblings with no flex container, no gap and no whitespace-nowrap on the badges (web/src/settings_modal.js, around lines 2950-2970):

<span className={`px-2 py-1 rounded text-xs font-medium ${...}`}>{...role...}</span>
{user.auth_source === 'entra' && (
    <span className="px-1.5 py-0.5 rounded text-xs bg-cyan-500/10 ...">Entra ID</span>
)}

With a custom role name such as labtenantoperator the pair no longer fits the column, so "Entra ID" breaks across two lines ("Entra" / "ID") and reads as if it belonged to the neighbouring TENANT value.

2. The avatar collapses. In the USERNAME cell the avatar is a flex child without flex-shrink-0 (web/src/settings_modal.js, around line 2896):

<div className="flex items-center gap-2">
    <UserAvatar user={user} sizeClass="w-8 h-8" textClass="text-sm" />

On long usernames it is squeezed to a thin sliver, and where initials are rendered they overlap the username text. Rows with short usernames look fine, which is why it shows up unevenly across the table.

Both are cosmetic, but the first one makes the table genuinely hard to read — it looks as if roles and tenants were mixed up between rows.

Steps to Reproduce

  1. Create a custom role with a longish id, e.g. labtenantoperator.
  2. Have several users whose usernames are full email addresses, authenticating via Entra ID, assigned that role and a tenant.
  3. Open Settings → User Management.
  4. The "Entra ID" badge wraps and drifts toward the TENANT column, and the avatars in rows with long usernames are compressed or overlap the username.

Expected behavior

Badges stay inside their own cell and do not wrap mid-word; the avatar keeps its size regardless of username length.

Suggested fix, both mechanical: wrap the two badges in a flex flex-wrap items-center gap-1 container and add whitespace-nowrap to each badge; add flex-shrink-0 to the avatar.

Environment

  • PegaProx Version: 1.1.1
  • Installation Method: Docker (Docker Swarm)
  • OS: Debian 12
  • Browser: Chrome 151 (both)
  • Behind Reverse Proxy? nginx-proxy
  • UI? Corporate

Logs

Not applicable — pure layout issue, nothing is logged.

Screenshots

Image

Checklist

  • [x] I have searched existing issues to make sure this is not a duplicate
  • [x] I am using the latest version of PegaProx

kglowinska avatar Sep 08 '26 13:09 kglowinska

Both confirmed, you even got the line numbers right. The role badge and the auth-source one are plain inline siblings with nothing holding them together, and the avatar is a flex child with no shrink-0 so it gets squeezed once the username eats the row.

Small CSS on both counts, taking it. The "Entra" / "ID" split reading as a tenant value is the annoying part — agreed that one is worse than it looks.

https://opencollective.com/pegaprox if you want to support the project.

Marcus

mkellermann97 avatar Sep 08 '26 13:09 mkellermann97

Both fixed on Testing, and your diagnosis was spot on for both.

Badges share a wrapping flex container now with whitespace-nowrap on each, so "Entra ID" can drop to its own line but never breaks mid-word into the tenant column. The avatar got flex-shrink-0 — I put it on the UserAvatar component rather than that one call site, since a fixed circle is what an avatar is everywhere, not just in that table.

Won't be in 1.1.1, comes with the next release. Thanks for the screenshot, the custom-role-id detail is what made it reproducible.

— MK (https://opencollective.com/pegaprox, should you feel generous)

mkellermann97 avatar Sep 11 '26 13:09 mkellermann97

Out with 1.2.0 as well — the auth-source badge stays in its own column now.

Marcus

mkellermann97 avatar Sep 21 '26 07:09 mkellermann97