Skip to content

Fix: Removed duplicate mobile folder#132

Merged
adescoteaux1 merged 6 commits intomainfrom
fix/duplicate-folders
Mar 25, 2026
Merged

Fix: Removed duplicate mobile folder#132
adescoteaux1 merged 6 commits intomainfrom
fix/duplicate-folders

Conversation

@gregorysa
Copy link
Contributor

Description

  • Removed extra (tabs) folder
  • Moved the event and saved tab into the (app)/(tabs) folder
  • Removed the hardcoded guardian ID from the saved tab
  • Error handling for no guardian ID

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

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas

Backend Changes (if applicable)

  • I have written unit tests for my code
  • I have written integration tests where appropriate
  • New and existing unit tests pass locally with my changes
  • I have run make api-validate and make api-gen to keep the openAPI spec up to date
  • I have tested error handling and edge cases
  • Database migrations are included (if applicable)

Frontend Changes (if applicable)

  • I have tested in multiple browsers (Chrome, Firefox, Safari)
  • Mobile responsive design verified (if applicable)
  • I have run make generate-api to keep the API hooks up to date
  • For mobile features: Tested on both iOS and Android devices
  • For mobile features: Screenshots from both iOS and Android included below
  • No console errors or warnings
  • Loading states and error states handled

Mobile Screenshots (if applicable)

iOS

[Add iOS screenshots here]

Android

[Add Android screenshots here]

@gregorysa
Copy link
Contributor Author

emergency pr so i wrote this pretty quick, lmk if i need to add anything!

@adescoteaux1
Copy link
Collaborator

navigation from feed to event pages no longer works for me :/

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 under app/(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-client schemas and React Query hooks (including Saved now referencing event: Event, and review schema additions like rating).

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 into useGetSavedByGuardianId even when guardianId is not yet available, which can create a query key/URL containing undefined. Use a fallback id (e.g., guardianId ?? "") and keep enabled: !!guardianId so the request won’t run until the id exists.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adescoteaux1 adescoteaux1 requested a review from josh-torre March 25, 2026 00:37
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove todo?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too much of a design change and needs flows to be determined

@adescoteaux1 adescoteaux1 requested a review from josh-torre March 25, 2026 02:01
@adescoteaux1 adescoteaux1 merged commit 411e01f into main Mar 25, 2026
6 checks passed
@adescoteaux1 adescoteaux1 deleted the fix/duplicate-folders branch March 25, 2026 02:06
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.

4 participants