Skip to content

Fix admin panel loading loop; add DOB capture and profile age visibility - #239

Merged
ehsanking merged 1 commit into
mainfrom
ehsan/fix-system-management-page-loading-issue
Apr 16, 2026
Merged

ehsanking merged 1 commit into
mainfrom
ehsan/fix-system-management-page-loading-issue

Conversation

@ehsanking

Copy link
Copy Markdown
Owner

Motivation

  • The System Management (admin) panel could remain stuck on a loading spinner when one of the backend admin endpoints was slow or hung, blocking the whole view.
  • The product requires collecting a user birth date at signup and letting users opt-in to show/hide their age publicly while preserving privacy of raw DOB.

Description

  • Prevent admin loading stall by wrapping each admin data request in ChatDashboardClient with a bounded withTimeout helper so a single slow request returns null instead of blocking the entire Promise.all aggregation.
  • Add day/month/year birth-date inputs to the v2 registration UI (components/auth/RegisterPageClient.tsx), validate client-side, and send birthDay/birthMonth/birthYear in the v2 registration payload via lib/e2ee-register-runtime.ts and app/api/e2ee/register/route.ts.
  • Validate and persist birth date server-side in registerUser (strict calendar validation and allowed range), add birthDate and showAge fields to Prisma schemas (prisma/schema.prisma and prisma/schema.sqlite.prisma) and include a migration SQL (prisma/migrations/20260414_add_user_birthdate_and_age_visibility/migration.sql).
  • Add showAge preference to profile saving flow and UI (app/chat/profile/page.tsx and app/actions/profile.actions.ts) and expose a computed age only on public profile responses when showAge is enabled (raw birthDate is not exposed in public profile output).

Testing

  • Ran npm run lint with no errors (passed).
  • Ran npm run build and a full Next.js production build completed successfully (static pages generated and build finished).
  • Note: migration SQL was added and Prisma client was regenerated as part of the build; run prisma migrate or prisma db push in your environment to apply DB changes before running the app.

Codex Task

@ehsanking
ehsanking merged commit c32bc24 into main Apr 16, 2026
8 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant