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 2025-07-17] [$250] Android - In per diem amount, emoji or alphabet entered is briefly shown. #63127
Version Number: V9 1.54-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: n/a Email or phone of affected tester (no customers):applausetester+denm@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Redminote 10s android 13 App Component: Workspace Settings
Action Performed:
Launch app
Create Workspace - enable per diem rate - Import per diem rate
Open a destination
Tap amount
Try to enter alphabet or emoji
Expected Result:
In per diem amount, emoji or alphabet entered musnt be briefly shown.
Actual Result:
In per diem amount, emoji or alphabet entered is briefly shown.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
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.
constsetNewAmount=useCallback((newAmount: string)=>{// Remove spaces from the newAmount value because Safari on iOS adds spaces when pasting a copied value// More info: https://github.com/Expensify/App/issues/16974constnewAmountWithoutSpaces=stripSpacesFromAmount(newAmount);constreplacedCommasAmount=replaceCommasWithPeriod(newAmountWithoutSpaces);constwithLeadingZero=addLeadingZero(replacedCommasAmount,shouldAllowNegative);if(!validateAmount(withLeadingZero,2,CONST.IOU.AMOUNT_MAX_LENGTH,shouldAllowNegative)){return;}onInputChange?.(withLeadingZero);},[onInputChange,shouldAllowNegative],);
This is the reason why we're seeing the chars/emoji briefly before they're filtered out by our logic.
What changes do you think we should make in order to solve the problem?
We should use react-native-advanced-input-mask like we're using it in AmountWithCurrencyInput here.
In the AmountWithoutCurrencyForm component We should add these constants.
Also we should pass an array of masks to affinityFormat prop based on shouldAllowNegative's value.
We should prepend -? to validationRegex prop value.
We should append - to allowedKeys prop value.
AmountWithoutCurrencyForm file.
<TextInputvalue={formattedAmount}onChangeText={setNewAmount}inputID={inputID}name={name}label={label}defaultValue={defaultValue}accessibilityLabel={accessibilityLabel}role={role}ref={ref}keyboardType={!shouldAllowNegative ? CONST.KEYBOARD_TYPE.DECIMAL_PAD : undefined}type="mask"mask={`[09999999]${separator}[09]`}allowedKeys="0123456789.,-"validationRegex={'^-?(?!.*[.,].*[.,])\\d{0,8}(?:[.,]\\d{0,2})?$'}affinityFormat={shouldAllowNegative ? positiveAndNegativeMask : positiveMask}// On android autoCapitalize="words" is necessary when keyboardType="decimal-pad" or inputMode="decimal" to prevent input lag.// See https://github.com/Expensify/App/issues/51868 for more informationautoCapitalize="words"// eslint-disable-next-line react/jsx-props-no-spreading{...rest}/>
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
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.
changed the title [-]Android - In per diem amount, emoji or alphabet entered is briefly shown.[/-][+][$250] Android - In per diem amount, emoji or alphabet entered is briefly shown.[/+]on Jun 3, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.78-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@brunovjk@adelekennedy 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]
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: No PR directly introduced this bug. We deprecated the 'repeated' components and updated so that a single component is used with the 'mask'.
[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
Test:
Launch app
Create Workspace - enable per diem rate - Import per diem
Activity
melvin-bot commentedon May 30, 2025
Triggered auto assignment to @adelekennedy (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.thelullabyy commentedon May 30, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
In per diem amount, emoji or alphabet entered is briefly shown.
What is the root cause of that problem?
The per diem amount input has
shouldAllowNegativepropApp/src/pages/workspace/perDiem/EditPerDiemAmountPage.tsx
Lines 101 to 110 in 733010e
So the keyboard type is the default keyboard. This allows the user to enter the emoji or alphabet and it's removed by our handle change logic.
App/src/components/AmountWithoutCurrencyForm.tsx
Line 60 in 733010e
What changes do you think we should make in order to solve the problem?
Since this input is an amount input, we can always set the keyboard type to
DECIMAL_PADApp/src/components/AmountWithoutCurrencyForm.tsx
Line 60 in 733010e
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
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.
aadil42 commentedon May 30, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-06-13 08:33:09 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
In per diem amount Edit page, emoji or alphabet entered is briefly shown
What is the root cause of that problem?
We're passing AmountWithoutCurrencyForm component to InputWrapper
src/pages/workspace/perDiem/EditPerDiemAmountPage
In the AmountWithoutCurrencyForm component we're handling the logic for preventing the non-digit chars
src/components/AmountWithoutCurrencyForm
This is the reason why we're seeing the chars/emoji briefly before they're filtered out by our logic.
What changes do you think we should make in order to solve the problem?
We should use
react-native-advanced-input-masklike we're using it in AmountWithCurrencyInput here.In the
AmountWithoutCurrencyFormcomponent We should add these constants.Also we should pass an array of masks to
affinityFormatprop based onshouldAllowNegative's value.We should prepend
-?tovalidationRegexprop value.We should append
-toallowedKeysprop value.AmountWithoutCurrencyFormfile.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
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.
melvin-bot commentedon Jun 2, 2025
@adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!
[-]Android - In per diem amount, emoji or alphabet entered is briefly shown.[/-][+][$250] Android - In per diem amount, emoji or alphabet entered is briefly shown.[/+]melvin-bot commentedon Jun 3, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021929695267789985999
melvin-bot commentedon Jun 3, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk (
External)87 remaining items
melvin-bot commentedon Jul 10, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jul 10, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.78-4 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 2025-07-17. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jul 10, 2025
@brunovjk @adelekennedy 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]
brunovjk commentedon Jul 14, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: No PR directly introduced this bug. We deprecated the 'repeated' components and updated so that a single component is used with the 'mask'.
[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
Test:
Do we agree 👍 or 👎
melvin-bot commentedon Jul 21, 2025
@adelekennedy Eep! 4 days overdue now. Issues have feelings too...
adelekennedy commentedon Jul 22, 2025
Payment Summary
Contributor: @aadil42 owed $250 due via Upwork offer here
Contributor+: @brunovjk paid $250 via Upwork
melvin-bot commentedon Jul 25, 2025
@adelekennedy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!