Skip to content

[Due for payment 2026-07-13] Distance rates - Save button jumps when setting start/end date in add rate page #93389

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.4.6-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: Exploratory around #90920
Email or phone of affected tester (no customers): applausetester+ck6926@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: iPhone 16/18.7.1
App Component: Workspace Settings

Action Performed:

Precondition:

  1. Signed in with expensifail account

  2. Workspace with distance rates enabled

  3. Launch Hybrid app

  4. Go to workspace settings >> Distance rates

  5. Tap Add rate button

  6. Enter name, amount per mile fields

  7. Tap start date field & select a date

  8. Observe Save button jumps

  9. Tap end date & select a date

  10. Observe Save button jumps

Expected Result:

On step 6 & 8 - Save button should not jump or flicker when setting start/end date in add rate page

Actual Result:

On step 6 & 8 - Save button jumps/flickers when setting start/end date in add rate page

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7178604_1781245583520.ScreenRecording_06-12-2026_02-01-12_1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7178604

Issue OwnerCurrent Issue Owner: @Krishna2323

Activity

  1. applause-bot commented on Jun 12, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/77441d9dfe741a504dd467daa50795e54003cda3b8e3a92452032c0c4c837fbf

  2. added
    DeployBlockerCash
    Bug
    on Jun 12, 2026
  3. melvin-bot commented on Jun 12, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #90920

  4. melvin-bot commented on Jun 12, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jun 12, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. MelvinBot commented on Jun 12, 2026

    @MelvinBot
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    On the Add rate page (Workspace settings → Distance rates → Add rate), the Save button jumps/flickers when you pick a start or end date. This only happens with the DATE_BOUND_MILEAGE_RATE beta enabled.

    What is the root cause of that problem?

    The regression came from #91379 ("Fix Save button position on Add distance rate page"), which changed CreateDistanceRatePage.tsx from submitFlexEnabled={false} to submitFlexEnabled={isDateBoundMileageRateEnabled}.

    When submitFlexEnabled is true, the Save button is no longer in normal document flow — it is pinned to the bottom of the scroll viewport via flex1 + justifyContentEnd. Because the button's position is now tied to the available viewport height, any keyboard/viewport change during the date-picker interaction visibly repositions it.

    That is exactly what happens here: tapping a date field blurs the focused amount input and dismisses the soft keyboard (the date field uses disableKeyboard and explicitly calls textInputRef.current?.blur()), the viewport grows, the flex spacer expands, and the pinned button "jumps" to the new bottom as the picker opens/closes.

    Code references

    Ruled out: the calendar→clear icon swap on date select (DatePicker/index.tsx:182) is horizontal and doesn't change row height; validation only flags a date error when start > end (PolicyDistanceRatesUtils.ts:81), which isn't the repro path.

    Note: this is a deploy blocker auto-assigned to the author of #90920 because that PR also touched Distance rates in this deploy, but #90920 only changed the list page. The actual culprit is #91379.

    What changes do you think we should make in order to solve the problem?

    Stop pinning the Save button to the bottom on this page so it stays in normal flow and doesn't react to keyboard/viewport changes. The simplest, lowest-risk fix (and a direct revert of the line #91379 changed) is:

    - submitFlexEnabled={isDateBoundMileageRateEnabled}
    + submitFlexEnabled={false}

    in CreateDistanceRatePage.tsx:121. This restores the pre-regression button behavior and only affects the beta-gated date-bound layout.

    What alternative solutions did you explore?

    If the product intent of #91379 was to keep the button anchored at the bottom (so it isn't sandwiched right under the inputs when the form is short), use shouldSubmitButtonStickToBottom instead of submitFlexEnabled. That sticks the button to the screen bottom without re-flowing it through the flex spacer, avoiding the jump. This needs a quick design/UX confirmation, so the submitFlexEnabled={false} revert is the safer deploy-blocker fix.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/93389) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. Krishna2323 commented on Jun 12, 2026

    @Krishna2323
    Contributor

    @JS00001 Feature is behind beta, we can demote this. Also, please assign this to me.

  8. removed
    DeployBlockerCash
    Hourly
    on Jun 12, 2026
  9. 11 remaining items

  10. added
    Daily
    and removed
    Reviewing
    Weekly
    on Jul 6, 2026
  11. changed the title [-]Distance rates - Save button jumps when setting start/end date in add rate page[/-] [+][Due for payment 2026-07-13] Distance rates - Save button jumps when setting start/end date in add rate page[/+] on Jul 6, 2026
  12. melvin-bot commented on Jul 6, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Jul 6, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.27-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-07-13. 🎊

    For reference, here are some details about the assignees on this issue:

    • @Krishna2323 requires payment through NewDot Manual Requests
    • @thelullabyy requires payment (Needs manual offer from BZ)
  14. melvin-bot commented on Jul 6, 2026

    @melvin-bot

    @Krishna2323 / @thelullabyy The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  15. Krishna2323 commented on Jul 6, 2026

    @Krishna2323
    Contributor

    @rlinoz we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions