Skip to content

feat(mobile): improve authentication flow, About Me experience, and shared UI architecture - #10

Merged
HasithaErandika merged 13 commits into
mainfrom
development
Jul 16, 2026
Merged

feat(mobile): improve authentication flow, About Me experience, and shared UI architecture#10
HasithaErandika merged 13 commits into
mainfrom
development

Conversation

@HasithaErandika

Copy link
Copy Markdown
Collaborator

Description

This PR delivers a broad set of improvements across the mobile application, focusing on authentication, user experience, reusable UI components, and maintainability. It also introduces the new About Me Questionnaire flow and refines several roadmap and dashboard screens.

Highlights

  • Centralized API communication by migrating screens to the shared apiFetch client.
  • Added global session expiration handling with automatic navigation to the Login screen.
  • Reworked the authentication flow:
    • Replaced the password reset modal with dedicated Forgot Password and Reset OTP screens.
    • Added email validation and password strength checking.
    • Improved keyboard handling and screen layouts for Login, Signup, and OTP screens.
  • Introduced reusable UI infrastructure:
    • Shared ScreenHeader component.
    • Centralized color tokens and shared shadow styles.
    • Improved bottom navigation styling and consistency.
  • Added the new About Me Questionnaire and About Me View screens with a multi-step questionnaire and introductory experience.
  • Improved Dashboard, Journey, Calendar, Weekly Whispers, Thrive Tracker, and roadmap screens with layout refinements, safe-area support, navigation improvements, and performance optimizations.
  • Updated dashboard illustrations for experimental participants and refined visual presentation.
  • Added confirmation dialogs before exiting in-progress questionnaire/task flows.
  • Added backend pre-production testing documentation and checklist.

These changes improve code maintainability, create a more consistent user experience, strengthen authentication and session management, and prepare the application for production deployment.


Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring / Code Hygiene (improving structure, reducing duplication)
  • Documentation update (README, features, API definitions)

## Verification and Testing

Environment

  • Android Emulator
  • Physical Android Device

Verification Steps

  1. Verified login, signup, OTP verification, forgot password, and password reset flows.
  2. Confirmed automatic session expiration redirects users to the Login screen.
  3. Validated API requests using the centralized apiFetch client.
  4. Tested the About Me Questionnaire creation flow and About Me View screen.
  5. Verified Journey, Dashboard, Calendar, Weekly Whispers, Thrive Tracker, and roadmap navigation flows.
  6. Confirmed safe-area handling, keyboard behavior, and updated screen layouts across supported devices.
  7. Verified dashboard illustrations and navigation improvements for both participant groups.
  8. Ran TypeScript compilation and existing test suites successfully.

Test Output

npx tsc --noEmit
✓ No TypeScript errors

npm test
✓ All tests passed

Checklist

  • My code follows the code style and guidelines of this project.
  • I have run npx tsc --noEmit in all modified workspace directories (mobile, backend, web-admin) and resolved any compile errors.
  • My changes do not introduce any compilation warnings or lint errors.
  • I have updated the relevant documentation files if applicable.
  • The PR is targeted against the active development branch (e.g., release/v2.0 or main).
  • No sensitive environment variables (.env files) or credentials have been committed.

…cStorage token retrieval with apiFetch; update navigation labels and improve question navigation logic; implement server-side filtering for admin dashboard data export and table pagination.
- Added session expiration handling in AppNavigator to redirect to Login screen on session expiry.
- Refactored API calls in SplashScreen to use apiFetch for better token management.
- Enhanced LoginScreen with improved keyboard handling and UI adjustments.
- Updated OtpVerificationScreen to include fixed header and keyboard handling.
- Refactored SignupScreen to improve user experience with fixed header and keyboard handling.
- Removed redundant components and optimized imports across screens.
Journey, Calendar, and Profile shared a near-identical hand-rolled
header block and duplicated card-shadow recipes (with copy-paste
drift in opacity/radius). Introduces:

