fix(mobile): Android build OOM fix + home/menu/settings chrome polish#3695
Conversation
The Expo template's 2GB daemon heap is too small for this app's dependency set; :app:mergeExtDexDebug fails with java.lang.OutOfMemoryError. Apply -Xmx4096m via a config plugin so the setting survives prebuild. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ull-page settings - Add a bottom-right new-task FAB on the Android home screen and drop the header pencil button - Restyle @react-native-menu popup menus via a config plugin (app palette, rounded corners, anchored below the button) and swap Android's square checkbox rows for a check glyph on selected items - Present settings as a full-page card with an in-screen back header on Android instead of the iOS form sheet - Dock the new-task prompt editor in the bottom bar so the draft reads like an empty thread - Give the working-duration pill a blurred backdrop (expo-blur) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
| import { SymbolView } from "../../components/AppSymbol"; | ||
| import { useThemeColor } from "../../lib/useThemeColor"; | ||
|
|
||
| /** |
There was a problem hiding this comment.
🟡 Medium home/AndroidHomeFab.tsx:8
The AndroidHomeFabLayout FAB is positioned at bottom: Math.max(insets.bottom, 16) + 16 with a height of 56, so it occupies roughly the bottom 88px of the screen. The underlying home list still uses paddingBottom: 24 on Android, so the last thread row renders behind the FAB, obscuring its lower-right area and making it hard to tap or swipe. Consider increasing the list's bottom padding on Android to account for the FAB's footprint.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/mobile/src/features/home/AndroidHomeFab.tsx around line 8:
The `AndroidHomeFabLayout` FAB is positioned at `bottom: Math.max(insets.bottom, 16) + 16` with a height of `56`, so it occupies roughly the bottom 88px of the screen. The underlying home list still uses `paddingBottom: 24` on Android, so the last thread row renders behind the FAB, obscuring its lower-right area and making it hard to tap or swipe. Consider increasing the list's bottom padding on Android to account for the FAB's footprint.
There was a problem hiding this comment.
🟡 Medium
t3code/apps/mobile/src/Stack.tsx
Line 222 in e7a3d08
On Android, SettingsSheet is now presented as "card" (a regular pushed page), but it remains in WORKSPACE_OVERLAY_ROUTES. workspacePathFromState() filters it out when computing the active workspace path, so AdaptiveWorkspaceLayout still treats the previous route as active while Settings is open. On Android split-view devices this leaves the thread sidebar and workspace chrome visible beside the Settings page instead of showing it as a full-page screen. Consider excluding SettingsSheet from WORKSPACE_OVERLAY_ROUTES on Android (or removing it from the set when Platform.OS === "android") so the workspace layout correctly deactivates.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/mobile/src/Stack.tsx around line 222:
On Android, `SettingsSheet` is now presented as `"card"` (a regular pushed page), but it remains in `WORKSPACE_OVERLAY_ROUTES`. `workspacePathFromState()` filters it out when computing the active workspace path, so `AdaptiveWorkspaceLayout` still treats the previous route as active while Settings is open. On Android split-view devices this leaves the thread sidebar and workspace chrome visible beside the Settings page instead of showing it as a full-page screen. Consider excluding `SettingsSheet` from `WORKSPACE_OVERLAY_ROUTES` on Android (or removing it from the set when `Platform.OS === "android"`) so the workspace layout correctly deactivates.
ApprovabilityVerdict: Needs human review 3 blocking correctness issues found. This PR introduces substantial new Android-specific features (FAB, popup menu styling, platform-conditional screen presentations) that change runtime behavior. Additionally, unresolved review comments identify potential bugs with FAB positioning, split-view routing, and missing visual state indicators. You can customize Macroscope's approvability policy. Learn more. |
…enu arrows Selected menu options now use Android's native checkable rows (indicator on the right) with the theme swapping the square CheckBox for a check glyph, instead of injecting a left-side icon in JS. Popup backgrounds are fully opaque, and the filled-triangle submenu arrow is replaced with a stroked chevron via android:listMenuViewStyle. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Full-page card presentation with the in-screen header (title "New Thread", settings-style back chevron), empty feed canvas above, and ThreadComposer's floating composer chrome: collapsed pill with inline send that expands into the card on focus, no auto-focus. ComposerSurface is exported for reuse. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop the grouped card background under section headers on Android, and route SettingsRow/SettingsSwitchRow icons through the AppSymbol wrapper so leading icons and disclosure chevrons render on Android (with a new paintbrush mapping for the Appearance row). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
SettingsSection gains a card prop so the Appearance sections keep the grouped background while other Android settings stay flat. Environment rows (reconnect/remove) and the settings version row route icons through the AppSymbol wrapper so they render on Android. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
vp check --fix over the touched JS/JSON files and ktlint --format over the native module Kotlin sources (argument wrapping, trailing commas, line length), which were failing the Check and Mobile Native Static Analysis CI jobs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
expo-modules-core depends on expo-modules-jsi with a range (~56.0.10), so fresh resolution in the Release Smoke job picked the newly published 56.0.11 and the version-pinned patch went unused (ERR_PNPM_UNUSED_PATCH). Pin it via overrides like the existing @expo/metro-config entry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rototypes ktlint previously aborted the Mobile Native Static Analysis job before detekt ran; with ktlint green, detekt flags 16 pre-existing complexity findings (cyclomatic complexity, nesting depth, return counts, parameter counts) in the terminal/diff/composer native views. Suppress them at the function level rather than restructuring JNI signatures and touch/draw hot paths in a chrome-polish PR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Swap the remaining 27 direct expo-symbols imports (which render nothing on
Android) to the AppSymbol wrapper, add the missing SF-name mappings, and
teach the wrapper to resolve {ios, android} Material names so work-log,
terminal, and project-folder open/closed icons render correctly.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… on Android Disable (not remove) the long-press row menu on Android — swipe actions cover the same operations and Android's PopupMenu lacks the zoom-preview affordance. Project group headers drop the trailing chevron on Android; the open/closed folder icon carries the expanded state. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
GitOverview/GitCommit/GitBranches/GitConfirm and the Environments picker use card presentation with in-screen back headers on Android instead of iOS-style form sheets, matching Settings and New Thread. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Filter expo-development-client URLs out of navigation linking (they matched the NotFound wildcard on every dev launch), and pin the dev-server URL to localhost so the bundle loads over the adb USB tunnel instead of the flaky LAN path (repeated java.net.ConnectException). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| /> | ||
| {/* Android: the open/closed folder icon alone carries the expanded | ||
| state; iOS keeps the trailing chevron. */} | ||
| {Platform.OS === "android" ? null : ( |
There was a problem hiding this comment.
🟡 Medium threads/thread-list-items.tsx:100
On Android, the new Platform.OS === "android" ? null : … guard removes the trailing chevron from ThreadListGroupHeader on the assumption that the folder favicon conveys expanded/collapsed state. Once a project has a real favicon, ProjectFaviconImage hides the folder fallback entirely, so those headers lose the only visual expanded/collapsed indicator. If the favicon-alone design is intentional, consider documenting that or falling back to the chevron when the favicon image is loaded.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/mobile/src/features/threads/thread-list-items.tsx around line 100:
On Android, the new `Platform.OS === "android" ? null : …` guard removes the trailing chevron from `ThreadListGroupHeader` on the assumption that the folder favicon conveys expanded/collapsed state. Once a project has a real favicon, `ProjectFaviconImage` hides the folder fallback entirely, so those headers lose the only visual expanded/collapsed indicator. If the favicon-alone design is intentional, consider documenting that or falling back to the chevron when the favicon image is loaded.
- Add singleLineCentered prop for native vertical text centering - Match collapsed composer height to toolbar control height - Replace collapsed toolbar scroller with fixed three-control row - Show send button in expanded toolbar; shrink HomeHeader filter icon
- Replace COMPOSER_TOOLBAR_CONTROL_HEIGHT with 36 in NewTaskDraftScreen and ThreadComposer - Align collapsed editor height with iOS
- Archived Threads gets the app's Android header: back chevron, inline search field, and filter menu on one row with the standard header background, replacing the native centered search widget - Round + clip the archive group corners on the swipeable container so rows stay rounded mid-swipe - Widen swipe-action columns so "Unarchive" fits on one line - Build the home settings button like the filter button so the two circles match exactly Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Present git overview, commit, branches, and confirm as form sheets on Android - Remove redundant AndroidScreenHeader from git sheets - Fix home FAB clearance, archive search binding, and draft loading header - Hide native header on Environments; map push/pull icons; use pull-to-refresh on git overview
f38d3f1
into
pingdotgg:android-dev-pr-3514
Builds on #3579 (targets its branch).
Changes
:app:mergeExtDexDebug— the Expo template's 2GB Gradle heap is too small for this app's dependency set. A newwithAndroidGradleHeapconfig plugin applies-Xmx4096mso the fix survivesexpo prebuild.withAndroidModernPopupMenuconfig plugin restyles@react-native-menu/menupopups to the app palette: opaque rounded surfaces anchored below the trigger, native right-aligned check glyph on the selected option (replacing Android's square CheckBox), and a stroked>chevron for submenu arrows instead of the filled triangle.expo-blur.UI
Test plan
vp run android:devbuilds past dex merge and installs on a physical device🤖 Generated with Claude Code
Note
Low Risk
Mostly Android UI, build tooling, and styling; no auth or server changes. Navigation presentation differences are platform-scoped.
Overview
Android build and native chrome: Adds Expo config plugins to raise Gradle JVM heap to 4GB (fixes D8
mergeExtDexDebugOOM) and to restyle AppCompat popup menus (rounded themed surfaces, check glyphs, chevron submenu arrows). Registers both inapp.config.ts. Pinsexpo-modules-jsiand addsexpo-blurfor the working-duration pill.Navigation and sheets on Android: Settings, Connections, and the new-task flow use card presentation instead of form sheets, with in-screen
AndroidScreenHeaderwhere needed. Dev client deep links filter outexpo-development-clientso launches don’t hit NotFound.Home and lists: Bottom-right FAB for new task (header pencil removed on Android). Filter menus use native
state: "on"checks instead of✓prefixes. Thread rows skip long-press context menus on Android; project groups use folder open/closed icons without chevrons; swipe action width and labels adjusted.Composer: Native Android editor gains
singleLineCenteredfor collapsed pill layout.ThreadComposer/NewTaskDraftScreenshare floating pill → expanded card behavior on Android; collapsed toolbar shows a fixed three-control row.ComposerSurfaceis exported for reuse.Icons: App-wide
SymbolViewimports move toAppSymbol, which maps SF Symbols and Material names to Tabler on Android.Misc:
android:devforces localhost packager hostname; appearance settings sections use grouped cards on Android; archived threads get a custom Android header with inline search; git overview hides the corner refresh on Android (pull-to-refresh only).Reviewed by Cursor Bugbot for commit f38d3f1. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix Android OOM build issue and polish home, menu, and settings UI chrome
expo-symbolsimports with the local AppSymbol.tsx wrapper, which resolves icons via a material-name or SF-to-Tabler map on Android.AndroidHomeFabfloating action button on the home screen and moves 'New Task' out of the Android header; settings and connections screens now push as full-page cards on Android instead of detented sheets.singleLineCenteredprop to the nativeComposerEditorto vertically center the collapsed single-line input on Android;NewTaskDraftScreenadopts the same collapsible composer chrome used in the thread view.expo-modules-jsito56.0.10via a pnpm workspace override to resolve a dependency conflict.Macroscope summarized f38d3f1.