Skip to content

Identity List View with Basic Actions #4457

@linear

Description

@linear

Create a flat table view for identities matching the API keys pattern, with the ability to view details and create new identities with metadata (preserving existing functionality).

Acceptance Criteria

List View & Table

  •  Flat table view with columns:
    • External ID (plain text, truncate if >50 chars with ...)
    • Identity ID (truncated using shortenId() helper)
    • Number of keys associated
    • Number of ratelimits
    • Created date
    • Last used timestamp (from ClickHouse analytics if available)
  •  Hover over truncated identity ID shows full ID in tooltip
  •  Search/filter bar for external ID search
  •  Cursor-based pagination (50 items per page)
  •  Empty state when no identities exist with "Create Identity" CTA
  •  Loading skeleton states during data fetch
  •  Responsive design matching dashboard patterns
  •  Hover states on table rows
  •  Click on row navigates to identity detail page

Context Menu

  •  Context menu (3-dot) on each row with:
    • Copy identity ID (with toast notification)
    • Copy external ID (with toast notification)

Create Identity (Existing Functionality)

  •  "Create Identity" button in page header
  •  Dialog/form opens with fields:
    • External ID (text input, required, 3-255 characters)
    • Metadata (JSON editor, optional, <1MB)
  •  External ID validation:
    • Cannot be only whitespace
    • Shows error if duplicate exists
  •  Metadata validation:
    • Valid JSON syntax
    • Size limit validation
  •  Success toast: "Identity created successfully"
  •  Table updates optimistically with new identity
  •  Error handling for duplicate external IDs (409 conflict)
  •  Cancel button closes dialog without creating

Technical Notes

  • Reuse existing create identity logic from trpc.identity.create
  • Table components from apps/dashboard/app/(app)/[workspaceSlug]/apis/[apiId]/keys/[keyAuthId]/_components/components/table/
  • Use trpc.identity.query for list data
  • Use shortenId() helper from @/lib/shorten-id for identity ID display

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions