Skip to content

fix(mobile): Android build OOM fix + home/menu/settings chrome polish#3695

Merged
shivamhwp merged 17 commits into
pingdotgg:android-dev-pr-3514from
shivamhwp:android-dev-pr-3514
Jul 6, 2026
Merged

fix(mobile): Android build OOM fix + home/menu/settings chrome polish#3695
shivamhwp merged 17 commits into
pingdotgg:android-dev-pr-3514from
shivamhwp:android-dev-pr-3514

Conversation

@shivamhwp

@shivamhwp shivamhwp commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Builds on #3579 (targets its branch).

Changes

  • Fix D8 OutOfMemoryError in :app:mergeExtDexDebug — the Expo template's 2GB Gradle heap is too small for this app's dependency set. A new withAndroidGradleHeap config plugin applies -Xmx4096m so the fix survives expo prebuild.
  • Themed Android popup menuswithAndroidModernPopupMenu config plugin restyles @react-native-menu/menu popups 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.
  • Home screen FAB — bottom-right new-task FAB on Android, replacing the header pencil button.
  • Full-page settings on Android — card presentation with an in-screen back header instead of the iOS form sheet; option rows are listed flat (no grouped card) except on the Appearance page, and row icons/disclosure chevrons now render on Android.
  • New Thread page reads like a thread page — full-page card with the settings-style back header, empty feed canvas, and ThreadComposer's floating composer chrome: collapsed pill that expands on focus, same as an existing thread.
  • Working-duration pill — blurred backdrop via expo-blur.

UI

Settings New Thread Choose project

Test plan

  • vp run android:dev builds past dex merge and installs on a physical device
  • Home header menus show opaque themed popups with right-aligned checks and chevron submenu arrows
  • Settings opens as a full page with a working back button; row icons and chevrons visible
  • New Thread opens full-page with the collapsed composer pill that expands on tap

🤖 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 mergeExtDexDebug OOM) and to restyle AppCompat popup menus (rounded themed surfaces, check glyphs, chevron submenu arrows). Registers both in app.config.ts. Pins expo-modules-jsi and adds expo-blur for 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 AndroidScreenHeader where needed. Dev client deep links filter out expo-development-client so 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 singleLineCentered for collapsed pill layout. ThreadComposer / NewTaskDraftScreen share floating pill → expanded card behavior on Android; collapsed toolbar shows a fixed three-control row. ComposerSurface is exported for reuse.

Icons: App-wide SymbolView imports move to AppSymbol, which maps SF Symbols and Material names to Tabler on Android.

Misc: android:dev forces 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

  • Adds withAndroidGradleHeap.cjs Expo config plugin that sets Gradle JVM heap to 4096m and MaxMetaspace to 1024m to fix Android OOM build failures.
  • Adds withAndroidModernPopupMenu.cjs to apply custom styles, colors, and drawables for native Android popup/context menus.
  • Replaces all direct expo-symbols imports with the local AppSymbol.tsx wrapper, which resolves icons via a material-name or SF-to-Tabler map on Android.
  • Adds an AndroidHomeFab floating 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.
  • Adds singleLineCentered prop to the native ComposerEditor to vertically center the collapsed single-line input on Android; NewTaskDraftScreen adopts the same collapsible composer chrome used in the thread view.
  • Pins expo-modules-jsi to 56.0.10 via a pnpm workspace override to resolve a dependency conflict.

Macroscope summarized f38d3f1.

shivamhwp and others added 2 commits July 5, 2026 06:40
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>
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: dd7419a4-7949-455b-aacd-244691b0c8f0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jul 5, 2026
Comment thread apps/mobile/src/features/home/AndroidHomeFab.tsx
import { SymbolView } from "../../components/AppSymbol";
import { useThemeColor } from "../../lib/useThemeColor";

/**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread apps/mobile/src/Stack.tsx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium

const WORKSPACE_OVERLAY_ROUTES = new Set([

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.

@macroscopeapp

macroscopeapp Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

shivamhwp and others added 3 commits July 5, 2026 07:38
…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>
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Jul 5, 2026
Comment thread apps/mobile/src/features/threads/NewTaskDraftScreen.tsx
shivamhwp and others added 8 commits July 5, 2026 08:27
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>
@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:XL 500-999 changed lines (additions + deletions). labels Jul 5, 2026
/>
{/* Android: the open/closed folder icon alone carries the expanded
state; iOS keeps the trailing chevron. */}
{Platform.OS === "android" ? null : (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread apps/mobile/src/features/threads/git/gitSheetComponents.tsx
Comment thread apps/mobile/src/features/threads/git/GitBranchesSheet.tsx Outdated
Comment thread apps/mobile/src/Stack.tsx
shivamhwp and others added 3 commits July 6, 2026 04:44
- 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>
Comment thread apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx
Comment thread apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx
- 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
@shivamhwp shivamhwp merged commit f38d3f1 into pingdotgg:android-dev-pr-3514 Jul 6, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant