Repository navigation
fix(mobile): stop support modules from registering as routes - #11652
Conversation
📝 WalkthroughWalkthroughMobile accounts and session screens now use shared mobile module paths. Session route types and style modules use local dependencies, and a combined 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0278f539-8ff8-4aa5-aa4e-6fac05b08d9c
📒 Files selected for processing (17)
mobile/app/h/[hostId]/accounts.tsxmobile/app/h/[hostId]/session/[worktreeId].tsxmobile/src/accounts/mobile-accounts-screen-styles.tsmobile/src/expo-route-module-boundary.test.tsmobile/src/session/MobileBrowserTabActionSheet.tsxmobile/src/session/MobileSessionHeaderIconButton.tsxmobile/src/session/QuickCommandsTabButton.tsxmobile/src/session/mobile-bulk-close-sheet-actions.tsmobile/src/session/mobile-session-command-input-styles.tsmobile/src/session/mobile-session-frame-styles.tsmobile/src/session/mobile-session-reader-styles.tsmobile/src/session/mobile-session-review-comment-styles.tsmobile/src/session/mobile-session-route-types.tsmobile/src/session/mobile-session-styles.tsmobile/src/session/mobile-terminal-tab-agent.test.tsmobile/src/session/mobile-terminal-tab-agent.tsmobile/src/terminal/terminal-live-input-affordance.test.ts
Greptile SummaryThis PR is a file-boundary cleanup that moves eight non-route support modules from
Confidence Score: 5/5Safe to merge — pure file-move refactoring with no logic changes; all import paths verified correct. Every changed line is either a file rename, a relative import path correction, or an update to a test URL. The logic in all moved files is identical to what was there before. The new boundary test uses the TypeScript compiler AST (not string matching) to detect default exports, correctly handling re-export forms. Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| mobile/src/expo-route-module-boundary.test.ts | New boundary guard test; uses TypeScript AST to detect default exports, correctly handles re-export forms like export { default } from. |
| mobile/src/session/mobile-session-route-types.ts | Renamed from app/h/[hostId]/session/; all import paths updated correctly for the new location under mobile/src/session/. |
| mobile/app/h/[hostId]/session/[worktreeId].tsx | Three import statements updated from local ./ paths to ../../../../src/session/ paths; no logic changes. |
| mobile/src/session/QuickCommandsTabButton.tsx | Renamed from app/ directory; theme import path updated to ../theme/mobile-theme, styles import is now sibling-relative. |
| mobile/src/terminal/terminal-live-input-affordance.test.ts | URL path for mobile-session-command-input-styles.ts updated from the old app/ location to ../session/; no test logic changes. |
| mobile/src/accounts/mobile-accounts-screen-styles.ts | Renamed from mobile/app/h/[hostId]/accounts-screen-styles.ts; theme import corrected to ../theme/mobile-theme. |
Reviews (4): Last reviewed commit: "test(mobile): reject platform API routes..." | Re-trigger Greptile
Review and rendered QA — current head
|
Native iPad router QA — exact head
|
…i#11652) * fix(mobile): keep support modules out of Expo routes * test(mobile): parse Expo route exports * test(mobile): reject platform-specific API routes * test(mobile): reject platform API routes unconditionally





What this fixes
Expo Router treats every source module under
mobile/app/as a potential screen. Eight support files containing styles, types, and components lived there, so every mobile launch logged misleading “missing default export” route warnings.Before / after
mobile/app/, so those warnings disappear.What changed
mobile/src/.mobile/app/to be genuine default-exporting routes.This is a file-boundary cleanup. It does not intentionally change navigation, layout, terminal behavior, or account behavior.
Verification
4d902529edc402c4d60dbe09e5d0d1a7351f49f0integrates cleanly withorigin/mainatf936e7fc9c7defebc40398a1ddf2ce50e93c7dfc; simulated integration tree:e61117cdc7f2fac5346f3aaf2606a11b16c1541a.