Skip to content

Add Comprehensive Loading, Error, and Empty States to All Frontend Pages#210

Merged
Penielka merged 4 commits into
AetherEdu:mainfrom
veemakama:main
Jun 29, 2026
Merged

Add Comprehensive Loading, Error, and Empty States to All Frontend Pages#210
Penielka merged 4 commits into
AetherEdu:mainfrom
veemakama:main

Conversation

@veemakama

Copy link
Copy Markdown
Contributor

Description

Please include a summary of the changes and which issue is fixed. Please also include relevant motivation and context.

Fixes #31

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update

Checklist:

- LoadingFallback: add Skeleton, SkeletonCard, SkeletonProfile, SkeletonList,
  SkeletonText, EmptyState, ErrorDisplay reusable components
- ErrorBoundary: use ErrorDisplay with collapsible details and retry
- ProfileHeader: add loading prop rendering SkeletonProfile skeleton
- CourseGrid: SkeletonCard loading, ErrorDisplay errors, EmptyState for empty results
- CredentialList: EmptyState with Add Credential CTA in compact and full views
- AchievementDisplay: EmptyState with clear-filters CTA in compact and full views
- ProgressChart/CompletionStats/TimeAnalysis: replace inline pulse skeletons
  with Skeleton, ErrorDisplay (retry), EmptyState
- demo/page.tsx: error banner, loading skeleton, ErrorBoundary wrapper
- campus/page.tsx: WebGL detection for unsupported state, skeleton via dynamic
  import, ErrorDisplay for runtime errors
- profile/page.tsx: replace inline Loader2/RefreshCw with SkeletonProfile,
  ErrorDisplay, EmptyState
- Sanitization middleware :

- Strips/encodes script tags, HTML entities, and SQL/NoSQL patterns in backend/src/middleware/sanitizer.ts
- Added MAX_STRING_LENGTH enforcement and proper trimming of all string inputs
- Database queries :

- Verified services like userService.ts , EnrollmentService.ts have no raw string concatenation
- All database access follows safe patterns
- File uploads :

- backend/src/middleware/upload.ts already validates MIME types and file extensions for uploads
- All routes protected :

- Sanitization and pattern detection middleware are applied globally in index.ts , covering all routes
- CSP headers :

- Added cspMiddleware and securityHeadersMiddleware in backend/src/middleware/security.ts
- Applied globally in index.ts with other security headers
- Security tests :

- Added security.test.ts with tests for XSS, SQL injection, and NoSQL injection attacks
All requirements have been implemented.
Closes AetherEdu#134
Files Changed
ErrorBoundary.tsx — uses ErrorDisplay with retry + collapsible error details
Profile/ProfileHeader.tsx — loading prop renders SkeletonProfile
Discovery/CourseGrid.tsx — skeleton loading, error with retry, empty state with clear-filters CTA
CredentialList.tsx — EmptyState with "Add Credential" CTA in compact and full views
AchievementDisplay.tsx — EmptyState with "Clear filters" CTA in compact and full views
Analytics/ProgressChart.tsx — skeleton loading, error retry, empty state
Analytics/CompletionStats.tsx — skeleton loading, error retry, empty state
Analytics/TimeAnalysis.tsx — skeleton loading, error retry, empty state
app/demo/page.tsx — error banner, skeleton loading, ErrorBoundary wrapper
app/campus/page.tsx — WebGL detection for unsupported empty state, skeleton via dynamic import, error display
app/profile/page.tsx — SkeletonProfile, ErrorDisplay, EmptyState replace inline states
Definition of Done
 Reusable Skeleton component with variants (text, card, list, profile)
 Reusable EmptyState with icon, message, optional CTA
 Reusable ErrorDisplay with retry and details toggle
 Every listed page shows loading, error, and empty states
 Error states include actionable Try Again buttons
 Empty states include next-step guidance
 Loading skeletons match approximate layout (no layout shift)
 Responsive design maintained across all states
Closed AetherEdu#136
@Penielka Penielka merged commit f2dfbfb into AetherEdu:main Jun 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Comprehensive Loading, Error, and Empty States to All Frontend Pages [Documentation] Add CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md

2 participants