Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(access-control): stop the role column from shrinking in the roles table (#114470)

Alex Lider87cedb5a71a4
diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/AccessControlTable.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/AccessControlTable.tsx
index 95648f0ae6e7..677bc29bdf29 100644
--- a/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/AccessControlTable.tsx
+++ b/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/AccessControlTable.tsx
@@ -2,7 +2,7 @@ import clsx from 'clsx'
import { capitalizeFirstLetter } from 'kea-forms'
import { IconPencil } from '@posthog/icons'
-import { LemonButton, LemonTable, LemonTableColumns, LemonTag, ProfilePicture } from '@posthog/lemon-ui'
+import { LemonButton, LemonTable, LemonTableColumns, LemonTag, ProfilePicture, Tooltip } from '@posthog/lemon-ui'
import { pluralizeResource } from 'lib/utils/accessControlUtils'
import { fullName } from 'lib/utils/strings'
@@ -22,7 +22,15 @@ function getScopeColumnsForTab(activeTab: AccessControlsTab): LemonTableColumns<
title: 'Role',
key: 'role',
render: function RenderRole(_: any, entry: AccessControlSettingsEntry) {
- return <span>{isRoleEntry(entry) ? entry.role_name : ''}</span>
+ if (!isRoleEntry(entry)) {
+ return null
+ }
+ // Access takes all free width, so a wrapping name shrinks this column to one word
+ return (
+ <Tooltip title={entry.role_name}>
+ <span className="block max-w-60 truncate font-medium">{entry.role_name}</span>
+ </Tooltip>
+ )
},
},
]