feat(ui-react): add admin sessions list and detail pages#6107
feat(ui-react): add admin sessions list and detail pages#6107luannmoreira wants to merge 1 commit intomasterfrom
Conversation
|
Claude finished @luannmoreira's task in 7m 16s —— View job Code Review CompleteReviewed 7 files across code quality, security, testing, TypeScript/React patterns, and architecture — no issues found. The code looks good as-is. The implementation is well-structured: hooks correctly gate on admin state, error transformation in If you push additional changes and want a new review, tag |
98697c8 to
52a9f92
Compare
|
/review |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
- Add AdminSessions page with table, pagination, auth indicators, and per-row navigation to session detail - Add AdminSessionDetails page - Add useAdminSessionsList and useAdminSessionDetail hooks; transform SdkHttpError to a human-readable Error before surfacing to the UI - Register /admin/sessions and /admin/sessions/:uid routes in App.tsx - Add unit tests for the hook (error transformation, disabled state, success mapping) and the page (loading, empty, error, row rendering, navigation, auth indicators)
52a9f92 to
d8aa6ed
Compare
|
/review |
|
Claude finished @gustavosbarreto's task in 7m 18s —— View job Code Review CompleteReviewed 7 files across code quality, security, testing, TypeScript/React patterns, and architecture — no issues found. The code looks good as-is. The implementation follows established patterns well: hooks correctly gate on admin state, error transformation in If you've addressed the feedback and want a new review, tag |
What
Adds paginated admin sessions list and per-session detail pages to the
React console, accessible at
/admin/sessionsand/admin/sessions/:uid.Why
The admin console lacked visibility into sessions across all namespaces.
The Vue admin already exposed this data; this brings parity to the React
console.
Changes
pages/admin/Sessions: table with active indicator, auth shield,device chip, IP, and timestamps; clicking a row navigates to the
detail page; error banner uses
role="alert"for accessibilitypages/admin/SessionDetails: per-session detail viewhooks/useAdminSessionsList: React Query hook wrappinggetSessionsAdmin; transformsSdkHttpError(which carriesstatus/headersbut nomessage) into a human-readableErrorbefore surfacing it — without this,
error.messagewasundefinedat runtime despite TypeScript typing it as
Error | nullhooks/useAdminSessionDetail: hook for the detail pageApp.tsx: registers the two new routes inside the admin guardTesting
27 new unit tests covering the hook (disabled when non-admin, success
mapping, all error-transformation branches) and the page (loading,
empty, error banner, row rendering, navigation, auth indicators, device
fallback, pagination).