From 421744865f95f54344e5f492f6918607b16695ea Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 22:31:32 +0000 Subject: [PATCH 1/2] Initial plan From 1350aa6a5ede19d924a9a4c277ef8089b940ea3c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 23:01:43 +0000 Subject: [PATCH 2/2] fix(mobile): add root index.tsx redirect to prevent stale Hello World screen Without a root app/index.tsx in the repo, a stale default Expo Router scaffold file (showing "Hello World") could be picked up from a previous build or CLI scaffolding and displayed instead of the real app. The new index.tsx immediately redirects to /(auth)/, and the existing AuthGuard in _layout.tsx forwards authenticated users to /(tabs)/. Also registers the index screen in the root Stack and updates docs/MobileApp.md with an expanded project structure and a new troubleshooting entry. Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- docs/MobileApp.md | 33 ++++++++++++++++++++++++++++++++- mobile/app/_layout.tsx | 1 + mobile/app/index.tsx | 17 +++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 mobile/app/index.tsx diff --git a/docs/MobileApp.md b/docs/MobileApp.md index 27c0aa80..77df917f 100644 --- a/docs/MobileApp.md +++ b/docs/MobileApp.md @@ -279,7 +279,19 @@ If you wish to use **direct FCM/APNs** without Expo's relay, replace the `send_e ``` mobile/ -├── App.tsx # Root component +├── App.tsx # Root component (legacy, not used at runtime) +├── app/ # Expo Router file-based routes +│ ├── _layout.tsx # Root layout (AuthGuard + providers) +│ ├── index.tsx # Root redirect → /(auth)/ +│ ├── (auth)/ # Unauthenticated route group +│ │ ├── _layout.tsx # Stack navigator (headerless) +│ │ ├── index.tsx # Welcome screen +│ │ └── login.tsx # Login screen +│ └── (tabs)/ # Authenticated route group +│ ├── _layout.tsx # Tab navigator +│ ├── index.tsx # Upload screen (default tab) +│ ├── files.tsx # Files screen +│ └── profile.tsx # Profile screen ├── app.json # Expo/EAS configuration ├── eas.json # EAS Build profiles ├── package.json @@ -301,6 +313,25 @@ mobile/ ## Troubleshooting +### App shows "Hello World" / default Expo page after update + +If the iOS or Android app shows a generic "Hello World – This is the first page of your app" screen instead of the DocuElevate UI, it means a stale default `index.tsx` file (generated by Expo CLI scaffolding) is being picked up in the `mobile/app/` directory. + +**To fix:** + +1. Delete any leftover default `mobile/app/index.tsx` that is **not** the repository version (the repo version contains a `` to `/(auth)/`). +2. Clear the Metro bundler cache and rebuild: + ```bash + cd mobile + npx expo start --clear + ``` +3. For production builds, run a clean EAS build: + ```bash + eas build --platform ios --clear-cache + ``` + +The repository includes a root `app/index.tsx` that immediately redirects to the authentication flow, so this issue should not recur once the correct file is present. + ### "Session expired Local session" during iOS build EAS stores an Apple ID session locally (in `~/.expo/`) to manage code-signing certificates and provisioning profiles. This session expires after a few weeks. diff --git a/mobile/app/_layout.tsx b/mobile/app/_layout.tsx index 3d328673..7202a704 100644 --- a/mobile/app/_layout.tsx +++ b/mobile/app/_layout.tsx @@ -118,6 +118,7 @@ function AuthGuard() { return ( + diff --git a/mobile/app/index.tsx b/mobile/app/index.tsx new file mode 100644 index 00000000..2146ea1b --- /dev/null +++ b/mobile/app/index.tsx @@ -0,0 +1,17 @@ +/** + * Root index route – redirects to the auth flow on launch. + * + * expo-router renders this when the "/" route is matched (i.e. on cold start). + * Without this file, a stale default scaffold page ("Hello World") can appear + * if one was left behind by a previous build or Expo CLI scaffolding. + * + * The redirect targets the (auth) group; the AuthGuard in _layout.tsx will + * immediately forward authenticated users to (tabs). + */ + +import { Redirect } from "expo-router"; +import React from "react"; + +export default function RootIndex() { + return ; +}