Skip to content

feat(companion): add configurable landing page#3

Merged
volnei merged 1 commit into
mainfrom
devin/1771147232-configurable-landing-page
Feb 15, 2026
Merged

feat(companion): add configurable landing page#3
volnei merged 1 commit into
mainfrom
devin/1771147232-configurable-landing-page

Conversation

@dhairyashiil
Copy link
Copy Markdown
Member

feat(companion): add configurable landing page

Summary

Ports calcom/cal.com#27267 to the new companion repo. This PR adds a user-configurable landing page feature, allowing users to choose which screen opens on app launch (Event Types, Bookings, or Bookings Unconfirmed).

Key changes:

  • New useUserPreferences hook persisting landing page preference via generalStorage
  • New LandingPagePicker component — iOS uses native ActionSheetIOS, Android/web uses a FullScreenModal
  • Tab index (app/(tabs)/index.tsx) redirects based on stored preference
  • Bookings screens (index.tsx, index.ios.tsx) accept ?filter= URL param to support "Bookings (Unconfirmed)" landing
  • "App Settings" section added to More screen (both iOS and Android/web variants)
  • User preferences cleared on logout in AuthContext
  • BookingListScreen: replaces <Activity> wrapper with standard conditional rendering
  • Version bump to 1.0.4; widget preview image updated

Review & Testing Checklist for Human

  • <Activity> → conditional rendering in BookingListScreen.tsx: The original code used <Activity mode="visible"|"hidden"> (keeps components mounted but hidden). This PR replaces them with {condition && ...} (unmounts when hidden). Verify this doesn't cause scroll position loss, state resets, or UI flicker when switching between empty/list/search states.
  • Landing page redirect on app launch: Test all three options (Event Types, Bookings, Bookings Unconfirmed) on both iOS and Android to confirm the redirect from /(tabs)/ works correctly and persists across app restarts.
  • Logout clears preferences: Confirm that after logout and re-login (or login as different user), the landing page resets to the default (Event Types).
  • iOS ActionSheet vs Android modal: Verify the LandingPagePicker renders correctly on both platforms — the iOS .ios.tsx variant uses ActionSheetIOS while the default uses a custom modal.

Suggested test plan:

  1. Open the app → navigate to More → tap "First Page" under App Settings
  2. Select "Bookings (Unconfirmed)" → force-close and reopen the app → confirm it lands on Bookings with the Unconfirmed filter active
  3. Switch to "Event Types" → reopen → confirm it lands on Event Types
  4. Log out → log back in → confirm it defaults to Event Types

Notes

  • This is a direct port of cal.com#27267 which was identified as missing from the new companion repo
  • The biome.json difference (root: true vs root: false, extra noUnknownAtRules rule) is pre-existing and not part of this PR
  • No functional testing was performed (React Native/Expo environment) — changes verified at the diff level only

Link to Devin run: https://app.devin.ai/sessions/3054c020cba246bf8dc67780f7d90f88
Requested by: @dhairyashiil

- Add useUserPreferences hook for persistent storage of landing page preference
- Add LandingPagePicker component for both iOS and Android/web platforms
- Update tabs index to redirect based on user preference
- Update bookings index to accept initial filter from URL params
- Add App Settings section in More screen with landing page selector
- Clear user preferences on logout for fresh state

Co-Authored-By: dhairyashil@cal.com <dhairyashil10101010@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@volnei volnei merged commit 526ab76 into main Feb 15, 2026
4 checks passed
devin-ai-integration Bot pushed a commit that referenced this pull request May 23, 2026
- Reject /notify in Telegram groups with DM hint (#3)
- Validate payload fields (title, timeZone, start, end, hosts, attendees) in parseDeliverRequest (#4)
- Wrap deliverNotifications in try/catch, return 422 on formatter crash (#4)
- Add logging across route, service, and delivery modules (#5)
- Add /notify to Slack and Telegram help cards (#7)
- Add error field to DeliverResult for backend retry/unsubscribe decisions (#9)
- Change confirmation message from 'here' to 'via DM' (#10)
- Validate timeZone with Intl.DateTimeFormat before processing (#11)
- Add fallback badge for unknown notificationType (#12)
- Reject /notify in groups with 'check DMs' message (#13)
devin-ai-integration Bot pushed a commit that referenced this pull request May 29, 2026
…registration races

Addresses parallel-review findings:
- #1/#2: add a monotonic auth generation (epoch) bumped on clearAuth and every
  new login. Refreshes discard their result if the epoch changed mid-flight, and
  401 retries abort instead of replaying a stale request under a new identity.
- #3: loginFromWebSession now clears the query cache before flipping auth state
  so a previous user's in-memory cache can't be re-persisted under the new owner.
- #4: a registration that completes after logout/switch is not persisted as the
  active record; it is parked for retry instead of leaving a live subscription.
- #5: compare the full {token,userId,region,deviceId} tuple and keep unresolved
  prior registrations in a retry queue instead of clobbering the single slot.
dhairyashiil added a commit that referenced this pull request Jun 2, 2026
…es (epoch guard + auth-transition lock) (#97)

* fix(mobile): durable push registration, single-flight token refresh, identity-scoped query cache

* fix(mobile): address review feedback on push/auth/cache hardening

- write cal_auth_user_id in loginFromWebSession so web-session users keep persisted cache
- treat backend 404 on unregister as already-gone (region-aware) and clear stale record
- resolve a differing previous push registration before overwriting it
- add safe, PII-free logs (region, userId, deviceId, token hash) to push cleanup paths

* fix(mobile): guard auth session with a generation/epoch; harden push registration races

Addresses parallel-review findings:
- #1/#2: add a monotonic auth generation (epoch) bumped on clearAuth and every
  new login. Refreshes discard their result if the epoch changed mid-flight, and
  401 retries abort instead of replaying a stale request under a new identity.
- #3: loginFromWebSession now clears the query cache before flipping auth state
  so a previous user's in-memory cache can't be re-persisted under the new owner.
- #4: a registration that completes after logout/switch is not persisted as the
  active record; it is parked for retry instead of leaving a live subscription.
- #5: compare the full {token,userId,region,deviceId} tuple and keep unresolved
  prior registrations in a retry queue instead of clobbering the single slot.

* fix(mobile): close epoch-guard gaps in refresh/boot/logout/push paths

* fix(mobile): close residual epoch/partial-write and push-404 ownership gaps

* fix(mobile): close rollback/web-login/push-cleanup gaps from round 4

* fix(mobile): epoch-guard setupAfterLogin/loginWithOAuth, tighten rollback marker + late-registration cleanup

* fix(mobile): close remaining setupAfterLogin/loginWithOAuth/web-session epoch windows

* fix(mobile): serialize auth/storage marker mutations via auth-transition lock; pre-POST generation check for push registration

* fix(mobile): recheck auth generation after setupAfterLogin before installing refresh fn

* fix(mobile): coalesce concurrent logouts, re-entrancy guard for auth lock, region-safe cache envelope, pending-queue cap
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