- constants/colors.ts: additive semantic tokens (textMuted, iconMuted,
  surfaceMuted, borderLight, primaryTint) so screens stop hardcoding
  the same hex values.
- styles/shared.ts: cardShadow / cardShadowElevated, replacing the
  drifted shadow recipes with two deliberate variants.
- components/ScreenHeader.tsx: one component for both the tab-screen
  header and the pushed-screen back-button header, dropping the
  colored accent dot per feedback.

Also removes the LeavesDecoration background from Journey, Calendar,
and Profile (per feedback) and rounds the bottom tab bar's top
corners.
The 11-field research profile form previously opened immediately on
navigation. Adds an intro/form split (matching the roadmap screens'
own intro -> questionnaire convention, e.g. MindfulMirrorScreen):

- New 'intro' step shows the SignupIllustration above a rounded blue
  panel (same #E3F2FD tone, caps title/subtitle, and PanelWave as
  SignupScreen's own panel) explaining why the profile is requested,
  with a "Fill Form" CTA that reveals the existing form.
- Header switched to ScreenHeader's back-button variant, restyled to
  match the roadmap screens' floating white circular back button
  instead of the previous bordered/centered treatment.
- Read-only view (already-completed profiles) is unchanged.
Maps the full stress/spike/soak/concurrency/security/DB checklist
against this codebase: what's already covered (helmet, rate limits,
Zod validation, RLS/service-role isolation), what this pass added
(compression, body-parser error-status fix, security/rate-limit
tests, load-test scripts), and what remains manual/ops (composite
DB indexes, backups, NODE_ENV, clustering).
…lustration

Replaces the hand-drawn lotus SVG shown to .ex participants in
BreathingIllustration with the provided egGroup.png asset. The
control-group (.cg) mountain illustration is unchanged.
…ation

The animated background circles were designed around the old lotus
SVG's shape; they don't suit the egGroup.png replacement. Scoped the
pulse rings to the control-group (.cg) mountain illustration only, so
the experimental-group illustration renders as just the plain image.
…hance DashboardScreen with logo block and improve chart rendering; optimize JourneyScreen for better chart data handling; adjust keyboard handling in auth screens; streamline roadmap screens by simplifying navigation on task completion.
- Implemented AboutMeQuestionnaire screen for user profile data collection with a 3-step wizard interface.
- Added AboutMeView screen to display the completed profile summary.
- Created shared types and constants for managing About Me data.
- Updated navigation types to include new screens.
…yout and functionality

- Updated ThriveTrackerScreen to utilize useSafeAreaInsets for better handling of device notches and safe areas.
- Enhanced layout of success and intro screens with additional padding and new PanelWave component for visual appeal.
- Improved styles for buttons, panels, and text elements for consistency and better user experience.
- Refactored WeeklyWhispersScreen to incorporate safe area handling and updated layout for recording instructions.
- Added new visual elements and adjusted styles for better readability and interaction feedback.
- Updated JourneyScreen tests to mock safe area context and reset API fetch mock before each test.
- Refactored LoginScreen to include password reset functionality and ensure session persistence with setSession.
- Modified OtpVerificationScreen to use setSession for token management.
- Improved BottomNav component with decorative wave background and enhanced tab button styles.
- Updated DashboardPage to handle loading states and errors, added scroll-based animations, and refined journey step interactions.
- Removed PasswordResetModal from LoginScreen and replaced it with navigation to ForgotPassword.
- Added ResetOtpScreen for handling OTP verification and new password setting during password reset.
- Integrated email validation and password strength checking in SignupScreen.
- Enhanced user experience by confirming exit on back navigation in various roadmap screens.
- Updated navigation types to include new routes for password reset functionality.
- Improved error handling and notifications across screens.
Comment thread web-admin/src/lib/adminData.ts Fixed
…caping or encoding'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@HasithaErandika
HasithaErandika merged commit c89691c into main Jul 16, 2026
10 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.

2 participants