-
Notifications
You must be signed in to change notification settings - Fork 590
Open
Description
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)
- External ID (plain text, truncate if >50 chars with
- 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.queryfor list data - Use
shortenId()helper from@/lib/shorten-idfor identity ID display
Metadata
Metadata
Assignees
Labels
No labels