Skip to content

Fix onboarding bypass, tasks header UI, and auth gaps#28

Merged
jeannineruiz merged 7 commits into
mainfrom
stephenhung/rep-41-my-tasks-connect-my-tasks-to-enter-details-page
Apr 20, 2026
Merged

Fix onboarding bypass, tasks header UI, and auth gaps#28
jeannineruiz merged 7 commits into
mainfrom
stephenhung/rep-41-my-tasks-connect-my-tasks-to-enter-details-page

Conversation

@stephenhungg

Copy link
Copy Markdown
Contributor

Summary

  • Closes the onboarding bypass where returning drivers with no partner_id could skip partner selection and land on an empty task list
  • Fixes a race condition in ProfileContext that caused returning drivers to briefly flash to onboarding on cold start
  • Fixes the tasks page header to be visually flush with the top of the screen (matching the home page)
  • Fixes spacing and alignment issues within the tasks page header
  • Adds vendor/ to .prettierignore so bundled Ruby gems don't fail the pre-commit hook

Changes

src/app/index.tsx

After confirming auth, now checks profile?.partner_id from ProfileContext. If the driver has no partner set, redirects to /onboarding instead of /(tabs)/my-tasks. This catches:

  • Fresh signups who haven't completed onboarding
  • Returning drivers who signed up but never finished partner selection

src/utils/ProfileContext.tsx

  • Initialize loading as true (was false) so index.tsx waits for the first profile fetch before making a routing decision
  • clearProfile() now sets loading = false so unauthenticated users don't spin forever

src/app/(tabs)/available-pick-ups.tsx

  • Removed SafeAreaView wrapper — it was double-stacking top insets (SafeAreaView's automatic padding + paddingTop: 58 in the header), causing a gray gap behind the status bar and the header appearing pushed down
  • Now uses a plain View matching the same pattern as the home page

src/styles/tabs/available-pick-ups-styles.ts

  • Header paddingBottom: 20 → 14
  • dateHeaderText marginTop: 12 → 8, marginBottom: 16 → 12
  • contentContainer paddingBottom: 24 → 140 to clear the tab bar and home indicator

src/components/AnimatedSegmentedControl.tsx

  • marginHorizontal: 26 → 0 so the pill aligns with the header text instead of being double-inset (header padding + component margin)
  • marginBottom: 23 → 0, added marginTop: 12 for spacing from the subtext above

.prettierignore

Added vendor/ to exclude the bundled Ruby gems directory from prettier checks

Test plan

  • Cold start as an authenticated driver with partner_id set → goes directly to tasks tab
  • Cold start as an authenticated driver with no partner_id → redirected to onboarding
  • Fresh signup → onboarding → select partner → lands on tasks tab
  • Tasks page header is flush with the top of the screen (no gray gap behind status bar)
  • Today/Tomorrow pill spans the full width of the header content
  • Spacing between pill and list content is tight, not a 55px gap
  • Pre-commit hook passes (pnpm run prettier:check)

- 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.
@jeannineruiz jeannineruiz merged commit 84cba27 into main Apr 20, 2026
2 checks passed
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