feat(ui-react): add admin sessions list and detail pages#6107
Open
luannmoreira wants to merge 1 commit intomasterfrom
Open
feat(ui-react): add admin sessions list and detail pages#6107luannmoreira wants to merge 1 commit intomasterfrom
luannmoreira 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 |
- 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)
98697c8 to
52a9f92
Compare
Member
|
/review |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).