Skip to content

[Due for payment 2026-10-08] [$175] Android - Report - Report title box is not automatically expanded with new line of text. #99718

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.63-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #97489
Email or phone of affected tester (no customers): ibellicotest+2766@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Motorola MotoG60 / Android 12 (Hybrid app)
App Component: Money Requests

Action Performed:

Prerequisite: Account has a workspace.

  1. Open the Expensify app.
  2. Navigate to workspace chat.
  3. Create a manual expense.
  4. Open the just created expense and tap on the title to edit it.
  5. Start typing on title box, until more lines of text are created.
  6. Note that when a third line of text is reached, box is not expanded until text reaches the middle of the line.

Expected Result:

Report title box should be automatically expanded when text reaches new lines.

Actual Result:

Report title box is not expanded when a third line of text is reached. Box is only expanded after text reaches near the end of the new line.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7244710_1787873176740.Title_7.mp4

View all open jobs on GitHub

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

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 28, 2026
  2. melvin-bot commented on Aug 28, 2026

    @melvin-bot

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

  3. applause-bot commented on Aug 28, 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/72c329859b25dc5e81bc1f09e5f4b11a468e18a2cb2788fa8505faa1b5bcf8df

  4. melvin-bot commented on Aug 28, 2026

    @melvin-bot

    @chuckdries @mkhutornyi you have been assigned to this deploy blocker because you reviewed the offending PR: #97489

  5. melvin-bot commented on Aug 28, 2026

    @melvin-bot

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

  6. github-actions commented on Aug 28, 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.
  7. MelvinBot commented on Aug 28, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #97489 - "Let single-field edit input grow to reduce wasted white space" by @MelvinBot (High confidence)
    Related Issues: #96905 (the issue #97489 was fixing)

    Recommendation: REVERT

    PR #97489 is a self-contained, presentational feature PR that introduced the entire auto-grow behavior on the report title editor; the regression exists only on staging (the feature doesn't exist in production), so a clean revert fully restores known-good behavior and unblocks the App deploy. A targeted roll-forward is possible but riskier under deploy-blocker time pressure (see Root Cause).

    Assigned: @MelvinBot (PR author, already assigned by melvin-bot), @chuckdries and @mkhutornyi (approving reviewers, already assigned)
    Labels: No change. DeployBlockerCash correctly stays (App PR is the cause). No DeployBlocker present to remove.

    📋 Detailed Analysis

    Evidence

    Verification

    Root Cause

    The auto-grow height is not measured from the visible TextInput — it is measured from a separate hidden Text in TextInputMeasurement, whose reported layout height drives the container height:

    • TextInputMeasurement/index.tsx — the hidden Text onLayout calls onSetTextInputHeight(e.nativeEvent.layout.height):
      onLayout={(e) => {
      if (e.nativeEvent.layout.width === 0 && e.nativeEvent.layout.height === 0) {
      return;
      }
      let additionalWidth = 0;
      if (isMobileSafari() || isSafari() || isMobileChrome()) {
      additionalWidth = 2;
      }
      onSetTextInputWidth(e.nativeEvent.layout.width + additionalWidth);
      onSetTextInputHeight(e.nativeEvent.layout.height);
      }}
      >
      {/* \u200B added to solve the issue of not expanding the text input enough when the value ends with '\n' (https://github.com/Expensify/App/issues/21271) */}
      {value ? `${value}${value.endsWith('\n') ? '\u200B' : ''}` : placeholder}
      </Text>
    • That height feeds autoGrowHeightInputContainer(textInputHeight, minHeight, maxHeight) = clamp(textInputHeight, minHeight, maxHeight):

      App/src/styles/index.ts

      Lines 6663 to 6667 in a6bc76a

      autoGrowHeightInputContainer: (textInputHeight: number, minHeight: number, maxHeight: number) =>
      ({
      height: lodashClamp(textInputHeight, minHeight, maxHeight),
      minHeight,
      }) satisfies ViewStyle,

    The box grows only when the hidden measurement Text wraps to a new line. That element's wrap point is not perfectly aligned with the visible input's wrap point on native Android:

    • The measurement path applies a +2px width compensation only for Safari / mobile Safari / mobile Chrome, and none for Android native:
      let additionalWidth = 0;
      if (isMobileSafari() || isSafari() || isMobileChrome()) {
      additionalWidth = 2;
      }
      onSetTextInputWidth(e.nativeEvent.layout.width + additionalWidth);
      onSetTextInputHeight(e.nativeEvent.layout.height);

    When the measurement element is even slightly wider than the visible input, the visible input wraps onto the third line first while the hidden measurement Text still measures two lines. The container height therefore does not grow until enough additional characters are typed to also wrap the (slightly wider) hidden measurement element — i.e. "the box is not expanded until the text reaches the middle of the line," exactly as reported. This is a pre-existing quirk of the autoGrowHeight measurement path that #97489 newly exposed by turning it on for the single-line title box (where the lag is very visible), rather than a bug in brand-new logic.

    Because the fix lives in shared, platform-sensitive measurement code, a precise roll-forward (reconciling Android measurement width / line-height with the visible input) needs on-device verification and carries regression risk for the other consumers of autoGrowHeight (e.g. RoomDescriptionPage, IOURequestStepDescription). Reverting #97489 is the lower-risk path to unblock the deploy; the feature can be re-landed with the Android measurement-width fix.


    view run

  8. mkhutornyi commented on Aug 28, 2026

    @mkhutornyi
    Contributor

    Not blocker. The bug exists in production (playstore app)

    prod.mov
  9. 51 remaining items

  10. melvin-bot commented on Oct 7, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  11. melvin-bot commented on Oct 7, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  12. melvin-bot commented on Oct 12, 2026

    @melvin-bot

    @mallenexpensify Eep! 4 days overdue now. Issues have feelings too...

  13. mallenexpensify commented on Oct 14, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @mkhutornyi due $250 via NewDot

  14. mallenexpensify commented on Oct 14, 2026

    @mallenexpensify
    Contributor

    @jawad-erfani thanks for the feedback. We don't currently have a process for paying out issues without the Help Wanted label, unfortunately. Reasoning, we don't want to open up all issues to contributor comments (ie. Contributor AI bots) because it takes more review time from those involved. If/when we do, we add the Help Wanted label (and, these days, a dozen or more proposals get posted near-immediately, for better/worse).

    @chuckdries and I have been discussing this for weeks and there might be an update at some point.

  15. trjExpensify commented on Oct 15, 2026

    @trjExpensify
    Contributor

    approved $250 for @mkhutornyi

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions