Fix: Removed duplicate mobile folder#132
Conversation
|
emergency pr so i wrote this pretty quick, lmk if i need to add anything! |
|
navigation from feed to event pages no longer works for me :/ |
There was a problem hiding this comment.
Pull request overview
This PR restructures the mobile app’s Expo Router tabs layout (removing the duplicate tabs folder) and updates “Saved/Bookmark” flows to use the authenticated guardian ID instead of hardcoded values, alongside regenerated API-client types/hooks to match updated backend schemas.
Changes:
- Removed the duplicate
app/(tabs)entry point and consolidated tabs underapp/(app)/(tabs). - Updated mobile “Saved” screen and bookmark button to use
useAuthContext().guardianId, with a new error state when no guardian ID is available. - Regenerated
@skillspark/api-clientschemas and React Query hooks (including Saved now referencingevent: Event, and review schema additions likerating).
Reviewed changes
Copilot reviewed 6 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/packages/api-client/src/generated/skillSparkAPI.schemas.ts | Regenerated schema types (Saved shape, review rating/aggregates, formatting updates). |
| frontend/packages/api-client/src/generated/schools/schools.ts | Regenerated React Query hooks/client for Schools endpoint. |
| frontend/packages/api-client/src/generated/saved/saved.ts | Regenerated Saved endpoints/hooks; aligns with Saved using event_id / event: Event. |
| frontend/packages/api-client/src/generated/managers/managers.ts | Regenerated Managers endpoints/hooks. |
| frontend/packages/api-client/src/generated/locations/locations.ts | Regenerated Locations endpoints/hooks. |
| frontend/packages/api-client/src/generated/health/health.ts | Regenerated Health endpoint hook. |
| frontend/packages/api-client/src/generated/guardians/guardians.ts | Regenerated Guardians endpoints/hooks. |
| frontend/packages/api-client/src/generated/events/events.ts | Regenerated Events endpoints/hooks; includes multipart form handling formatting updates. |
| frontend/packages/api-client/src/generated/child/child.ts | Regenerated Child endpoints/hooks. |
| frontend/packages/api-client/src/generated/auth/auth.ts | Regenerated Auth endpoints/hooks. |
| frontend/apps/mobile/components/BookmarkButton.tsx | Removes hardcoded guardian ID; switches to auth context + event-based saved model. |
| frontend/apps/mobile/components/AuthFormInput.tsx | Wrapes input in a ScrollView (keyboard-related behavior change). |
| frontend/apps/mobile/app/(tabs)/index.tsx | Removes old duplicated tabs home screen entry. |
| frontend/apps/mobile/app/(app)/(tabs)/saved.tsx | Uses auth guardian ID for Saved list and adds no-guardian-id error handling. |
| frontend/apps/mobile/app/(app)/(tabs)/index.tsx | Updated Home/Dashboard screen under the new tabs location; refactors helpers to shared utilities/components. |
| frontend/apps/mobile/app/(app)/(tabs)/event/_layout.tsx | Adds stack layout for the event detail route under tabs. |
| frontend/apps/mobile/app/(app)/(tabs)/event/[id].tsx | Updates bookmark button usage to pass eventId rather than occurrenceId. |
Comments suppressed due to low confidence (2)
frontend/apps/mobile/app/(app)/(tabs)/saved.tsx:34
- The message "Illegal state: no guardian ID retrieved" is likely user-facing and doesn’t give the user an actionable next step. Consider a clearer message (e.g., prompting re-login) and/or a CTA to navigate to the login screen.
frontend/apps/mobile/app/(app)/(tabs)/saved.tsx:29 - Same issue as in
BookmarkButton:guardianId!is passed intouseGetSavedByGuardianIdeven whenguardianIdis not yet available, which can create a query key/URL containingundefined. Use a fallback id (e.g.,guardianId ?? "") and keepenabled: !!guardianIdso the request won’t run until the id exists.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export function SavedEventCard({ event, onBookmarkPress }: SavedEventCardProps) { | ||
| return ( | ||
| <Pressable | ||
| onPress={() => router.push(`/event/${event.id}`)} //TODO: fix event details to be either event or occurrence based on design |
There was a problem hiding this comment.
too much of a design change and needs flows to be determined
Description
How Has This Been Tested?
Please describe the tests that you manually ran to verify your changes (beyond any unit/integration tests written and ran).
Screenshots
Please provide screenshots of manual testing (Scalar, frontend pages, etc.)
Checklist
General
Backend Changes (if applicable)
Frontend Changes (if applicable)
Mobile Screenshots (if applicable)
iOS
[Add iOS screenshots here]
Android
[Add Android screenshots here]