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

Function UserIdentityCell

packages/react/src/pages/admin-users.tsx:275–308  ·  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

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