feat: Student Report Card, 404, Forgot Password, Global Search, Session Timeout and Critical Fixes - #63
Open
aishwarya117-code wants to merge 9 commits into
Conversation
- Add ReportCardView: printable student progress report card with FLN levels, assessment history, skill proficiency, certification status, and teacher signatures. Accessible from student profile and sidebar navigation. - Add NotFoundView: 404 page with navigation back to home - Add Forgot Password modal on login page with email reset flow - Wire ReportCardView into PanelViews with report_card panel routing - Add Report Card nav item for Teacher and Volunteer roles in Layout
- CRITICAL: Fix forgot password calling /api/reset which wiped entire database - Fix login demo accounts to use real seeded DB emails - Fix XSS in ReportCardView print HTML via escapeHtml utility - Fix conceptMastery merge with priority-based selection - Clamp progressPct to max 100%, sort reports by timestamp - Fix ReportCardView back button to navigate to student_profile - Fix NotFoundView to use onNavigateHome instead of window.history.back - Wire NotFoundView as fallback for unknown panels in PanelViews - Guard against crash when students array is empty - Add accessibility attributes to forgot password modal - Disable demo login buttons during loading
Author
Bug Fixes Applied (2nd commit)All features have been audited and critical bugs fixed: CRITICAL
Security
Logic Bugs
Navigation
UX/Accessibility
Verified
|
… loading skeleton - Add global student search (/ shortcut) in topbar for quick student lookup - Add ErrorBoundary component wrapping PanelViews for crash protection - Add /api/health endpoint for uptime monitoring - Add ReportCardSkeleton loading placeholder component - Fix unused err variable in LoginView catch block - Add token and onSelectPanel props to Layout for search integration - Update App.tsx with ErrorBoundary wrapper and new Layout props
…issues - Fix pre-existing backend error: add missing levelWorksheets to COLLECTION_NAMES in db.ts - Fix pre-existing backend error: add ts-expect-error for Puppeteer browser-context DOM access in paperGenerator.ts - Remove 14 unused imports across LoginView, PanelViews, Layout, ErrorBoundary - Remove unused search state variable in PanelViews - Fix dead collapsed constant in Layout (was hardcoded false, now uses sidebarCollapsed)
…board - SessionTimeout: 30min idle timeout with 5min warning modal, auto-logout - KeyboardShortcuts: ? key opens shortcuts help modal with all keybinds - SystemHealthPanel: real-time API/server/DB health + live data stats for superadmin - Integrated into App.tsx and PanelViews system_health panel - Backend already had /api/health and /api/stats endpoints
…earch selection Backend: - connectDB() gracefully falls back to file-based DB when MongoDB unavailable - All collection accessors/mutators work without MongoDB (in-memory + JSON file) - /api/stats rewritten to use dbStore methods instead of raw MongoDB queries - persistCollection saves to file when not using MongoDB Frontend: - Wrap handleLogout in useCallback to prevent SessionTimeout re-render loop - SessionTimeout uses ref for onLogout, removed showWarning from deps - StudentSearch now passes selected student ID through to PanelViews - Add selectedStudentId prop to PanelViews for search-driven navigation
Author
PR #63 Progress SummaryBranch: eat/student-report-card-404-forgot-password Features Shipped (8)
Critical Fixes (11 HIGH/CRITICAL)
TypeScript
Remaining
|
…ard-404-forgot-password # Conflicts: # frontend/src/components/LoginView.tsx
Author
|
Merge conflict in LoginView.tsx resolved. What changed: Merged �piClient.ts (base-path-aware fetch from main) with our AbortController timeout. All API calls in LoginView now use �piFetch with 15s/8s timeouts. Status:
|
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 this PR does
8 new features + 22 bug fixes. 0 TypeScript errors. Backend runs without MongoDB.
Features
/api/resetendpoint that wiped the entire database)./shortcut to search students by name, ID, or class. Click navigates to student profile.GET /api/healthfor uptime monitoring.?for shortcuts help. Superadmin gets a real-time health/stats panel.Bug Fixes
/api/resetwhich wiped entire MongoDB/api/statsused raw MongoDB aggregation — crashed without MongoDBVerification
Files (15 files, +1,559 / -120)
New (8): ReportCardView, NotFoundView, StudentSearch, ErrorBoundary, ReportCardSkeleton, SessionTimeout, KeyboardShortcuts, SystemHealthPanel
Modified (7): db.ts (file-based fallback), index.ts (health/stats/404), paperGenerator.ts, App.tsx, LoginView.tsx, PanelViews.tsx, Layout.tsx