Phase 5: Dashboard completion — auth, types, all pages#26
Merged
nullEFFORT merged 3 commits intomainfrom Mar 5, 2026
Merged
Conversation
- Rewrite types.ts to match backend schemas (Closes #19) - Fix all enum values (SessionStatus, AlertSeverity, GroomingStage, etc.) - Fix all interface fields to match backend *Out schemas - Remove paginated wrapper types (backend returns raw arrays) - Add auth types (OperatorOut, TokenResponse, etc.) - Fix existing hooks and pages for backend compatibility (Closes #20) - hooks.ts: raw arrays, POST for confirm/dismiss, confirmed_by param - DashboardPage: total_subjects, remove trend data - SessionsPage: remove paginated .items, compute duration - SubjectsPage: cumulative_risk_score, sessions_flagged - AlertsPage: low/medium severity values - AlertCard: trigger_detail display, confirmed_by from auth - SubjectCard: updated grooming stage labels - Auth UI foundation (Closes #21) - client.ts: token injection, 401 refresh, upload method - AuthContext + useAuth hook with sessionStorage tokens - ProtectedRoute with loading state - LoginPage with error handling - App.tsx route restructure with protected routes - Layout footer with operator name + logout - main.tsx AuthProvider wrapping Co-Authored-By: Claude <noreply@anthropic.com>
SessionDetailPage (#22): - Tabbed view: Chat, Voice, Evidence, Subjects - Chat feed with risk highlighting (red tint + AlertTriangle) - Voice transcript feed with speaker labels - Evidence table with download links - Session subjects list with risk badges - New hooks-session.ts: useSessionSubjects SubjectDetailPage (#23): - Profile header with grooming stage pill and risk badge - Stats row: sessions flagged, dates, account age, friends - Timeline panel (60%): chronological chat/voice events - Identities panel (40%): linked platform identities - New hooks-subject.ts: useSubjectIdentities, useSubjectTimeline EvidencePage (#24): - Evidence table with file type filtering - Verify integrity inline (ShieldCheck/ShieldAlert result) - Upload modal with session_id, file_type, file picker - Download links per file ReportsPage (#25): - Report list with status filter tabs - Status badges (draft/submitted/accepted/rejected) - Submit action for draft reports - Create modal with session_id, subject_id, incident_type - Auto-fills submitted_by from auth context New hooks-evidence-reports.ts: useVerifyEvidence, useUploadEvidence, useCreateReport, useSubmitReport Re-export all domain hooks from hooks.ts. Closes #22, #23, #24, #25 Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
nullEFFORT
added a commit
that referenced
this pull request
Mar 7, 2026
Phase 5: Dashboard completion — auth, types, all pages
nullEFFORT
added a commit
that referenced
this pull request
Mar 7, 2026
Phase 5: Dashboard completion — auth, types, all pages
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.
Summary
Complete dashboard implementation for Phase 5:
types.tsto match all backend schemas (enums, interfaces, response shapes)Architecture
client.tswith automatic 401 → refresh → retryhooks-session.ts,hooks-subject.ts,hooks-evidence-reports.tshooks.tsfor convenienceFiles Changed
src/api/types.ts— Full rewritesrc/api/hooks.ts— Fix types + re-exportssrc/api/client.ts— Auth + uploadsrc/auth/— AuthContext, useAuth, ProtectedRoute (new)src/pages/LoginPage.tsx(new)src/pages/DashboardPage.tsx,SessionsPage.tsx,SubjectsPage.tsx,AlertsPage.tsx— Field fixessrc/pages/SessionDetailPage.tsx,SubjectDetailPage.tsx,EvidencePage.tsx,ReportsPage.tsx— Full implementationssrc/components/AlertCard.tsx,SubjectCard.tsx,Layout.tsx— Updatedsrc/App.tsx,src/main.tsx— Route + provider restructuresrc/api/hooks-session.ts,hooks-subject.ts,hooks-evidence-reports.ts(new)Closes #19, #20, #21, #22, #23, #24, #25
Test plan
/loginnpx tsc --noEmitpassesnpm run buildsucceeds🤖 Generated with Claude Code