diff --git a/docs/REMAINING_FEATURES.md b/docs/REMAINING_FEATURES.md index 7e0ac79..ce52ba7 100644 --- a/docs/REMAINING_FEATURES.md +++ b/docs/REMAINING_FEATURES.md @@ -1,8 +1,9 @@ # Remaining Features - Maternal App **Generated**: October 3, 2025 -**Status**: 66 features remaining out of 128 total (52%) -**Completion**: 62 features completed (48%) +**Status**: 77 features remaining out of 139 total (55%) +**Completion**: 62 features completed (45%) +**Urgent**: 3 critical bugs + 8 new high-priority features This document provides a clear roadmap of all remaining features, organized by priority level. Use this as a tracking document for ongoing development. @@ -11,14 +12,16 @@ This document provides a clear roadmap of all remaining features, organized by p ## 📊 Summary ### Feature Status by Category -- **Backend**: 30 remaining / 54 total (44% complete) -- **Frontend**: 21 remaining / 45 total (53% complete) +- **Bugs**: 3 critical bugs (voice tracking, session management, voice UX) +- **Backend**: 31 remaining / 55 total (44% complete) +- **Frontend**: 28 remaining / 52 total (46% complete) - **Infrastructure**: 8 remaining / 21 total (62% complete) - **Testing**: 13 remaining / 18 total (28% complete) ### Priority Breakdown - **🔴 Critical (Pre-Launch)**: 0 features ✅ ALL COMPLETE! -- **🟠 High Priority**: 8 features +- **🔥 Urgent Bugs**: 3 critical bugs (voice tracking, session management) +- **🟠 High Priority**: 16 features (8 existing + 8 new) - **🟡 Medium Priority**: 18 features - **🟢 Low Priority (Post-MVP)**: 40 features @@ -43,7 +46,313 @@ The following critical features have been successfully implemented: --- -## 🟠 HIGH PRIORITY (8 Features) +## 🔥 URGENT BUGS (3 Critical Issues) + +### Bug Fixes Required Before Launch + +#### BUG-1. Voice Tracking Not Saving Activities 🚨 +**Category**: Voice Features - CRITICAL +**Effort**: 2-3 hours +**Severity**: High - Core feature broken +**Files**: +- `src/modules/voice/voice.service.ts` (investigate) +- `src/modules/tracking/tracking.service.ts` (verify payload) +- Frontend voice components + +**Issue Description**: +Items added via voice command for sleep, feeding, medicine, and activities are NOT being added to the trackers. + +**Investigation Steps**: +- [ ] Check if voice extraction returns correct activity payload +- [ ] Verify required fields match tracking service expectations +- [ ] Check if childId is being passed correctly +- [ ] Verify activity type mapping is correct +- [ ] Check for validation errors in tracking service +- [ ] Add error logging to voice → tracking flow + +**Acceptance Criteria**: +- [ ] Voice commands successfully create sleep activities +- [ ] Voice commands successfully create feeding activities +- [ ] Voice commands successfully create diaper activities +- [ ] Voice commands successfully create medication activities +- [ ] Error messages shown to user if creation fails +- [ ] Activities appear in dashboard immediately after voice command + +--- + +#### BUG-2. Session Persistence After Revocation 🚨 +**Category**: Authentication - CRITICAL +**Effort**: 1-2 hours +**Severity**: High - Security issue +**Files**: +- `maternal-web/lib/auth/AuthContext.tsx` +- `maternal-app-backend/src/modules/auth/auth.service.ts` + +**Issue Description**: +Even after revoking all sessions or removing all devices, user remains logged in on page refresh. + +**Root Cause**: +Likely the frontend is not clearing localStorage/cookies when session is revoked, or the refresh token is still valid. + +**Investigation Steps**: +- [ ] Check if logout endpoint is called on session revocation +- [ ] Verify localStorage.clear() is called on logout +- [ ] Check if refresh token is invalidated on server +- [ ] Verify session revocation broadcasts to all tabs +- [ ] Test cross-tab logout behavior + +**Acceptance Criteria**: +- [ ] Revoking all sessions logs out user immediately +- [ ] Removing all devices logs out user immediately +- [ ] Page refresh after revocation shows login screen +- [ ] No refresh token remains in localStorage +- [ ] All tabs/windows are logged out simultaneously + +--- + +#### BUG-3. Voice Modal Status Not Updating 🚨 +**Category**: Voice Features - HIGH +**Effort**: 1-2 hours +**Severity**: Medium - UX issue +**Files**: +- `components/features/voice/VoiceInputModal.tsx` (or similar) +- `hooks/useVoiceInput.ts` + +**Issue Description**: +Voice command modal only displays "Listening..." status even though backend processes multiple stages (transcription → understanding → extraction → saving). + +**Requirements**: +Show progressive status updates: +1. "Listening..." (while recording) +2. "Understanding your request..." (during transcription) +3. "Adding to [tracker-name]..." (during activity creation) +4. Success/error message +5. Auto-close modal after success (1-2 seconds delay) + +**Investigation Steps**: +- [ ] Check if backend returns status updates via WebSocket or polling +- [ ] Verify frontend listens for status change events +- [ ] Check modal state management for status field + +**Acceptance Criteria**: +- [ ] Modal shows "Listening..." while recording +- [ ] Modal shows "Understanding your request..." during transcription +- [ ] Modal shows "Adding to Sleep tracker..." (or Feeding, Diaper, etc.) +- [ ] Modal shows success message with checkmark +- [ ] Modal auto-closes 2 seconds after success +- [ ] Modal closes immediately on manual stop +- [ ] Modal doesn't stay open too long after user stops speaking + +--- + +## 🟠 HIGH PRIORITY (16 Features) + +### New User-Requested Features (8 features) + +#### 9. User Profile Photo Upload +**Category**: Profile Management +**Effort**: 2 hours +**Files**: +- `app/settings/page.tsx` +- `components/features/settings/ProfilePhotoUpload.tsx` (new) +- Backend: `src/modules/auth/auth.controller.ts` (add upload endpoint) + +**Requirements**: +- Upload profile photo from settings page +- Crop/resize interface (square aspect ratio) +- Photo preview before saving +- Replace existing photo +- Photo displayed in header/navigation + +**Acceptance Criteria**: +- [ ] Photo upload button in settings +- [ ] Image cropper interface +- [ ] Preview before save +- [ ] Photo appears in user menu +- [ ] Photo appears in family member list +- [ ] API endpoint: PATCH /api/v1/auth/profile/photo + +--- + +#### 10. Child Photo Upload Enhancement +**Category**: Child Management +**Effort**: 1.5 hours +**Files**: +- `components/features/children/ChildDialog.tsx` +- `components/features/children/ChildCard.tsx` + +**Requirements**: +- Add photo upload to child creation/edit dialog +- Photo displayed on child card +- Photo in child selector dropdown +- Default avatar if no photo + +**Acceptance Criteria**: +- [ ] Photo upload in child create/edit dialog +- [ ] Photo preview in dialog +- [ ] Photo displayed on child card +- [ ] Photo in child selection dropdown +- [ ] Default avatar fallback + +--- + +#### 11. Mobile View Grid Layout (2 Cards per Row) +**Category**: UI/UX - Mobile +**Effort**: 1 hour +**Files**: +- `components/features/children/ChildrenList.tsx` +- `app/children/page.tsx` +- Potentially other grid layouts + +**Requirements**: +- Display 2 child cards per row on mobile +- Responsive breakpoints (1 card on very small screens) +- Maintain touch target sizes +- Proper spacing between cards + +**Acceptance Criteria**: +- [ ] 2 cards per row on mobile (width >= 360px) +- [ ] 1 card per row on very small screens (< 360px) +- [ ] Cards maintain 44x44px touch targets +- [ ] Proper gap spacing (8-16px) +- [ ] Test on iPhone SE, iPhone 14, Android + +--- + +#### 12. Secondary Color Palette & Accessibility Toggle +**Category**: UI/UX - Theming +**Effort**: 4 hours +**Files**: +- `app/globals.css` (add secondary palette CSS variables) +- `app/settings/page.tsx` (add accessibility toggle) +- Redux: `lib/store/slices/uiSlice.ts` (theme preference) + +**Requirements**: +- Create beautiful secondary color palette (e.g., blues/purples) +- Settings toggle for "Accessibility Mode" vs "Standard Mode" +- Accessibility Mode: High contrast, larger text, reduced animations +- Standard Mode: Current warm palette with animations +- Persist user preference + +**Acceptance Criteria**: +- [ ] Secondary color palette designed (6-8 colors) +- [ ] Settings toggle: "Accessibility Mode" +- [ ] High contrast colors in accessibility mode +- [ ] Larger font sizes in accessibility mode (1.15x base) +- [ ] Reduced/disabled animations in accessibility mode +- [ ] User preference saved to localStorage +- [ ] Theme applied consistently across all pages + +--- + +#### 13. Legal Pages & User Menu +**Category**: Compliance +**Effort**: 3 hours +**Files**: +- `app/legal/privacy/page.tsx` (new) +- `app/legal/terms/page.tsx` (new) +- `app/legal/eula/page.tsx` (new) +- `app/legal/cookies/page.tsx` (new) +- `components/layout/UserMenu.tsx` (add legal links) + +**Requirements**: +- Privacy Policy page (GDPR/COPPA compliant) +- Terms of Service page +- EULA (End User License Agreement) +- Cookie Policy page +- Links in user menu footer +- Proper legal language for parenting app + +**Acceptance Criteria**: +- [ ] Privacy Policy page with GDPR/COPPA disclosures +- [ ] Terms of Service page +- [ ] EULA page +- [ ] Cookie Policy page +- [ ] Links added to user menu +- [ ] Links in footer of all pages +- [ ] Mobile-responsive layout +- [ ] Last updated dates displayed + +--- + +#### 14. EULA Agreement Popup on First Login +**Category**: Compliance +**Effort**: 2 hours +**Files**: +- `components/common/dialogs/EulaDialog.tsx` (new) +- `lib/auth/AuthContext.tsx` (show EULA on first login) +- Backend: User entity (add eulaAcceptedAt field) + +**Requirements**: +- Show EULA dialog on first login only +- User must scroll to bottom before accepting +- "I agree" checkbox required +- Block app usage until accepted +- Store acceptance timestamp +- Link to full EULA page + +**Acceptance Criteria**: +- [ ] EULA dialog shows on first login +- [ ] User must scroll to enable "I agree" checkbox +- [ ] "Continue" button disabled until checkbox checked +- [ ] EULA acceptance timestamp saved to database +- [ ] Dialog doesn't show on subsequent logins +- [ ] Link to full EULA page in dialog + +--- + +#### 15. Cookie Consent Banner +**Category**: Compliance +**Effort**: 2 hours +**Files**: +- `components/common/banners/CookieConsent.tsx` (new) +- `lib/store/slices/uiSlice.ts` (cookie preferences) +- `app/layout.tsx` (add banner) + +**Requirements**: +- Cookie consent banner at bottom of page +- Options: Essential, Analytics, Marketing +- "Accept All" / "Reject All" / "Customize" buttons +- Store user preferences in localStorage +- Respect user choice (disable analytics if rejected) +- Link to Cookie Policy + +**Acceptance Criteria**: +- [ ] Banner shows on first visit +- [ ] Three toggle options: Essential (always on), Analytics, Marketing +- [ ] "Accept All" accepts all cookies +- [ ] "Reject All" only accepts essential +- [ ] "Customize" shows detailed preferences +- [ ] Preferences saved to localStorage +- [ ] Analytics scripts only load if accepted +- [ ] Link to full Cookie Policy + +--- + +#### 16. Collapsible Active Sessions Section +**Category**: UI/UX - Settings +**Effort**: 1 hour +**Files**: +- `app/settings/page.tsx` +- `components/features/settings/ActiveSessions.tsx` + +**Requirements**: +- Make "Active Sessions" section collapsible +- Start collapsed by default (show count) +- Expand to show session details +- Same for "Trusted Devices" section + +**Acceptance Criteria**: +- [ ] Active Sessions section is collapsible +- [ ] Shows "Active Sessions (3)" when collapsed +- [ ] Expand/collapse icon (chevron) +- [ ] Smooth accordion animation +- [ ] State persisted during session (not across refreshes) +- [ ] Trusted Devices section also collapsible + +--- + +### Existing High Priority Features (8 features) ### Backend (2 features)