Skip to content

feat(016): implement Spec 016 Mobile App + fix test infrastructure#519

Merged
MikeWedderburn-Clarke merged 15 commits intomainfrom
copilot/implement-spec-16-fully
Apr 6, 2026
Merged

feat(016): implement Spec 016 Mobile App + fix test infrastructure#519
MikeWedderburn-Clarke merged 15 commits intomainfrom
copilot/implement-spec-16-fully

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 5, 2026

  • Review spec 016 implementation quality (7 improvement areas identified)
  • Fix 1: Security — Add userId validation on refresh token exchange (mobile-token/route.ts)
  • Fix 2: i18n — Extract hardcoded MSG constants from 10 mobile screens to centralized messages.ts (Constitution VIII)
  • Fix 3: Bug — Fix UTF-8 byteLength missing 4-byte surrogate pair case (offline.ts)
  • Fix 4: Resilience — Handle push token registration failure (push.ts)
  • Fix 5: Error handling — Add try-catch in connectivity.ts fetch
  • Fix 6: Error handling — Improve empty catch blocks in api-client.ts
  • Fix 7: Accessibility — Add accessibilityLabel to Image components
  • Run full validation suite: typecheck ✅ | lint ✅ | 1,098 tests ✅ | build ✅

Copilot AI and others added 14 commits April 5, 2026 08:21
Add initial scaffolding files for the mobile app workspace:
- package.json with Expo SDK 52 dependencies and jest config
- tsconfig.json extending expo base with monorepo path mappings
- app.json with Expo configuration (iOS/Android/plugins)
- eas.json for EAS Build profiles
- metro.config.js for monorepo-aware Metro bundler
- babel.config.js with babel-preset-expo
- __tests__/setup.ts with RN module mocks
- assets/.gitkeep placeholder directory

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
…erEnv

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
- Add MobileTokenRequest/MobileTokenResponse types to shared auth types
- Create apps/mobile/lib/auth.ts with SecureStore-based JWT management
- Create apps/mobile/lib/api-client.ts with typed HTTP methods and 401 retry
- Create POST /api/auth/mobile-token endpoint with session exchange and refresh
- Add integration tests for mobile-token endpoint (6 tests)
- Add unit tests for mobile auth module and API client

Spec: 016-mobile-app (T006, T007, T008, T009, T010, T011)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
Create Expo Router file-based routing structure for the mobile app:

- Root layout with auth gate and React Query provider (_layout.tsx)
- Auth group layout and login screen ((auth)/_layout.tsx, login.tsx)
- Five-tab bottom navigation ((tabs)/_layout.tsx)
- Events stack with list and detail screens ((tabs)/events/)
- Teachers stack layout ((tabs)/teachers/_layout.tsx)
- Profile stack layout ((tabs)/profile/_layout.tsx)
- Home tab with upcoming events feed ((tabs)/index.tsx)
- Not found screen (+not-found.tsx)

All screens handle loading/error/empty states, use MSG constants
for i18n-extractable strings, and meet 44px touch target minimums.

Spec: 016-mobile-app (T014-T020, T025-T028)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
Create remaining mobile app screens and support modules:

- Teachers list screen with search and certification badges (T031)
- Teacher detail screen with profile, certifications, reviews (T032)
- Bookings screen with upcoming/past grouping (T033)
- Profile screen with user info and sign out (T034)
- Notification settings screen with category toggles (T035)
- MMKV-backed offline persistence with LRU eviction (T038)
- Connectivity monitoring hook and utility (T039)
- Push notifications with registration and deep linking (T044)
- Device token registration API route (T045)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
- Add unit tests: offline, connectivity, push, navigation
- Add integration test: POST /api/notifications/devices
- Add haptics utility (lib/haptics.ts)
- Update README.md: spec 016 status + mobile workspace
- Update CONTRIBUTING.md: Mobile Development section
- Mark all 63 tasks complete in specs/016-mobile-app/tasks.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
… phases 1-10

Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/8bbc73db-aa72-46fa-bd87-e19b46795573

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
- Update shared-ui component count from 17 to 20 (spec Input, Summary, SC-005)
- FR-002: add /api/notifications/devices alongside JWT auth as mobile-specific endpoints
- US3: clarify auth uses web session exchange for JWT (not direct social login)
- plan.md Constitution V: update component count from 17 to 20

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
… count 17→20, fix FR-002, add root config tasks

Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/802682c7-bd35-4b72-a06a-8c26c28573ad

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
…016)

Add shared hook factories for mobile/web data fetching:
- useEvents/useEventDetail hooks with eventsKeys query key factory
- useTeachers/useTeacherDetail hooks with teachersKeys query key factory
- Query option factories (eventsListOptions, eventDetailOptions, etc.)
- Platform-agnostic: hooks accept ApiClient, no HTTP client coupling
- 44 unit tests covering key generation, path building, query config
- Add @tanstack/react-query as peer dependency (>=5.0.0)
- Add vitest config and test script to @acroyoga/shared

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
…egration, screen tests, root config, CI, spec 008 cross-refs

Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/802682c7-bd35-4b72-a06a-8c26c28573ad

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
…ting offline tests

Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/802682c7-bd35-4b72-a06a-8c26c28573ad

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
… paths, setup.ts exclusion

Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/5794da41-9b39-48e2-ab27-c674ceb730f2

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
…I routes

- Security: Add userId validation on refresh token exchange (Constitution XI)
- Security: Add error code to token error responses (Constitution I)
- i18n: Extract hardcoded MSG from 10 screens to centralized messages.ts (Constitution VIII)
- Bug: Fix UTF-8 byteLength missing 4-byte surrogate pair case (offline.ts)
- Resilience: Handle push token registration failure with warning (push.ts)
- Error handling: Add try-catch to connectivity check (connectivity.ts)
- Error handling: Improve parse error detail in api-client.ts
- Accessibility: Add accessibilityLabel to Image components

Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/cd498209-c80c-47a0-a08d-b9428d2011d2

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
@MikeWedderburn-Clarke MikeWedderburn-Clarke marked this pull request as ready for review April 6, 2026 06:10
@MikeWedderburn-Clarke MikeWedderburn-Clarke merged commit 2fb1313 into main Apr 6, 2026
5 checks passed
@MikeWedderburn-Clarke MikeWedderburn-Clarke deleted the copilot/implement-spec-16-fully branch April 6, 2026 06:10
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