13 Commits

Author SHA1 Message Date
7feca4d54b Add debouncing for refresh buttons to prevent duplicate API calls
Implemented a reusable useDebounce hook to prevent rapid-fire clicks
on refresh buttons throughout the application.

Changes:
- Created hooks/useDebounce.ts with configurable delay and leading/trailing edge options
- Added comprehensive unit tests in hooks/__tests__/useDebounce.test.ts
- Applied debouncing to dashboard WebView refresh button (app/(tabs)/dashboard.tsx)
- Applied debouncing to beneficiary detail pull-to-refresh (app/(tabs)/beneficiaries/[id]/index.tsx)
- Applied debouncing to equipment screen refresh (app/(tabs)/beneficiaries/[id]/equipment.tsx)
- Applied debouncing to all error retry buttons (components/ui/ErrorMessage.tsx)
- Fixed jest.setup.js to properly mock React Native modules
- Added implementation documentation in docs/DEBOUNCE_IMPLEMENTATION.md

Technical details:
- Default 1-second debounce delay
- Leading edge execution (immediate first call, then debounce)
- Type-safe with TypeScript generics
- Automatic cleanup on component unmount

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-29 11:44:16 -08:00
521ff52344 Add comprehensive testing and documentation for role-based UI permissions
This commit implements role-based permission testing and documentation for
the beneficiary management system.

The role-based UI was already correctly implemented in BeneficiaryMenu.tsx
(lines 21-25). This commit adds:

- Comprehensive test suite for BeneficiaryMenu role permissions
- Test suite for role-based edit modal functionality
- Detailed documentation in docs/ROLE_BASED_PERMISSIONS.md
- Jest configuration for future testing
- testID added to menu button for testing accessibility

Role Permission Summary:
- Custodian: Full access (all features including remove)
- Guardian: Most features (cannot remove beneficiary)
- Caretaker: Limited access (dashboard, edit nickname, sensors only)

Edit Functionality:
- Custodians can edit full profile (name, address, avatar)
- Guardians/Caretakers can only edit personal nickname (customName)
- Backend validates all permissions server-side for security

Tests verify:
 Menu items filtered correctly by role
 Custodian has full edit capabilities
 Guardian/Caretaker limited to nickname editing only
 Default role is caretaker (security-first approach)
 Navigation routes work correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-29 11:39:18 -08:00
Sergei
d453126c89 feat: Room location picker + robster credentials
- Backend: Update Legacy API credentials to robster/rob2
- Frontend: ROOM_LOCATIONS with icons and legacyCode mapping
- Device Settings: Modal picker for room selection
- api.ts: Bidirectional conversion (code ↔ name)
- Various UI/UX improvements across screens

PRD-DEPLOYMENT.md completed (Score: 9/10)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-24 15:22:40 -08:00
Sergei
f94121b848 Update voice call, equipment tracking, and cleanup
- Update WellNuoLite submodule with Julia AI race condition fix
- Add ultravoxService for voice call handling
- Update voice.tsx with improved call flow
- Update equipment tracking in beneficiary details
- Clean up old data files
- Add react-native-base64 type definitions
- Add debug tools

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-22 09:34:01 -08:00
Sergei
429a18d1eb Fix Edit navigation from menu + add avatar upload indicator
- BeneficiaryMenu: Navigate with ?edit=true param to open edit modal
- Beneficiary index: Auto-open edit modal when edit=true in URL
- Add loading indicator on Save button during edit save
- Add "Uploading..." overlay on avatar during image upload
2026-01-12 21:44:40 -08:00
Sergei
657737e5a4 Add status badges for beneficiaries list
- Monitoring badge: equipment active + subscription active
- Get kit badge: user hasn't ordered equipment yet
- Equipment status badges: ordered, shipped, delivered
- No subscription warning when equipment works but no sub
- Stripe subscription caching in backend (hourly sync)
- BeneficiaryMenu with edit/share/archive/delete actions
2026-01-09 19:49:07 -08:00
Sergei
2e72398818 Fix dropdown menu - make full row clickable
- BeneficiaryMenu: dropdownItem now has width: 100%
- Increased minWidth to 180 and added overflow: hidden
- Users can now tap anywhere on the menu row, not just the text

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 18:41:35 -08:00
Sergei
24e7f057e7 Stable version: Reusable BeneficiaryMenu, subscription fixes
- Created reusable BeneficiaryMenu component with Modal backdrop
- Menu closes on outside tap (proper Modal + Pressable implementation)
- Removed debug panel from subscription and beneficiary detail pages
- Fixed subscription creation and equipment status handling
- Backend improvements for Stripe integration
2026-01-09 13:22:56 -08:00
Sergei
f6a2d5e687 Replace Alert with Toast for invite code copy, rename Share to Access 2026-01-01 13:41:34 -08:00
Sergei
b869e9e3ab Update subscription, equipment screens and auth flow 2025-12-30 21:14:24 -08:00
Sergei
7cb07c09ce Major UI/UX updates: Voice, Subscription, Beneficiaries, Profile
- Voice tab: simplified interface, voice picker improvements
- Subscription: Stripe integration, purchase flow updates
- Beneficiaries: dashboard, sharing, improved management
- Profile: drawer, edit, help, privacy sections
- Theme: expanded constants, new colors
- New components: MockDashboard, ProfileDrawer, Toast
- Backend: Stripe routes additions
- Auth: activate, add-loved-one, purchase screens
2025-12-29 15:36:44 -08:00
Sergei
a804a82512 Implement Auth, Patients List, and Dashboard
Features:
- Login screen with API integration (credentials endpoint)
- SecureStore for token management
- Patients list with health data display
- Patient dashboard with stats and quick actions
- AI Chat screen (voice_ask API integration)
- Profile screen with logout
- Full error handling and loading states
- WellNuo brand colors and UI components

API Integration:
- Base URL: eluxnetworks.net/function/well-api/api
- Auth: function=credentials
- Chat: function=voice_ask

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 12:58:15 -08:00
Sergei
cd8de4a7d4 Initial commit: Clean WellNuo Voice Assistant React Native Expo project
- Fresh Expo React Native application setup
- Default template with standard dependencies
- Ready for voice assistant development
- Connected to Gitea development branch

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 11:36:23 -08:00