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-23] Report - Report title box is not scrolled to the bottom after pasting several lines of text #99715
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: Windows 11 / Chrome App Component: Money Requests
Action Performed:
Prerequisite: Account has a workspace.
Prerequisite 2: Copy several lines of text from a chat or document. (More than 5 lines)
Open the staging.new.expensify.com website.
Open any workspace chat.
Create a manual expense.
Open the just created expense and click on the title to edit it.
Delete the original title and paste the copied text on the title box.
Note that title box is not autoscrolled to the bottom and user has to scroll manually to the end of the title.
Expected Result:
After pasting several lines of text on a report title box, user should be autoscrolled to the bottom and the end of the title should be visible.
Actual Result:
Report title box is not autoscrolled to the bottom after pasting text with several lines in it.
👋 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:
Identify the pull request that introduced this issue and revert it.
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: ROLL FORWARD
PR #97489 is the true cause — it introduced the growing/scrollable title editor (autoGrowSingleLine), which is why this is N/A in production. Reverting would reintroduce the "wasted white space" bug that #97489 fixed for every title/text-field editor; the regression here is a minor, self-correcting edit-time edge case (the saved value is squashed to a single line anyway), so a small targeted follow-up is preferable to a revert.
Assigned: @chuckdries and @mkhutornyi (approving reviewers of #97489) are already assigned. PR author is a bot, so no additional assignee added. Labels: No change. DeployBlockerCash is kept (App-side fix required); no DeployBlocker was present.
The prop autoGrowSingleLine is used in exactly one place in the codebase — src/pages/EditReportFieldText.tsx — which is precisely the "click the title to edit it" screen in the repro steps. This is the only consumer of the new behavior.
Before this PR the title input was a fixed single-line box, so "paste multi-line text → autoscroll to bottom" could not occur. The bug is therefore a brand-new edge case that this PR created, consistent with "Reproducible in production?: N/A - new feature."
The PR wires the caret-to-end behavior only for the initial autofocus path, not for later content changes like paste (see Root Cause), so pasting a multi-line block leaves the viewport scrolled to the top of the grown/capped box.
Verification
Affected editor page: src/pages/EditReportFieldText.tsx — enables the feature at line 103 (autoGrowSingleLine) with autofocus at line 47 (useAutoFocusInput(true)).
Feature wrapper: src/components/TextInput/BaseTextInput/index.tsx — lines 39-49 maps autoGrowSingleLine onto autoGrowHeight + maxAutoGrowHeight (115px cap) and wires Shift+Enter submit, but adds no scroll-to-end on content change.
The autoGrowSingleLine input grows to variables.textInputAutoGrowMaxHeight (~115px) and then scrolls internally. The only code that moves the caret/scroll to the end of the value is in useAutoFocusInput:
on autofocus it calls moveSelectionToEnd(input) — src/hooks/useAutoFocusInput.tsline 75
a scrollToBottom(ref) helper already exists (src/libs/InputUtils/index.ts, sets scrollTop = scrollHeight) and is used only on the side-panel focus path — line 159.
There is no handler that scrolls the input to the bottom when its content changes after focus (e.g. a paste). Once the box is at its capped height, react-native-web does not auto-scroll the grown container to the caret, so the end of the pasted text stays below the fold until the user scrolls manually.
Suggested targeted fix (App-side, small): in the autoGrowSingleLine branch of src/components/TextInput/BaseTextInput/index.tsx (lines 39-49), wrap onChangeText so that after the value changes it calls the existing scrollToBottom from @libs/InputUtils on the input DOM node (guarded to web / when scrollTop exists), mirroring how useAutoFocusInput already reuses that helper. This scrolls the caret/end into view on paste and on typing past the cap without affecting native or the saved single-line value.
Note: severity is low — the title is saved as a single line regardless (line breaks are squashed to spaces on submit), so this only affects the transient edit view for pasted multi-line content.
Deploy blocker investigation — confirmed root cause + fix
Root cause:PR #97489 is the true cause (High confidence), not a false attribution. It introduced a new autoGrowSingleLine capability and enabled it on the report title / text-field editor. That prop is used in exactly one place — EditReportFieldText.tsx:103 — which is precisely the "click the title to edit it" screen in the repro. Before this PR the title input was a fixed single-line box, so a multi-line-paste + autoscroll edge case could not exist, matching "Reproducible in production: N/A — new feature" and the reported version 9.4.63-0 (the first release to ship #97489).
Mechanism: the caret/scroll is moved to the end only on the initial autofocus path (useAutoFocusInput.ts:75 via moveSelectionToEnd). The autoGrowSingleLine branch in BaseTextInput/index.tsx:39-49 maps the prop onto autoGrowHeight + a 115px cap but adds no scroll-to-end on content change. Once the box is at its capped height, react-native-web doesn't auto-scroll the grown container to the caret after a paste. A scrollToBottom helper already exists (InputUtils/index.ts) but is never invoked when content changes after focus.
Recommendation: ROLL FORWARD (targeted fix, not revert). Reverting reintroduces the wasted-white-space bug #97489 fixed across every title/text-field editor, whereas this is a low-severity, transient edit-time edge case (titles are saved as a single line regardless — line breaks are squashed to spaces on submit). Suggested fix: in the autoGrowSingleLine branch of BaseTextInput/index.tsx, wrap onChangeText to call the existing scrollToBottom on the input node after content changes, mirroring the existing useAutoFocusInput usage.
App verification (web) — partial
I reproduced the flow on dev NewDot web (workspace → manual expense → open expense → Title single-field edit page). Entering a long wrapped string (312 chars, 5+ visual lines) via simulated typing autoscrolled correctly — end of text and caret were visible. I could not exercise the actual clipboard-paste path the bug targets: this session has no clipboard support (clipboard write → UNSUPPORTED_OPERATION) and fill (one-shot paste analog) was a no-op on the controlled input. So the paste-specific failure could not be conclusively reproduced in-session — but this is consistent with the code analysis: typing fires onChangeText per keystroke (each nudging the browser's native caret-into-view), while a single paste jumps content past the capped height without a scroll-to-end call.
Step
Status
Observation
Workspace exists / chat reachable
✅ pass
Created workspace; opened #admins workspace chat
Manual expense created
✅ pass
€5.00 manual expense against the workspace
Title single-field edit page reachable
✅ pass
Expense header → Details → Title opens RHP "Title" edit field
Long wrapped text autoscrolls (typed)
✅ pass
End-of-text marker + caret fully visible at bottom; top scrolled out of view
Reproduce via actual clipboard paste
❌ fail
No clipboard support in session; fill was a no-op — paste trigger couldn't be delivered
Screenshots
Report title edit input after entering a long wrapped string via typing (end of text and caret visible, top scrolled out of view):
Report title single-field edit page before text entry:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR:
Link to the comment on the Issue:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Copy several lines of text from a chat or document. (More than 5 lines)
Test:
Open any workspace chat.
Create a manual expense.
Open the just created expense and click on the title to edit it.
Delete the original title and paste the copied text on the title box.
Verify that title box is autoscrolled to the bottom and the end of the title is visible.
Activity
applause-bot commentedon Aug 28, 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/61dfaf20b66ed2c50242071d2d68337c198ae90b5358c1d0a64f1e8a9e936dec
melvin-bot commentedon Aug 28, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #97489
melvin-bot commentedon Aug 28, 2026
@chuckdries @mkhutornyi you have been assigned to this deploy blocker because you reviewed the offending PR: #97489
melvin-bot commentedon Aug 28, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Aug 28, 2026
👋 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:
MelvinBot commentedon Aug 28, 2026
🔍 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: ROLL FORWARD
PR #97489 is the true cause — it introduced the growing/scrollable title editor (
autoGrowSingleLine), which is why this is N/A in production. Reverting would reintroduce the "wasted white space" bug that #97489 fixed for every title/text-field editor; the regression here is a minor, self-correcting edit-time edge case (the saved value is squashed to a single line anyway), so a small targeted follow-up is preferable to a revert.Assigned: @chuckdries and @mkhutornyi (approving reviewers of #97489) are already assigned. PR author is a bot, so no additional assignee added.
Labels: No change.
DeployBlockerCashis kept (App-side fix required); noDeployBlockerwas present.📋 Detailed Analysis
Evidence
autoGrowSingleLinecapability and enabled it on the report title / text report-field editor.autoGrowSingleLineis used in exactly one place in the codebase —src/pages/EditReportFieldText.tsx— which is precisely the "click the title to edit it" screen in the repro steps. This is the only consumer of the new behavior.Verification
src/pages/EditReportFieldText.tsx— enables the feature at line 103 (autoGrowSingleLine) with autofocus at line 47 (useAutoFocusInput(true)).src/components/TextInput/BaseTextInput/index.tsx— lines 39-49 mapsautoGrowSingleLineontoautoGrowHeight+maxAutoGrowHeight(115px cap) and wires Shift+Enter submit, but adds no scroll-to-end on content change.git logconfirms these files were last touched by Let single-field edit input grow to reduce wasted white space #97489 and the prop exists nowhere else, ruling out a false attribution.Root Cause
The
autoGrowSingleLineinput grows tovariables.textInputAutoGrowMaxHeight(~115px) and then scrolls internally. The only code that moves the caret/scroll to the end of the value is inuseAutoFocusInput:moveSelectionToEnd(input)—src/hooks/useAutoFocusInput.tsline 75scrollToBottom(ref)helper already exists (src/libs/InputUtils/index.ts, setsscrollTop = scrollHeight) and is used only on the side-panel focus path — line 159.There is no handler that scrolls the input to the bottom when its content changes after focus (e.g. a paste). Once the box is at its capped height, react-native-web does not auto-scroll the grown container to the caret, so the end of the pasted text stays below the fold until the user scrolls manually.
Suggested targeted fix (App-side, small): in the
autoGrowSingleLinebranch ofsrc/components/TextInput/BaseTextInput/index.tsx(lines 39-49), wraponChangeTextso that after the value changes it calls the existingscrollToBottomfrom@libs/InputUtilson the input DOM node (guarded to web / whenscrollTopexists), mirroring howuseAutoFocusInputalready reuses that helper. This scrolls the caret/end into view on paste and on typing past the cap without affecting native or the saved single-line value.Note: severity is low — the title is saved as a single line regardless (line breaks are squashed to spaces on submit), so this only affects the transient edit view for pasted multi-line content.
MelvinBot commentedon Aug 28, 2026
Deploy blocker investigation — confirmed root cause + fix
Root cause: PR #97489 is the true cause (High confidence), not a false attribution. It introduced a new
autoGrowSingleLinecapability and enabled it on the report title / text-field editor. That prop is used in exactly one place —EditReportFieldText.tsx:103— which is precisely the "click the title to edit it" screen in the repro. Before this PR the title input was a fixed single-line box, so a multi-line-paste + autoscroll edge case could not exist, matching "Reproducible in production: N/A — new feature" and the reported version 9.4.63-0 (the first release to ship #97489).Mechanism: the caret/scroll is moved to the end only on the initial autofocus path (
useAutoFocusInput.ts:75viamoveSelectionToEnd). TheautoGrowSingleLinebranch inBaseTextInput/index.tsx:39-49maps the prop ontoautoGrowHeight+ a 115px cap but adds no scroll-to-end on content change. Once the box is at its capped height, react-native-web doesn't auto-scroll the grown container to the caret after a paste. AscrollToBottomhelper already exists (InputUtils/index.ts) but is never invoked when content changes after focus.Recommendation: ROLL FORWARD (targeted fix, not revert). Reverting reintroduces the wasted-white-space bug #97489 fixed across every title/text-field editor, whereas this is a low-severity, transient edit-time edge case (titles are saved as a single line regardless — line breaks are squashed to spaces on submit). Suggested fix: in the
autoGrowSingleLinebranch ofBaseTextInput/index.tsx, wraponChangeTextto call the existingscrollToBottomon the input node after content changes, mirroring the existinguseAutoFocusInputusage.App verification (web) — partial
I reproduced the flow on dev NewDot web (workspace → manual expense → open expense → Title single-field edit page). Entering a long wrapped string (312 chars, 5+ visual lines) via simulated typing autoscrolled correctly — end of text and caret were visible. I could not exercise the actual clipboard-paste path the bug targets: this session has no clipboard support (
clipboard write→UNSUPPORTED_OPERATION) andfill(one-shot paste analog) was a no-op on the controlled input. So the paste-specific failure could not be conclusively reproduced in-session — but this is consistent with the code analysis: typing firesonChangeTextper keystroke (each nudging the browser's native caret-into-view), while a single paste jumps content past the capped height without a scroll-to-end call.fillwas a no-op — paste trigger couldn't be deliveredScreenshots
Report title edit input after entering a long wrapped string via typing (end of text and caret visible, top scrolled out of view):
Report title single-field edit page before text entry:
view run
mkhutornyi commentedon Aug 28, 2026
Not blocker. The bug exists in production. This happens on all multiline non-markdown inputs
production.mov
prod.mov
48 remaining items
melvin-bot commentedon Sep 22, 2026
Payment Summary
Resolving PRs:
fix report title box is not scrolled to the bottom after pasting several lines of text #100392
Reviewer: @mkhutornyi owed $250 via NewDot
Assignee: @apeyada requires payment (Needs manual offer from BZ)
BugZero Checklist (@mallenexpensify)
mkhutornyi commentedon Sep 24, 2026
Contributor+ Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR:
Link to the comment on the Issue:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Copy several lines of text from a chat or document. (More than 5 lines)
Test:
Do we agree 👍 or 👎
mkhutornyi commentedon Sep 24, 2026
This is not offending PR. The bug already happened in production - #99715 (comment)
mallenexpensify commentedon Sep 25, 2026
Payment Summary
Contributor: @apeyada paid $250 via Upwork
Contributor+: @mkhutornyi due $250 via NewDot
@apeyada can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022103287795729062549
trjExpensify commentedon Oct 1, 2026
approved $250 for @mkhutornyi
mallenexpensify commentedon Oct 1, 2026
@apeyada paid, summary updated above. Thx. I had to pay via a bonus, due to an Upwork bug