2.9 KiB
2.9 KiB
TASK METADATA
- Target Files:
ui/components/AdminUsersPage.tsx,ui/components/AdminUserDetailsPage.tsx,ui/components/AdminAppsPage.tsx,ui/components/AdminInvitesPage.tsx,ui/components/AdminRolesPage.tsx,ui/components/AuditLogPage.tsx - Core Objective: Adapt admin management screens (Users, Invites, Apps, Roles, Audit Logs) into responsive mobile card lists with horizontal sub-navigation and quick search filters.
- Dependencies:
tasks/new/2026-0824.04.gem.feat.ui-shell.design-tokens-and-adaptive-nav-2215.md - Additional Important Notes: Must preserve high-density table views on wide screens while providing seamless mobile card layouts for system administrators on mobile devices.
1. TASK METADATA
The header block specifies target admin templates, core objective, dependencies, and constraints.
2. Architectural Considerations & Risks
Risks
- Audit Log Volume on Mobile: Large audit log event streams can degrade
mobile rendering performance if loaded all at once.
- Mitigation: Implement pagination / limit query rendering to recent events with an expandable JSON detail drawer for raw event metadata.
- Admin Action Mis-triggers: Role modifications or user deletions on mobile
touchscreens need clear danger boundaries.
- Mitigation: Use color-coded danger buttons (
btn-danger) with confirmation prompts on high-impact administrative actions.
- Mitigation: Use color-coded danger buttons (
Alternatives
- Separate Mobile Admin App vs Adaptive SSR Views: Building a separate
mobile admin view duplicates route handlers. Using adaptive CSS
@media (max-width: 768px)card transformations preserves a single unified codebase in pure Hono SSR JSX.
3. Proposed Implementation
Phase 1: Mobile User & Invite Management
- In
ui/components/AdminUsersPage.tsxandui/components/AdminUserDetailsPage.tsx:- Render user cards on mobile with avatar initials, username, creation date, role grant badges, and 1-tap action buttons (Edit Roles, Revoke).
- Add responsive top search filter input.
- In
ui/components/AdminInvitesPage.tsx:- Render active invite codes as copy-ready cards with 1-tap clipboard action and expiration countdown badges.
Phase 2: App Registry & Role Grants
- In
ui/components/AdminAppsPage.tsxandui/components/AdminRolesPage.tsx:- Transform apps list into responsive cards showing domain, bypass paths, SPIFFE ID, and assigned user roles.
Phase 3: Audit Log Event Feed
- In
ui/components/AuditLogPage.tsx:- Implement responsive timeline card feed with color-coded event chips
(
login_successin green,login_failedin red,grant_revokedin amber). - Add expandable JSON detail viewer for raw event payloads.
- Implement responsive timeline card feed with color-coded event chips
(
Phase 4: Verification & Quality Gates
- Run
deno fmt ui/**/*.tsx. - Run
deno task lintanddeno task check. - Run
deno task testto ensure all admin routes and SSR components pass cleanly.