You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-09-16] [$250] Distance - The map is cropped after editing the odometer #95376
Version Number: 9.4.27-1 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#95039 Email or phone of affected tester (no customers):sustinov@applausemail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: iPhone 12 PRO/iOS 26.3 App Component: Money Requests
Action Performed:
Prerequisites:
Use an HT account in an existing WS
Steps:
Open ND app
Open FAB > Track distance > Odometer
Enter start and end reading > Save for later
Open FAB > Track distance > Odometer
Edit any value
Tap on the “Map” tab
Tap "Discard changes"
Expected Result:
The map should be fully visible in the window after editing the odometer
changed the title [-]Distance-The map is cropped after editing the odometer[/-][+]Distance - The map is cropped after editing the odometer[/+]on Jul 6, 2026
Please re-state the problem that we are trying to solve in this issue.
On iOS, the distance-request Map tab renders cropped (not full height) after a user edits an odometer reading and taps "Discard changes" to switch to the Map tab.
What is the root cause of that problem?
All distance tabs (Odometer / Map / Manual) share oneScreenWrapper in DistanceRequestStartPage.tsx:115, whose KeyboardAvoidingView is enabled only while the Odometer tab is selected:
When you edit an odometer field the keyboard is up, so the iOS KeyboardAvoidingView shrinks the shared container. Tapping Map triggers the unsaved-changes discard guard, and on Discard the navigator does TabActions.jumpTo(Map) and lazily mounts the Map tab while the container is still keyboard-shrunk — the tab navigator uses keyboardDismissMode="none", so the keyboard/KAV state hasn't collapsed yet.
The map itself has no measured/pixel height — it's flex: 1 + minHeight: 300 with overflow: 'hidden'. So it lays out into the reduced height at mount and never re-measures once the keyboard closes and the KAV disables → it stays cropped.
Map is flex-only, no captured height: mapViewContainer (flex1 + minHeight:300) / mapView (flex1, overflow:'hidden') in src/styles/index.ts.
Flow: odometer keyboard up → KAV shrinks shared container → tap Map → discard guard → jumpTo(Map) lazy-mounts Map inside the still-shrunk container → map lays out short → keyboard closes but map never re-measures → cropped.
What changes do you think we should make in order to solve the problem?
Ensure the shared container is at full height before the Map tab mounts, or force the map to re-measure after the switch. Options, cheapest first:
Dismiss the keyboard before jumping tabs on discard so the KAV collapses before the Map tab lazy-mounts (e.g. call Keyboard.dismiss() in the discard path in OnyxTabNavigator.tsx / the odometer discard handler, and let the KAV settle before jumpTo).
Force the map to re-layout on tab change — key the map container on selectedTab, or trigger a remeasure when the Map tab gains focus, so it re-reads the (now full) container height.
⚠️Confidence: Medium. Root cause is confirmed by code, but the exact iOS timing (KAV still enabled via async selectedTab vs. residual keyboard height at mount) should be confirmed with an on-device repro before locking in option 1 vs 2.
What alternative solutions did you explore?
The bug is not a stale onLayout pixel-height snapshot (the initial hypothesis) — the map captures no height; it's cross-tab container-height contamination. A remeasure/remount of the map is the reliable fallback if the keyboard-dismiss timing proves flaky.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/95376) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
Please re-state the problem that we are trying to solve in this issue.
After editing a saved odometer draft and switching to the Map tab, confirming “Discard changes” displays the map cropped on iOS.
What is the root cause of that problem?
In src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx, the focused odometer TextInput opens the keyboard. The useDiscardChangesConfirmation flow allows the pending tab navigation to continue after confirmation without dismissing that keyboard, so the map mounts using the keyboard-reduced viewport.
What changes do you think we should make in order to solve the problem?
Update IOURequestStepDistanceOdometer to call Keyboard.dismiss() when the discard confirmation becomes visible (while retaining setIsDiscardModalVisible). This ensures the viewport is restored before the confirmed navigation displays the Map tab. Keep the existing onCancel behavior that refocuses the last input if the user chooses to remain on the odometer screen.
What alternative solutions did you explore? (Optional)
Dismissing the keyboard inside the map screen would mask the stale state, but the odometer screen that owns the focused input should clean it up before navigation.
Please re-state the problem that we are trying to solve in this issue.
On the Odometer distance tab, if the user edits an odometer reading (opening the keyboard), then taps the "Map" tab and confirms "Discard changes" in the resulting modal, the Map tab renders with its bottom portion cropped/covered instead of filling the available space.
What is the root cause of that problem?
DistanceRequestStartPage wraps all four distance tabs (Map, Manual, GPS, Odometer) in a single ScreenWrapper/KeyboardAvoidingView, and only enables keyboard avoidance while the Odometer tab is selected:
The tab navigator that hosts these tabs explicitly disables keyboard dismissal on tab switch, so focus (and the native keyboard) stays exactly as it was when the user taps another tab:
When the discard-changes modal is confirmed after editing an odometer reading, handleTabSwitchDiscard only clears the odometer reading/image state — it never blurs the still-focused reading input or dismisses the keyboard — before the navigator jumps to the Map tab:
// Clear typing guard so draft re-hydration can resync readings into the inputs on return.
userHasUnsavedTypingRef.current=false;
resetOdometerLocalState();
setFormError('');
};
Because the Odometer TextInput is still focused and keyboardDismissMode="none" prevents the keyboard from closing on its own, the native keyboard remains visible after the jump to Map. But selectedTab has already flipped to distance-map, so shouldEnableKeyboardAvoidingView becomes false for the shared KeyboardAvoidingView. With avoidance disabled, the Map tab's container no longer shrinks to make room for the still-open keyboard, so the keyboard visually overlaps and crops the bottom of the map.
What changes do you think we should make in order to solve the problem?
Dismiss the keyboard when the odometer tab-switch discard runs, so the keyboard is actually closed by the time the Map tab (with keyboard avoidance disabled) becomes active, matching the shouldEnableKeyboardAvoidingView state to the real keyboard state.
🚨 Edited by proposal-police: This proposal was edited at 2026-07-06 10:51:50 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On iOS, after editing odometer readings on the Odometer tab and switching to the Map tab via "Discard changes", the map preview renders cropped (smaller than the available space) instead of filling its container. The bug is a regression introduced by PR #95039 which added the discard-confirmation flow to IOURequestStepDistanceOdometer.
What is the root cause of that problem?
The root cause is a layout-race specific to iOS triggered by three interacting mechanisms in the Odometer→Map tab-switch discard flow:
1. DistanceRequestStartPage.tsx:115 — keyboard-avoidance is gated on a stale Onyx value
selectedTab is read from Onyx (CONST.TAB.DISTANCE_REQUEST_TYPE). It switches from DISTANCE_ODOMETER to DISTANCE_MAP only after OnyxTabNavigator's state listener fires Tab.setSelectedTab(...) — an asynchronous Onyx write that happens after the React Navigation state has already been updated and the Map tab has been mounted.
2. OnyxTabNavigator.tsx — keyboardDismissMode="none" keeps the keyboard visible
<TopTab.NavigatorkeyboardDismissMode="none"...>
The keyboard does not auto-dismiss when the user taps the tab bar. The confirm modal shown by OnyxTabNavigator.handleTabPress is a React Native component modal (not a native UIAlertController), so it also does not dismiss the keyboard on iOS.
3. IOURequestStepDistanceOdometer.tsx:~513 — handleTabSwitchDiscard never dismisses the keyboard
But the Mapbox native iOS view has already latched the reduced measurement and does not re-fit → map appears cropped.
Note: The correct parent component is DistanceRequestStartPage (used in the Track Distance create flow with DISTANCE_MAP/DISTANCE_ODOMETER/DISTANCE_GPS/DISTANCE_MANUAL tabs). This is notIOURequestStepDistance, which is only used in the edit flow and has no shouldEnableKeyboardAvoidingView condition on tab selection.
What changes do you think we should make in order to solve the problem?
Add Keyboard.dismiss() as the first line of handleTabSwitchDiscard. This dismisses the keyboard synchronously before any Onyx writes or navigation, ensuring the map container measures at full screen height when the Map tab mounts:
consthandleTabSwitchDiscard=()=>{Keyboard.dismiss();// dismiss before navigation so the Map tab mounts with full heightsetMoneyRequestOdometerReading(transactionID,null,null,isTransactionDraft);removeMoneyRequestOdometerImage(transaction,CONST.IOU.ODOMETER_IMAGE_TYPE.START,isTransactionDraft,true);removeMoneyRequestOdometerImage(transaction,CONST.IOU.ODOMETER_IMAGE_TYPE.END,isTransactionDraft,true);userHasUnsavedTypingRef.current=false;resetOdometerLocalState();setFormError('');};
With this fix: keyboard is gone before guard.onDiscard() returns → when navigation.dispatch(TabActions.jumpTo('DISTANCE_MAP')) fires, the keyboard is already invisible → even though shouldEnableKeyboardAvoidingView is briefly still true (stale Onyx), the KeyboardAvoidingView has no effect because the keyboard height is 0 → map container measures at full height → no cropping.
Secondary safety net (optional, increases robustness) — src/components/DistanceRequest/DistanceRequestFooter.tsx:
The DistanceRequestFooter map container renders DistanceMapView inside a <View style={[styles.mapViewContainer, mapContainerStyle]}> (flex: 1, minHeight: 300). On iOS, the Mapbox native view latches its first-measured height. Adding an onLayout callback that calls fitBounds/setCamera on the map's camera ref when the container dimensions change would make the map self-healing against any future layout races. This is a defensive layer, not the root-cause fix.
Verify no regression on sibling discard flows:
Manual → Odometer (within DistanceRequestStartPage): no discard guard currently, not affected.
Map → Odometer and Odometer → GPS: no discard guard currently, not affected.
IOURequestStepDistance edit flow (Map ↔ Manual): uses a separate OnyxTabNavigator with CONST.TAB.DISTANCE_EDIT_TYPE; IOURequestStepDistance's useDiscardChangesConfirmation has no onTabSwitchDiscard handler, so this flow is not affected.
What alternative solutions did you explore?
Dispatch the tab jump first, then run onDiscard: Would flip the order in OnyxTabNavigator.handleTabPress, so the Map tab renders before the odometer state is cleared. This is a UX regression — the user would briefly see the odometer data still present on the Map tab while handleTabSwitchDiscard clears it, and it doesn't fix the keyboard-avoidance race.
Defer the Onyx writes in handleTabSwitchDiscard (e.g., wrap in InteractionManager.runAfterInteractions): The keyboard would still be visible when the Map tab mounts, so the crop would persist.
Remove keyboardDismissMode="none" from OnyxTabNavigator: Too broad a change; keyboardDismissMode="none" is the intentional behavior for other tab navigators that shouldn't auto-dismiss the keyboard on tab switch.
🚨 Edited by proposal-police: This proposal was edited at 2026-07-06 10:54:59 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On iOS, if you start a distance expense with the Odometer tab, save it, then reopen it and edit a reading, switching over to the Map tab and tapping "Discard changes" leaves the map cropped instead of filling the window. It only happens after the odometer has been edited, and only in the native iOS app.
What is the root cause of that problem?
In the create flow (FAB > Track distance), all three tabs share a single ScreenWrapper in src/pages/iou/request/DistanceRequestStartPage.tsx. Each tab's own StepScreenWrapper is skipped here because shouldShowWrapper={!isCreatingNewRequest} is false during creation, so this shared wrapper holds the one and only KeyboardAvoidingView for the whole navigator.
The Map tab stays mounted the whole time (it's the default tab), and its mapViewContainer is {flex: 1, minHeight: 300}. When you edit an odometer reading the keyboard opens and the shared KAV shrinks the shared container, which is also hosting that still-mounted map. Then you switch to Map and hit "Discard changes", which flips enabled from true back to false on that same KAV right as the keyboard is dismissing. On iOS the container and the underlying Mapbox view don't reclaim the full height, so the map renders at the shrunken size. This isn't a data problem (Discard clears the readings, but the symptom is the map's size, not its values), and it isn't the linked PR #95039, which only touched odometer reading logic and a hook test. The enabled toggle came in with 1a271c6 ("Fix: Enable keyboard avoiding view for Odometer tab"), where the shared wrapper went from ={false} to being tab-conditional. It fixed the odometer's own keyboard handling but tied the map-hosting container's height to the odometer keyboard.
One caveat: this is a native layout/timing bug, so I've flagged the fix location as the best-supported hypothesis and it needs an iOS build to confirm before we commit to it.
What changes do you think we should make in order to solve the problem?
Stop letting the odometer keyboard drive the shared container. Set the shared ScreenWrapper back to shouldEnableKeyboardAvoidingView={false} (its value before 1a271c6), and give the Odometer tab its own KeyboardAvoidingView wrapping just its input View inside IOURequestStepDistanceOdometer. That keeps the odometer's keyboard handling working while the Map-hosting container's height is no longer coupled to it, so switching back to the map can't leave it shrunken. This needs an iOS screenshot/video to verify since it's not meaningfully Jest-testable.
What alternative solutions did you explore? (Optional)
Always enabling the shared KAV (shouldEnableKeyboardAvoidingView={true}) fixes the toggle but changes keyboard behavior for the Map, Manual, and GPS tabs too. Manual has no KAV by design, so this broadens behavior across tabs that were never in scope. I'd rather scope the KAV to the tab that actually needs it than change the shared wrapper for everyone.
🚨 Edited by proposal-police: This proposal was edited at 2026-07-06 11:00:13 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
In the Track distance flow, after editing an odometer reading and confirming "Discard changes" when tapping the Map tab, the Map tab renders vertically cropped — the bottom of the screen (roughly one keyboard height) stays blank/squeezed until the flow is reopened.
What is the root cause of that problem?
All four distance tabs share one ScreenWrapper, and its KeyboardAvoidingView is enabled only while the Odometer tab is selected:
Editing a reading opens the numeric keyboard, so the KAV applies paddingBottom ≈ keyboard height to the entire screen content.
Tapping the Map tab is intercepted by the tab-switch guard, which shows the discard modal (OnyxTabNavigator.tsx#L169-L206). Nothing blurs the odometer input, so the keyboard (and the padding) stays.
On confirm, the guard runs handleTabSwitchDiscard — which only clears the draft, never dismisses the keyboard (IOURequestStepDistanceOdometer.tsx#L513-L521) — then dispatches jumpTo. The tab-state listener writes the new tab to Onyx (OnyxTabNavigator.tsx#L265), the page re-renders, and the gate flips enabled to false while the keyboard is still on screen.
Here is the mechanism that makes the crop permanent. RNKC's KAV worklet early-returns when disabled — if (!enabled) return {} (upstream KeyboardAvoidingView/index.tsx#L168-L170 at 1.21.0; identical in the pinned 1.21.0-beta.1). Reanimated's styleUpdater only applies the keys the worklet returns — keys omitted from the new object are never reset (useAnimatedStyle.ts, reanimated 4.3.1: updateProps receives only newValues). So the last non-zero paddingBottom stays baked onto the native view. Worse, once disabled the worklet no longer reads keyboard.progress, so the later keyboard-hide animation can't update it either. Nothing ever writes paddingBottom: 0 again.
Structural cause: the shared KAV's enabled flag is derived from the selected tab alone, so it can turn off while the keyboard it was avoiding is still up — and disabling this KAV mid-keyboard leaks the applied padding permanently. This explains every detail: the crop equals the keyboard height, it appears exactly after "Discard changes" (the only step that flips the tab under an open keyboard), and it persists after the keyboard closes. The linked PR #95039 only changed the odometer typing-guard baseline; it surfaced this in QA but didn't create the mechanism.
Affected paths (all covered by the fix below):
The reported discard path, to any destination tab — Map, Manual, or GPS all render cropped.
The no-modal path: edit a reading and revert it to the saved value (after #95039 that counts as "no unsaved changes"), or just focus without typing, then tap another tab — switches instantly with the keyboard open, same freeze, no discard modal involved.
Android: same shared component (index.android.tsx), so the hardware-back guard path is also exposed; the platform checkbox reflects where QA found it.
What changes do you think we should make in order to solve the problem?
Keep the KAV enabled until the keyboard has fully closed, at the single gate every path converges on (DistanceRequestStartPage.tsx#L115):
isKeyboardShown only flips false on keyboardDidHide — after the hide animation completes (withKeyboardState.tsx#L50-L53) — so the worklet keeps tracking keyboard.progress, animates the padding back to 0, and the KAV is only disabled once the padding is already 0, which makes the disable a no-op by construction. I'd also add Keyboard.dismiss() inside handleTabSwitchDiscard so the keyboard visibly retracts with the modal instead of lingering over the map for a beat.
Regression safety: the odometer tab is unchanged, and on the other tabs the KAV was previously inert, so the only delta is keyboard-avoidance while a keyboard is actually visible — the standard expectation.
Why the obvious spot-fix fails: calling Keyboard.dismiss() before jumpTo in the discard branch only starts the hide animation; jumpTo writes the selected tab to Onyx and the re-render flips enabled to false a frame later, while keyboard.progress is still mid-flight — the worklet returns {} and Reanimated never resets the already-applied padding, so a (slightly smaller) crop remains. Awaiting full dismissal before switching would fix only this path, delays every discard by the keyboard animation, and misses the no-modal edit-revert path entirely.
What alternative solutions did you explore? (Optional)
Strictly-scoped latch — keep the KAV enabled only while leaving the odometer tab with a keyboard open (usePrevious(selectedTab)), guaranteeing zero behavior change on Manual/GPS typing. Slightly more code; happy to use this variant if preferred.
Fix the leak at the source — patch react-native-keyboard-controller's KAV (patch-package + upstream PR) to return explicit resets ({paddingBottom: 0}) when disabled. Protects every ScreenWrapper that toggles shouldEnableKeyboardAvoidingView dynamically (e.g. ReportScreen, CreateDistanceRatePage), but edits a vendored dependency for what today reproduces in one flow.
Dismiss-then-navigate in OnyxTabNavigator — the spot fix competitors will propose; incomplete for the reasons above.
On iOS, after editing an odometer reading and switching to the Map tab via "Discard changes", the map mounts at a keyboard-shrunk height and stays cropped.
All distance tabs share one ScreenWrapper / KeyboardAvoidingView in DistanceRequestStartPage. Keyboard avoidance is enabled only while the Odometer tab is selected:
// Clear typing guard so draft re-hydration can resync readings into the inputs on return.
userHasUnsavedTypingRef.current=false;
resetOdometerLocalState();
setFormError('');
};
So the Map tab lazy-mounts while the keyboard is still up and the shared KAV is still shrinking the container. The Mapbox view latches that reduced height and does not reclaim full space once the keyboard finally closes, which is why the map looks cropped.
This is not a fitBounds / waypoint camera bug. ConfirmedRoute and MapView are not the failing path here; the container height is wrong at mount time.
What changes do you think we should make in order to solve the problem?
Dismiss the keyboard early enough that the shared KAV has full height before Map mounts.
In OnyxTabNavigator.handleTabPress, call Keyboard.dismiss() when the discard modal opens (before showConfirmModal). That gives the KAV time to reclaim height while the user confirms:
In IOURequestStepDistanceOdometer.handleTabSwitchDiscard, call Keyboard.dismiss() again before clearing odometer state, so the keyboard is gone by the time jumpTo(Map) runs:
Cancel can keep restoring focus via the existing onCancel / restoreLastInputFocus path, so staying on Odometer still brings the keyboard back.
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
🚨 Edited by proposal-police: This proposal was edited at 2026-07-06 10:50:28 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
In the Track distance flow, after opening the Odometer tab, editing a reading, switching to the Map tab and confirming "Discard changes", the map on the Map tab renders cropped instead of filling its container. iOS only.
What is the root cause of that problem?
The Track distance tabs are hosted by DistanceRequestStartPage inside an OnyxTabNavigator that is created with lazyLoadEnabled, so the Map tab (and the native DistanceMapView inside it) is not mounted until the first time it is shown:
When the user edits the Odometer reading (keyboard shown) and taps Map, the switch goes through the discard-changes confirmation and then TabActions.jumpTo(DISTANCE_MAP), so the Map tab mounts for the first time in the middle of that transition. At that instant selectedTab is still DISTANCE_ODOMETER (it updates asynchronously through Onyx afterward), so shouldEnableKeyboardAvoidingView is still true and the map's container is laid out while the odometer keyboard-avoiding inset is still collapsing. The native Mapbox view captures this transitional (shorter) frame here:
Once the transition settles and the container grows back to its flex1 + minHeight: 300 size, the native map view keeps its initial frame and does not re-measure, so it stays cropped. It reproduces on iOS specifically because the native map view retains its initial frame across this layout change instead of re-laying out.
What changes do you think we should make in order to solve the problem?
Make the map re-initialize against its real container size by remounting DistanceMapView whenever the measured height of mapViewContainer changes. In DistanceRequestFooter, measure the container with onLayout and key the map on that height:
Because the container is measured at the transitional (cropped) height first and then again at its settled height, the key change on the second layout remounts the native map so it initializes against the correct size and fills the container. Stable layouts produce no further remounts, so there is no extra reload during normal use.
What specific scenarios should we cover in automated tests to prevent this bug from happening again in the future? (if applicable)
Render DistanceRequestFooter, fire onLayout on the map container with a small height and then with the final height, and assert the DistanceMapViewkey (its measured container height) updates so the map remounts on the settled height.
This is primarily a native-layout regression, so it should also be covered by a manual iOS check of the exact repro steps.
What alternative solutions did you explore? (Optional)
Scope the KeyboardAvoidingView to the Odometer tab only instead of enabling it for the whole tab navigator via selectedTab, so the Map tab is never laid out under the odometer keyboard inset. That removes the trigger at its source, but it is a broader structural change to DistanceRequestStartPage/the odometer screen, whereas keying the map on its measured height fixes the cropped render regardless of what caused the wrong-height mount.
📣 @eswar5678! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Activity
applause-bot commentedon Jul 6, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/3fb89f8f4873d8b13cf72633d3eb01737c51257e83937fe8e3c8d6f96697715e
[-]Distance-The map is cropped after editing the odometer[/-][+]Distance - The map is cropped after editing the odometer[/+]MelvinBot commentedon Jul 6, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On iOS, the distance-request Map tab renders cropped (not full height) after a user edits an odometer reading and taps "Discard changes" to switch to the Map tab.
What is the root cause of that problem?
All distance tabs (Odometer / Map / Manual) share one
ScreenWrapperinDistanceRequestStartPage.tsx:115, whoseKeyboardAvoidingViewis enabled only while the Odometer tab is selected:When you edit an odometer field the keyboard is up, so the iOS
KeyboardAvoidingViewshrinks the shared container. Tapping Map triggers the unsaved-changes discard guard, and on Discard the navigator doesTabActions.jumpTo(Map)and lazily mounts the Map tab while the container is still keyboard-shrunk — the tab navigator useskeyboardDismissMode="none", so the keyboard/KAV state hasn't collapsed yet.The map itself has no measured/pixel height — it's
flex: 1+minHeight: 300withoverflow: 'hidden'. So it lays out into the reduced height at mount and never re-measures once the keyboard closes and the KAV disables → it stays cropped.Evidence & data flow
DistanceRequestStartPage.tsx:114-115BaseKeyboardAvoidingView/index.ios.tsx(usesreact-native-keyboard-controller) — explains why the repro is iOS-specific.jumpTowithout dismissing keyboard, lazy mount:OnyxTabNavigator.tsxandkeyboardDismissMode="none"atOnyxTabNavigator.tsx:243.IOURequestStepDistanceOdometer.tsx:513.mapViewContainer(flex1+minHeight:300) /mapView(flex1,overflow:'hidden') insrc/styles/index.ts.Flow: odometer keyboard up → KAV shrinks shared container → tap Map → discard guard →
jumpTo(Map)lazy-mounts Map inside the still-shrunk container → map lays out short → keyboard closes but map never re-measures → cropped.What changes do you think we should make in order to solve the problem?
Ensure the shared container is at full height before the Map tab mounts, or force the map to re-measure after the switch. Options, cheapest first:
Keyboard.dismiss()in the discard path inOnyxTabNavigator.tsx/ the odometer discard handler, and let the KAV settle beforejumpTo).selectedTab, or trigger a remeasure when the Map tab gains focus, so it re-reads the (now full) container height.What alternative solutions did you explore?
The bug is not a stale
onLayoutpixel-height snapshot (the initial hypothesis) — the map captures no height; it's cross-tab container-height contamination. A remeasure/remount of the map is the reliable fallback if the keyboard-dismiss timing proves flaky.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/95376)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
kitvasyl commentedon Jul 6, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
After editing a saved odometer draft and switching to the Map tab, confirming “Discard changes” displays the map cropped on iOS.
What is the root cause of that problem?
In
src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx, the focused odometerTextInputopens the keyboard. TheuseDiscardChangesConfirmationflow allows the pending tab navigation to continue after confirmation without dismissing that keyboard, so the map mounts using the keyboard-reduced viewport.What changes do you think we should make in order to solve the problem?
Update
IOURequestStepDistanceOdometerto callKeyboard.dismiss()when the discard confirmation becomes visible (while retainingsetIsDiscardModalVisible). This ensures the viewport is restored before the confirmed navigation displays the Map tab. Keep the existingonCancelbehavior that refocuses the last input if the user chooses to remain on the odometer screen.What alternative solutions did you explore? (Optional)
Dismissing the keyboard inside the map screen would mask the stale state, but the odometer screen that owns the focused input should clean it up before navigation.
abbasifaizan70 commentedon Jul 6, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the Odometer distance tab, if the user edits an odometer reading (opening the keyboard), then taps the "Map" tab and confirms "Discard changes" in the resulting modal, the Map tab renders with its bottom portion cropped/covered instead of filling the available space.
What is the root cause of that problem?
DistanceRequestStartPagewraps all four distance tabs (Map, Manual, GPS, Odometer) in a singleScreenWrapper/KeyboardAvoidingView, and only enables keyboard avoidance while the Odometer tab is selected:App/src/pages/iou/request/DistanceRequestStartPage.tsx
Lines 114 to 119 in fec6b33
The tab navigator that hosts these tabs explicitly disables keyboard dismissal on tab switch, so focus (and the native keyboard) stays exactly as it was when the user taps another tab:
App/src/libs/Navigation/OnyxTabNavigator.tsx
Lines 241 to 244 in fec6b33
When the discard-changes modal is confirmed after editing an odometer reading,
handleTabSwitchDiscardonly clears the odometer reading/image state — it never blurs the still-focused reading input or dismisses the keyboard — before the navigator jumps to the Map tab:App/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx
Lines 513 to 521 in fec6b33
Because the Odometer
TextInputis still focused andkeyboardDismissMode="none"prevents the keyboard from closing on its own, the native keyboard remains visible after the jump to Map. ButselectedTabhas already flipped todistance-map, soshouldEnableKeyboardAvoidingViewbecomesfalsefor the sharedKeyboardAvoidingView. With avoidance disabled, the Map tab's container no longer shrinks to make room for the still-open keyboard, so the keyboard visually overlaps and crops the bottom of the map.What changes do you think we should make in order to solve the problem?
Dismiss the keyboard when the odometer tab-switch discard runs, so the keyboard is actually closed by the time the Map tab (with keyboard avoidance disabled) becomes active, matching the
shouldEnableKeyboardAvoidingViewstate to the real keyboard state.App/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx
Lines 513 to 521 in fec6b33
aswin-s commentedon Jul 6, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-07-06 10:51:50 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On iOS, after editing odometer readings on the Odometer tab and switching to the Map tab via "Discard changes", the map preview renders cropped (smaller than the available space) instead of filling its container. The bug is a regression introduced by PR #95039 which added the discard-confirmation flow to
IOURequestStepDistanceOdometer.What is the root cause of that problem?
The root cause is a layout-race specific to iOS triggered by three interacting mechanisms in the Odometer→Map tab-switch discard flow:
1.
DistanceRequestStartPage.tsx:115— keyboard-avoidance is gated on a stale Onyx valueselectedTabis read from Onyx (CONST.TAB.DISTANCE_REQUEST_TYPE). It switches fromDISTANCE_ODOMETERtoDISTANCE_MAPonly afterOnyxTabNavigator'sstatelistener firesTab.setSelectedTab(...)— an asynchronous Onyx write that happens after the React Navigation state has already been updated and the Map tab has been mounted.2.
OnyxTabNavigator.tsx—keyboardDismissMode="none"keeps the keyboard visibleThe keyboard does not auto-dismiss when the user taps the tab bar. The confirm modal shown by
OnyxTabNavigator.handleTabPressis a React Native component modal (not a native UIAlertController), so it also does not dismiss the keyboard on iOS.3.
IOURequestStepDistanceOdometer.tsx:~513—handleTabSwitchDiscardnever dismisses the keyboardOrdered event timeline that produces the crop:
keyboardDismissMode="none"keeps keyboard visible.handleTabSwitchDiscard()runs; keyboard is still visible.navigation.dispatch(TabActions.jumpTo('DISTANCE_MAP'))fires (in thePromise.resolve().then(guard.onDiscard).then(dispatch)chain).IOURequestStepDistanceMap) mounts. At this moment:selectedTabin Onyx is stillDISTANCE_ODOMETER(Onyx write from step 9 hasn't landed).shouldEnableKeyboardAvoidingView={true}is still active inDistanceRequestStartPage.KeyboardAvoidingViewinScreenWrapperreduces the available height by the keyboard height.styles.mapViewContainer = {flex: 1, minHeight: 300}inDistanceRequestFooter) measures itself at this keyboard-reduced height.Tab.setSelectedTab(id, 'DISTANCE_MAP')Onyx write lands →selectedTab = DISTANCE_MAP→shouldEnableKeyboardAvoidingView=false→ScreenWrapperregains full height.Note: The correct parent component is
DistanceRequestStartPage(used in the Track Distance create flow with DISTANCE_MAP/DISTANCE_ODOMETER/DISTANCE_GPS/DISTANCE_MANUAL tabs). This is notIOURequestStepDistance, which is only used in the edit flow and has noshouldEnableKeyboardAvoidingViewcondition on tab selection.What changes do you think we should make in order to solve the problem?
Primary fix —
src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx:~513:Add
Keyboard.dismiss()as the first line ofhandleTabSwitchDiscard. This dismisses the keyboard synchronously before any Onyx writes or navigation, ensuring the map container measures at full screen height when the Map tab mounts:With this fix: keyboard is gone before
guard.onDiscard()returns → whennavigation.dispatch(TabActions.jumpTo('DISTANCE_MAP'))fires, the keyboard is already invisible → even thoughshouldEnableKeyboardAvoidingViewis briefly stilltrue(stale Onyx), theKeyboardAvoidingViewhas no effect because the keyboard height is 0 → map container measures at full height → no cropping.Secondary safety net (optional, increases robustness) —
src/components/DistanceRequest/DistanceRequestFooter.tsx:The
DistanceRequestFootermap container rendersDistanceMapViewinside a<View style={[styles.mapViewContainer, mapContainerStyle]}>(flex: 1, minHeight: 300). On iOS, the Mapbox native view latches its first-measured height. Adding anonLayoutcallback that callsfitBounds/setCameraon the map's camera ref when the container dimensions change would make the map self-healing against any future layout races. This is a defensive layer, not the root-cause fix.Verify no regression on sibling discard flows:
DistanceRequestStartPage): no discard guard currently, not affected.IOURequestStepDistanceedit flow (Map ↔ Manual): uses a separateOnyxTabNavigatorwithCONST.TAB.DISTANCE_EDIT_TYPE;IOURequestStepDistance'suseDiscardChangesConfirmationhas noonTabSwitchDiscardhandler, so this flow is not affected.What alternative solutions did you explore?
onDiscard: Would flip the order inOnyxTabNavigator.handleTabPress, so the Map tab renders before the odometer state is cleared. This is a UX regression — the user would briefly see the odometer data still present on the Map tab whilehandleTabSwitchDiscardclears it, and it doesn't fix the keyboard-avoidance race.handleTabSwitchDiscard(e.g., wrap inInteractionManager.runAfterInteractions): The keyboard would still be visible when the Map tab mounts, so the crop would persist.keyboardDismissMode="none"fromOnyxTabNavigator: Too broad a change;keyboardDismissMode="none"is the intentional behavior for other tab navigators that shouldn't auto-dismiss the keyboard on tab switch.shivang-goliyan commentedon Jul 6, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-07-06 10:54:59 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On iOS, if you start a distance expense with the Odometer tab, save it, then reopen it and edit a reading, switching over to the Map tab and tapping "Discard changes" leaves the map cropped instead of filling the window. It only happens after the odometer has been edited, and only in the native iOS app.
What is the root cause of that problem?
In the create flow (FAB > Track distance), all three tabs share a single
ScreenWrapperinsrc/pages/iou/request/DistanceRequestStartPage.tsx. Each tab's ownStepScreenWrapperis skipped here becauseshouldShowWrapper={!isCreatingNewRequest}is false during creation, so this shared wrapper holds the one and onlyKeyboardAvoidingViewfor the whole navigator.That KAV is turned on for just the Odometer tab:
The Map tab stays mounted the whole time (it's the default tab), and its
mapViewContaineris{flex: 1, minHeight: 300}. When you edit an odometer reading the keyboard opens and the shared KAV shrinks the shared container, which is also hosting that still-mounted map. Then you switch to Map and hit "Discard changes", which flipsenabledfrom true back to false on that same KAV right as the keyboard is dismissing. On iOS the container and the underlying Mapbox view don't reclaim the full height, so the map renders at the shrunken size. This isn't a data problem (Discard clears the readings, but the symptom is the map's size, not its values), and it isn't the linked PR #95039, which only touched odometer reading logic and a hook test. Theenabledtoggle came in with 1a271c6 ("Fix: Enable keyboard avoiding view for Odometer tab"), where the shared wrapper went from={false}to being tab-conditional. It fixed the odometer's own keyboard handling but tied the map-hosting container's height to the odometer keyboard.One caveat: this is a native layout/timing bug, so I've flagged the fix location as the best-supported hypothesis and it needs an iOS build to confirm before we commit to it.
What changes do you think we should make in order to solve the problem?
Stop letting the odometer keyboard drive the shared container. Set the shared
ScreenWrapperback toshouldEnableKeyboardAvoidingView={false}(its value before 1a271c6), and give the Odometer tab its ownKeyboardAvoidingViewwrapping just its inputViewinsideIOURequestStepDistanceOdometer. That keeps the odometer's keyboard handling working while the Map-hosting container's height is no longer coupled to it, so switching back to the map can't leave it shrunken. This needs an iOS screenshot/video to verify since it's not meaningfully Jest-testable.What alternative solutions did you explore? (Optional)
Always enabling the shared KAV (
shouldEnableKeyboardAvoidingView={true}) fixes the toggle but changes keyboard behavior for the Map, Manual, and GPS tabs too. Manual has no KAV by design, so this broadens behavior across tabs that were never in scope. I'd rather scope the KAV to the tab that actually needs it than change the shared wrapper for everyone.ahmdshrif commentedon Jul 6, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-07-06 11:00:13 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
In the Track distance flow, after editing an odometer reading and confirming "Discard changes" when tapping the Map tab, the Map tab renders vertically cropped — the bottom of the screen (roughly one keyboard height) stays blank/squeezed until the flow is reopened.
What is the root cause of that problem?
All four distance tabs share one
ScreenWrapper, and its KeyboardAvoidingView is enabled only while the Odometer tab is selected:DistanceRequestStartPage.tsx#L114-L119—shouldEnableKeyboardAvoidingView={selectedTab === CONST.TAB_REQUEST.DISTANCE_ODOMETER}. This wraps the whole tab navigator in one KAV (ScreenWrapperContainer.tsx#L232-L239, behaviorpadding), which on iOS/Android isreact-native-keyboard-controller's KAV (BaseKeyboardAvoidingView/index.ios.tsx).paddingBottom ≈ keyboard heightto the entire screen content.OnyxTabNavigator.tsx#L169-L206). Nothing blurs the odometer input, so the keyboard (and the padding) stays.handleTabSwitchDiscard— which only clears the draft, never dismisses the keyboard (IOURequestStepDistanceOdometer.tsx#L513-L521) — then dispatchesjumpTo. The tab-state listener writes the new tab to Onyx (OnyxTabNavigator.tsx#L265), the page re-renders, and the gate flipsenabledto false while the keyboard is still on screen.if (!enabled) return {}(upstreamKeyboardAvoidingView/index.tsx#L168-L170at 1.21.0; identical in the pinned1.21.0-beta.1). Reanimated'sstyleUpdateronly applies the keys the worklet returns — keys omitted from the new object are never reset (useAnimatedStyle.ts, reanimated 4.3.1:updatePropsreceives onlynewValues). So the last non-zeropaddingBottomstays baked onto the native view. Worse, once disabled the worklet no longer readskeyboard.progress, so the later keyboard-hide animation can't update it either. Nothing ever writespaddingBottom: 0again.Structural cause: the shared KAV's
enabledflag is derived from the selected tab alone, so it can turn off while the keyboard it was avoiding is still up — and disabling this KAV mid-keyboard leaks the applied padding permanently. This explains every detail: the crop equals the keyboard height, it appears exactly after "Discard changes" (the only step that flips the tab under an open keyboard), and it persists after the keyboard closes. The linked PR#95039only changed the odometer typing-guard baseline; it surfaced this in QA but didn't create the mechanism.Affected paths (all covered by the fix below):
#95039that counts as "no unsaved changes"), or just focus without typing, then tap another tab — switches instantly with the keyboard open, same freeze, no discard modal involved.index.android.tsx), so the hardware-back guard path is also exposed; the platform checkbox reflects where QA found it.What changes do you think we should make in order to solve the problem?
Keep the KAV enabled until the keyboard has fully closed, at the single gate every path converges on (
DistanceRequestStartPage.tsx#L115):isKeyboardShownonly flips false onkeyboardDidHide— after the hide animation completes (withKeyboardState.tsx#L50-L53) — so the worklet keeps trackingkeyboard.progress, animates the padding back to 0, and the KAV is only disabled once the padding is already 0, which makes the disable a no-op by construction. I'd also addKeyboard.dismiss()insidehandleTabSwitchDiscardso the keyboard visibly retracts with the modal instead of lingering over the map for a beat.Regression safety: the odometer tab is unchanged, and on the other tabs the KAV was previously inert, so the only delta is keyboard-avoidance while a keyboard is actually visible — the standard expectation.
Why the obvious spot-fix fails: calling
Keyboard.dismiss()beforejumpToin the discard branch only starts the hide animation;jumpTowrites the selected tab to Onyx and the re-render flipsenabledto false a frame later, whilekeyboard.progressis still mid-flight — the worklet returns{}and Reanimated never resets the already-applied padding, so a (slightly smaller) crop remains. Awaiting full dismissal before switching would fix only this path, delays every discard by the keyboard animation, and misses the no-modal edit-revert path entirely.What alternative solutions did you explore? (Optional)
usePrevious(selectedTab)), guaranteeing zero behavior change on Manual/GPS typing. Slightly more code; happy to use this variant if preferred.react-native-keyboard-controller's KAV (patch-package + upstream PR) to return explicit resets ({paddingBottom: 0}) when disabled. Protects everyScreenWrapperthat togglesshouldEnableKeyboardAvoidingViewdynamically (e.g.ReportScreen,CreateDistanceRatePage), but edits a vendored dependency for what today reproduces in one flow.OnyxTabNavigator— the spot fix competitors will propose; incomplete for the reasons above.samranahm commentedon Jul 6, 2026
Proposal
What is the root cause of that problem?
On iOS, after editing an odometer reading and switching to the Map tab via "Discard changes", the map mounts at a keyboard-shrunk height and stays cropped.
All distance tabs share one
ScreenWrapper/KeyboardAvoidingViewinDistanceRequestStartPage. Keyboard avoidance is enabled only while the Odometer tab is selected:App/src/pages/iou/request/DistanceRequestStartPage.tsx
Lines 114 to 115 in 263216f
The tab navigator keeps the keyboard open on tab press (
keyboardDismissMode="none"):App/src/libs/Navigation/OnyxTabNavigator.tsx
Lines 241 to 244 in 263216f
When the user taps Map with unsaved odometer edits,
handleTabPressshows the discard modal and, on confirm, runsonDiscardthenjumpTo(Map):App/src/libs/Navigation/OnyxTabNavigator.tsx
Lines 184 to 204 in 263216f
handleTabSwitchDiscardclears odometer state but never dismisses the keyboard:App/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx
Lines 522 to 530 in 263216f
So the Map tab lazy-mounts while the keyboard is still up and the shared KAV is still shrinking the container. The Mapbox view latches that reduced height and does not reclaim full space once the keyboard finally closes, which is why the map looks cropped.
This is not a
fitBounds/ waypoint camera bug.ConfirmedRouteandMapVieware not the failing path here; the container height is wrong at mount time.What changes do you think we should make in order to solve the problem?
Dismiss the keyboard early enough that the shared KAV has full height before Map mounts.
OnyxTabNavigator.handleTabPress, callKeyboard.dismiss()when the discard modal opens (beforeshowConfirmModal). That gives the KAV time to reclaim height while the user confirms:App/src/libs/Navigation/OnyxTabNavigator.tsx
Lines 184 to 189 in 263216f
IOURequestStepDistanceOdometer.handleTabSwitchDiscard, callKeyboard.dismiss()again before clearing odometer state, so the keyboard is gone by the timejumpTo(Map)runs:App/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx
Lines 522 to 530 in 263216f
Cancel can keep restoring focus via the existing
onCancel/restoreLastInputFocuspath, so staying on Odometer still brings the keyboard back.What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Solution Verification Result
IOS.Native.mp4
David-2002065 commentedon Jul 6, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-07-06 10:50:28 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
In the Track distance flow, after opening the Odometer tab, editing a reading, switching to the Map tab and confirming "Discard changes", the map on the Map tab renders cropped instead of filling its container. iOS only.
What is the root cause of that problem?
The Track distance tabs are hosted by
DistanceRequestStartPageinside anOnyxTabNavigatorthat is created withlazyLoadEnabled, so the Map tab (and the nativeDistanceMapViewinside it) is not mounted until the first time it is shown:App/src/pages/iou/request/DistanceRequestStartPage.tsx
Lines 130 to 148 in c8d6035
The same page enables the shared
ScreenWrapperKeyboardAvoidingViewbased on the persisted OnyxselectedTab:App/src/pages/iou/request/DistanceRequestStartPage.tsx
Lines 114 to 119 in c8d6035
selectedTabis only written after a tab switch commits, via the navigator'sstatelistener:App/src/libs/Navigation/OnyxTabNavigator.tsx
Lines 260 to 267 in c8d6035
When the user edits the Odometer reading (keyboard shown) and taps Map, the switch goes through the discard-changes confirmation and then
TabActions.jumpTo(DISTANCE_MAP), so the Map tab mounts for the first time in the middle of that transition. At that instantselectedTabis stillDISTANCE_ODOMETER(it updates asynchronously through Onyx afterward), soshouldEnableKeyboardAvoidingViewis stilltrueand the map's container is laid out while the odometer keyboard-avoiding inset is still collapsing. The native Mapbox view captures this transitional (shorter) frame here:App/src/components/DistanceRequest/DistanceRequestFooter.tsx
Lines 102 to 119 in c8d6035
Once the transition settles and the container grows back to its
flex1+minHeight: 300size, the native map view keeps its initial frame and does not re-measure, so it stays cropped. It reproduces on iOS specifically because the native map view retains its initial frame across this layout change instead of re-laying out.What changes do you think we should make in order to solve the problem?
Make the map re-initialize against its real container size by remounting
DistanceMapViewwhenever the measured height ofmapViewContainerchanges. InDistanceRequestFooter, measure the container withonLayoutand key the map on that height:Because the container is measured at the transitional (cropped) height first and then again at its settled height, the
keychange on the second layout remounts the native map so it initializes against the correct size and fills the container. Stable layouts produce no further remounts, so there is no extra reload during normal use.What specific scenarios should we cover in automated tests to prevent this bug from happening again in the future? (if applicable)
DistanceRequestFooter, fireonLayouton the map container with a small height and then with the final height, and assert theDistanceMapViewkey(its measured container height) updates so the map remounts on the settled height.This is primarily a native-layout regression, so it should also be covered by a manual iOS check of the exact repro steps.
What alternative solutions did you explore? (Optional)
Scope the
KeyboardAvoidingViewto the Odometer tab only instead of enabling it for the whole tab navigator viaselectedTab, so the Map tab is never laid out under the odometer keyboard inset. That removes the trigger at its source, but it is a broader structural change toDistanceRequestStartPage/the odometer screen, whereas keying the map on its measured height fixes the cropped render regardless of what caused the wrong-height mount.106 remaining items
melvin-bot commentedon Sep 15, 2026
Payment Summary
Resolving PRs:
Upwork Job
BugZero Checklist (@mallenexpensify)
eswar5678 commentedon Sep 16, 2026
melvin-bot commentedon Sep 16, 2026
📣 @eswar5678! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
melvin-bot commentedon Sep 18, 2026
@mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
mallenexpensify commentedon Sep 21, 2026
Payment Summary
Contributor: @x-dev90 paid $250 via Upwork
Contributor+: @marufsharifi paid $250 via Upwork
Both, can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022102167694335071403
marufsharifi commentedon Sep 22, 2026
@mallenexpensify, I've accepted the offer. thanks.
x-dev90 commentedon Sep 22, 2026
@mallenexpensify, the offer accepted. Thank you
mallenexpensify commentedon Sep 22, 2026
@x-dev90 @marufsharifi paid, summary updated above. Thx.