MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / UserIdentityCell

Function UserIdentityCell

packages/react/src/pages/admin-users.tsx:277–310  ·  view source on GitHub ↗

* The user cell: who this is, then the opaque id underneath. * * The host joins email/name onto each row server-side, so the headline is * something an operator recognizes and the `externalId` becomes the supporting * line — still mono, still carrying the full value in its title, still under the

(props: { readonly user: AdminUserIdentityRow })

Source from the content-addressed store, hash-verified

275 * click away in the sheet header, on the same values.
276 */
277function UserIdentityCell(props: { readonly user: AdminUserIdentityRow }) {
278 const title = adminUserTitle(props.user);
279
280 if (title.primaryIsId) {
281 return (
282 <span
283 data-slot="admin-user-id"
284 className="min-w-0 truncate font-mono text-sm text-foreground"
285 title={props.user.externalId}
286 >
287 {shortenExternalId(title.primary)}
288 </span>
289 );
290 }
291
292 return (
293 <span className="flex min-w-0 flex-col gap-0.5">
294 <span
295 data-slot="admin-user-name"
296 className="truncate text-sm text-foreground"
297 title={title.primary}
298 >
299 {title.primary}
300 </span>
301 <span
302 data-slot="admin-user-id"
303 className="truncate font-mono text-[11px] text-muted-foreground"
304 title={props.user.externalId}
305 >
306 {shortenExternalId(props.user.externalId)}
307 </span>
308 </span>
309 );
310}
311
312/**
313 * The sheet header: the same title treatment as the row, plus the copy

Callers

nothing calls this directly

Calls 2

adminUserTitleFunction · 0.90
shortenExternalIdFunction · 0.90

Tested by

no test coverage detected