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-11-16] [$175] Spend - Field label overlaps with currency label #106002
Version Number: 9.5.32-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#105919 Email or phone of affected tester (no customers):jnosidjodsjojo@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Mac 26.5 / Chrome App Component: Search
Issue reproduced on dev NewDot web: after switching Any currency to AED, the empty Greater than field label overlaps the left-side AED currency prefix. The two bounds are stacked vertically, not side-by-side.
Step
Status
1. Open Spend > ExpensesSnapshot confirmed Expenses heading and Expenses tab.
✅
2. Open Filters > AmountAmount filter displayed comparison options and currency control.
✅
3. Select BetweenSnapshot confirmed separate Greater than and Less than fields.
✅
4. Blur an empty amount fieldFocused empty Greater than, then clicked Less than without entering an amount.
✅
5. Open currency on either boundGreater than currency picker opened with Select a currency heading.
✅
6. Select Any currencyRead-back changed Greater than currency button to Any currency; Less than remained USD.
✅
7. Reopen CurrencyPicker reopened with Any currency and specific currency options.
✅
8. Select another currency; verify no label overlapSelected AED. Snapshot confirmed Greater than currency AED and Less than USD. Final visual evidence shows Greater than overlapping its left-side AED prefix; the right-side AED selector remains separate. Bounds are vertically stacked.
Switching an empty, unfocused field from Any currency to a specific currency restores its currency prefix without floating its label. Both occupy the same space. Reproduced on web; confidence: medium, without production verification.
Web verification and screenshot confirm overlap with the leading prefix, not the trailing currency button. Bounds are already stacked, ruling out insufficient side-by-side width.
What changes do you think we should make in order to solve the problem?
Activate the label when a prefix, suffix, or forced-active setting is present. Include those values in the label effect dependencies. Apply the equivalent correction to BaseTextInput/implementation/index.native.tsx:220–234.
Add real-input regression tests for empty, blurred currency transitions in both directions. Verify both bounds and Amount/Purchase amount filters.
What alternative solutions did you explore? (Optional)
Additional width would not fix this stale label state.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/106002#issuecomment-6642683859) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal. · no recording available
Problem: In Spend > Expenses > Filters > Amount, with an empty amount input, switching currency to "Any currency" and then back to a specific currency (e.g. AED or USD) leaves the field label (e.g. "Greater than") sitting inline, overlapping the newly rendered currency prefix.
Root cause: In BaseTextInput (src/components/TextInput/BaseTextInput/implementation/index.tsx and index.native.tsx), initialActiveLabel and deactivateLabel both account for prefixCharacter/suffixCharacter, but the effect that re-syncs label state after mount only checks hasValue || isFocused || isInputAutoFilled(...). So when the currency changes from "Any currency" (prefix '') to a real currency (prefix 'AED'), the effect re-runs, the condition is still false for an empty unfocused input, and it calls deactivateLabel() — which returns early because prefixCharacter is truthy, without ever calling activateLabel(). The label stays inactive while a prefix is now rendered on top of it. AmountFilterInput.tsx passes the symbol through NumberWithSymbolForm as prefixCharacter, which is why this filter input hits it.
Fix: In both the web and native BaseTextInput implementations, extend that label-sync effect's condition to also activate the label when forceActiveLabel, prefixCharacter, or suffixCharacter is truthy — matching what initialActiveLabel and deactivateLabel already consider — and add those three to the effect's dependency array.
Verification: Reproduce the exact sequence (empty input, blur, "Any currency", then AED/USD) and confirm the label floats above the prefix instead of overlapping it; confirm the reverse (back to "Any currency") returns the label inline; confirm existing behaviour is unchanged for inputs with a value, with focus, and with no prefix/suffix. Add tests covering dynamic prefix changes on an empty unfocused input on both web and native implementations.
Please re-state the problem that we are trying to solve in this issue
In Spend > Expenses > Filters > Amount, when selecting "Between", removing focus from an empty amount field, changing its currency to "Any currency", then changing it to a different currency (e.g. AED), the floating field label overlaps the currency prefix because the label does not activate when prefixCharacter is dynamically added to an empty, unfocused input.
What is the root cause of that problem?
The useEffect at src/components/TextInput/BaseTextInput/implementation/index.tsx:256-268 manages label activation/deactivation based on hasValue, isFocused, and isInputAutoFilled(input.current). It does not check for prefixCharacter or suffixCharacter.
When prefixCharacter changes from "" to "AED" on an empty, unfocused field:
hasValue is false (no typed value)
isFocused is false (user already removed focus)
isInputAutoFilled returns false
So the effect enters the else branch and calls deactivateLabel(). deactivateLabel (line 205-214) correctly guards against prefix/suffix and returns early — but activateLabel() is never called either. If isLabelActive.current was false (the component mounted without a prefix, so initialActiveLabel was false), the label stays stuck in the inactive (centered) position, overlapping the newly-visible currency prefix.
The initialActiveLabel computation (line 118) correctly includes !!prefixCharacter || !!suffixCharacter, but the dynamic useEffect that should react to changes does not — it only had [activateLabel, deactivateLabel, hasValue, isFocused] in its deps.
What changes do you think we should make in code to solve the problem?
Add prefixCharacter and suffixCharacter checks to the activation condition in the useEffect, and add them to its dependency array:
useEffect(()=>{if(hasValue||isFocused||isInputAutoFilled(input.current)||// If a prefix or suffix (e.g. currency symbol) is present, the label must stay activated// to avoid overlapping with the prefix/suffix text when the field is empty and unfocused.!!prefixCharacter||!!suffixCharacter){activateLabel();}else{deactivateLabel();}},[activateLabel,deactivateLabel,hasValue,isFocused,prefixCharacter,suffixCharacter]);
This ensures that whenever prefixCharacter or suffixCharacter changes (e.g. currency switch), the label activates to the floated position, matching the initial-render behavior. Applied to both web (index.tsx) and native (index.native.tsx) implementations.
What alternative solutions did you explore?
Move the prefix/suffix check into activateLabel only — rejected because activateLabel does not receive prefix/suffix as deps (its deps are [animateLabel, value]), and adding them there would be a broader scope change.
Use initialActiveLabel as a dependency — rejected because initialActiveLabel is only computed once on mount and does not update when prefix/suffix changes dynamically.
What specific scenarios should be covered by automated tests?
Label activates when prefixCharacter is dynamically added to a previously empty, unfocused input
Label is active on initial render when prefixCharacter is present from the start
changed the title [-][$175] Spend - Field label overlaps with currency label[/-][+][Due for payment 2026-11-16] [$175] Spend - Field label overlaps with currency label[/+]on Nov 9, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.34-1 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-11-16. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]
[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.
[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: N/A.
[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
Test:
Go to Spend > Expenses.
Click Filters > Amount.
Select Between.
Remove focus from the amount fields.
Click the currency on either field.
Change it to Any currency.
Click Currency.
Change to a different currency.
Verify the field label doesn't overlap with the currency label.
Activity
applause-bot commentedon Nov 4, 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/c7e22bbb365fe237839ccfbf3acf2e241b73041437792ef016a2e71effcdd960
MelvinBot commentedon Nov 4, 2026
🤖 Web test steps verification results: ❌ fail
Issue reproduced on dev NewDot web: after switching Any currency to AED, the empty Greater than field label overlaps the left-side AED currency prefix. The two bounds are stacked vertically, not side-by-side.
1. Open Spend > Expenses
Snapshot confirmed Expenses heading and Expenses tab.2. Open Filters > Amount
Amount filter displayed comparison options and currency control.3. Select Between
Snapshot confirmed separate Greater than and Less than fields.4. Blur an empty amount field
Focused empty Greater than, then clicked Less than without entering an amount.5. Open currency on either bound
Greater than currency picker opened with Select a currency heading.6. Select Any currency
Read-back changed Greater than currency button to Any currency; Less than remained USD.7. Reopen Currency
Picker reopened with Any currency and specific currency options.8. Select another currency; verify no label overlap
Selected AED. Snapshot confirmed Greater than currency AED and Less than USD. Final visual evidence shows Greater than overlapping its left-side AED prefix; the right-side AED selector remains separate. Bounds are vertically stacked.view run
MelvinBot commentedon Nov 4, 2026
Proposal
What is the root cause of that problem?
Switching an empty, unfocused field from Any currency to a specific currency restores its currency prefix without floating its label. Both occupy the same space. Reproduced on web; confidence: medium, without production verification.
Code evidence and verification
Currency selection changes the input prefix through AmountFilterInput.tsx:70–98 and NumberWithSymbolForm.tsx:550–586.
The label effect at BaseTextInput/implementation/index.tsx:254–268 ignores prefix presence when choosing activation. The guard at index.tsx:205–214 prevents deactivation when a prefix exists, but cannot activate an already-inline label.
Web verification and screenshot confirm overlap with the leading prefix, not the trailing currency button. Bounds are already stacked, ruling out insufficient side-by-side width.
What changes do you think we should make in order to solve the problem?
Activate the label when a prefix, suffix, or forced-active setting is present. Include those values in the label effect dependencies. Apply the equivalent correction to BaseTextInput/implementation/index.native.tsx:220–234.
Add real-input regression tests for empty, blurred currency transitions in both directions. Verify both bounds and Amount/Purchase amount filters.
What alternative solutions did you explore? (Optional)
Additional width would not fix this stale label state.
Related issue: Spend - Field label overlaps with currency button. Its merged fix, Prevent amount filter labels from overlapping currency buttons, stacks inputs but leaves this transition unchanged.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/106002#issuecomment-6642683859)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal. · no recording available
melvin-bot commentedon Nov 4, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @QichenZhu (
External)[-]Spend - Field label overlaps with currency label[/-][+][$175] Spend - Field label overlaps with currency label[/+]melvin-bot commentedon Nov 4, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022118094535270462954
camesenin commentedon Nov 4, 2026
melvin-bot commentedon Nov 4, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
khizzcr7 commentedon Nov 5, 2026
Problem: In Spend > Expenses > Filters > Amount, with an empty amount input, switching currency to "Any currency" and then back to a specific currency (e.g. AED or USD) leaves the field label (e.g. "Greater than") sitting inline, overlapping the newly rendered currency prefix.
Root cause: In
BaseTextInput(src/components/TextInput/BaseTextInput/implementation/index.tsxandindex.native.tsx),initialActiveLabelanddeactivateLabelboth account forprefixCharacter/suffixCharacter, but the effect that re-syncs label state after mount only checkshasValue || isFocused || isInputAutoFilled(...). So when the currency changes from "Any currency" (prefix'') to a real currency (prefix'AED'), the effect re-runs, the condition is still false for an empty unfocused input, and it callsdeactivateLabel()— which returns early becauseprefixCharacteris truthy, without ever callingactivateLabel(). The label stays inactive while a prefix is now rendered on top of it.AmountFilterInput.tsxpasses the symbol throughNumberWithSymbolFormasprefixCharacter, which is why this filter input hits it.Fix: In both the web and native
BaseTextInputimplementations, extend that label-sync effect's condition to also activate the label whenforceActiveLabel,prefixCharacter, orsuffixCharacteris truthy — matching whatinitialActiveLabelanddeactivateLabelalready consider — and add those three to the effect's dependency array.Verification: Reproduce the exact sequence (empty input, blur, "Any currency", then AED/USD) and confirm the label floats above the prefix instead of overlapping it; confirm the reverse (back to "Any currency") returns the label inline; confirm existing behaviour is unchanged for inputs with a value, with focus, and with no prefix/suffix. Add tests covering dynamic prefix changes on an empty unfocused input on both web and native implementations.
vanshshah11 commentedon Nov 5, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue
In Spend > Expenses > Filters > Amount, when selecting "Between", removing focus from an empty amount field, changing its currency to "Any currency", then changing it to a different currency (e.g. AED), the floating field label overlaps the currency prefix because the label does not activate when
prefixCharacteris dynamically added to an empty, unfocused input.What is the root cause of that problem?
The
useEffectatsrc/components/TextInput/BaseTextInput/implementation/index.tsx:256-268manages label activation/deactivation based onhasValue,isFocused, andisInputAutoFilled(input.current). It does not check forprefixCharacterorsuffixCharacter.When
prefixCharacterchanges from""to"AED"on an empty, unfocused field:hasValueisfalse(no typed value)isFocusedisfalse(user already removed focus)isInputAutoFilledreturnsfalseSo the effect enters the
elsebranch and callsdeactivateLabel().deactivateLabel(line 205-214) correctly guards against prefix/suffix and returns early — butactivateLabel()is never called either. IfisLabelActive.currentwasfalse(the component mounted without a prefix, soinitialActiveLabelwasfalse), the label stays stuck in the inactive (centered) position, overlapping the newly-visible currency prefix.The
initialActiveLabelcomputation (line 118) correctly includes!!prefixCharacter || !!suffixCharacter, but the dynamicuseEffectthat should react to changes does not — it only had[activateLabel, deactivateLabel, hasValue, isFocused]in its deps.What changes do you think we should make in code to solve the problem?
Add
prefixCharacterandsuffixCharacterchecks to the activation condition in theuseEffect, and add them to its dependency array:This ensures that whenever
prefixCharacterorsuffixCharacterchanges (e.g. currency switch), the label activates to the floated position, matching the initial-render behavior. Applied to both web (index.tsx) and native (index.native.tsx) implementations.What alternative solutions did you explore?
activateLabelonly — rejected becauseactivateLabeldoes not receive prefix/suffix as deps (its deps are[animateLabel, value]), and adding them there would be a broader scope change.initialActiveLabelas a dependency — rejected becauseinitialActiveLabelis only computed once on mount and does not update when prefix/suffix changes dynamically.What specific scenarios should be covered by automated tests?
prefixCharacteris dynamically added to a previously empty, unfocused inputprefixCharacteris present from the startsuffixCharacterPR: #106069
15 remaining items
melvin-bot commentedon Nov 7, 2026
[-][$175] Spend - Field label overlaps with currency label[/-][+][Due for payment 2026-11-16] [$175] Spend - Field label overlaps with currency label[/+]melvin-bot commentedon Nov 9, 2026
@QichenZhu
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.34-1 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-11-16. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]
QichenZhu commentedon Nov 9, 2026
Payment will be handled elsewhere.
QichenZhu commentedon Nov 16, 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: Merge TextInputWithPrefix into TextInput #7937 (comment)
Link to the comment on the Issue: [HOLD for payment 2022-04-01] Simplify/consolidate our various Text Input components #6584 (comment)
[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: N/A.
[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
Test:
Do we agree 👍 or 👎
JS00001 commentedon Nov 16, 2026
We can close this one then