authsome
authsome copied to clipboard
feat(ui): agent detail view with owner, activity, and claim status
Summary
The Agents page currently lists local Ed25519 identities as a flat, non-interactive table. Each row shows only the agent handle (and an Active badge on the dashboard home). Users cannot drill into an agent to understand what it does, who owns it, or what it has been doing.
Current behavior
/agentsrendersAgentsViewwith a single-column table of handles (ui/src/components/dashboard/overview-views.tsx).- Dashboard data exposes
agents: { handle, isActive }[]only (ui/src/lib/authsome-api.ts). /api/identitiesreturnshandle+claim_statusper identity, but the UI does not surface claim status, DID, principal, or audit history.- Unlike providers (
/providers/[name]) and connections (/connections/[provider]/[name]), there is no agent detail route or click-through.
Proposed behavior
Make each agent row clickable and add an agent detail view (new route, e.g. /agents/[handle]) that surfaces:
- Identity metadata — handle,
did:keyDID, claim status (pending/accepted/rejected), registration date if available. - Owner / principal — which Principal the agent is claimed to, and whether it is the active agent for the current session.
- Purpose / context — short description of what an agent is in Authsome (cryptographic signing identity, not a credential namespace) plus any per-agent metadata we already store or can derive.
- Audit activity — recent audit events scoped to this agent/identity (login, token refresh, credential access, etc.), with a link to the full audit log filtered by agent if feasible.
- Actions (if appropriate for the viewer's role) — e.g. view claim status, revoke/deactivate patterns consistent with existing admin flows.
Follow existing dashboard patterns: connection-detail-view.tsx, provider-detail-view.tsx, SectionHeader, PageEmptyState, SWR data fetching.
Implementation notes
- Likely needs a new API endpoint (or extension of
/api/identities/{handle}) returning detail fields the UI needs, plus audit events filtered by identity handle. IdentityClaimRegistryandIdentityRegistryalready hold claim/principal mapping server-side (src/authsome/server/store/repositories.py).- Audit log may need an
identityfilter parameter if one does not exist yet. - Keep the list page lightweight; load detail data on the detail route.
Acceptance criteria
- [ ] Agent rows on
/agents(and optionally the dashboard Agents section) are clickable and navigate to a detail page. - [ ] Detail page shows handle, DID, claim status, owning principal, and whether the agent is active.
- [ ] Detail page shows recent audit activity for that agent (or a clear empty state).
- [ ] Non-existent or unauthorized agent handles show the standard not-found / error state.
- [ ] UI matches existing dashboard visual patterns and is accessible (keyboard-navigable rows, proper headings).
References
ui/src/app/(authenticated)/agents/page.tsxui/src/components/dashboard/overview-views.tsx(AgentsView)src/authsome/server/routes/identities.pyCONTEXT.md— Identity vs Principal vs Vault model