Fix onboarding bypass, tasks header UI, and auth gaps#28
Merged
jeannineruiz merged 7 commits intoApr 20, 2026
Merged
Conversation
- index.tsx: check profile.partner_id after auth — drivers without a partner are redirected to /onboarding instead of landing on an empty task list - ProfileContext: initialize loading as true so index.tsx waits for the first profile fetch before routing; clearProfile() sets loading=false for unauthenticated users to avoid infinite loading state - .prettierignore: exclude vendor/ (bundled Ruby gems) from prettier checks - Fix prettier formatting in available-pick-ups.tsx and AnimatedSegmentedControl.tsx
Remove SafeAreaView from available-pick-ups — it was double-stacking top insets (SafeAreaView's automatic padding + header paddingTop:58), causing the white header to appear pushed down with a gray gap behind the status bar. Now matches the same pattern as my-tasks (plain View + paddingTop:58 to clear the status bar). Also bumps contentContainer paddingBottom to 140 to clear the tab bar and home indicator.
Use outer white View + inner SafeAreaView pattern so the refresh spinner renders in the correct safe area, while the white outerContainer background fills behind the status bar to keep the flush header look. Drop header paddingTop from 58 to 14 since SafeAreaView now handles the top inset.
This reverts commit 4c47d49.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
partner_idcould skip partner selection and land on an empty task listProfileContextthat caused returning drivers to briefly flash to onboarding on cold startvendor/to.prettierignoreso bundled Ruby gems don't fail the pre-commit hookChanges
src/app/index.tsxAfter confirming auth, now checks
profile?.partner_idfromProfileContext. If the driver has no partner set, redirects to/onboardinginstead of/(tabs)/my-tasks. This catches:src/utils/ProfileContext.tsxloadingastrue(wasfalse) soindex.tsxwaits for the first profile fetch before making a routing decisionclearProfile()now setsloading = falseso unauthenticated users don't spin foreversrc/app/(tabs)/available-pick-ups.tsxSafeAreaViewwrapper — it was double-stacking top insets (SafeAreaView's automatic padding +paddingTop: 58in the header), causing a gray gap behind the status bar and the header appearing pushed downViewmatching the same pattern as the home pagesrc/styles/tabs/available-pick-ups-styles.tspaddingBottom: 20 → 14dateHeaderTextmarginTop: 12 → 8,marginBottom: 16 → 12contentContainerpaddingBottom: 24 → 140to clear the tab bar and home indicatorsrc/components/AnimatedSegmentedControl.tsxmarginHorizontal: 26 → 0so the pill aligns with the header text instead of being double-inset (header padding + component margin)marginBottom: 23 → 0, addedmarginTop: 12for spacing from the subtext above.prettierignoreAdded
vendor/to exclude the bundled Ruby gems directory from prettier checksTest plan
partner_idset → goes directly to tasks tabpartner_id→ redirected to onboardingpnpm run prettier:check)