Skip to content

[Due for payment 2025-04-25] [$250] Login - Email field is auto unfocused #60250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 8 tasks
mitarachim opened this issue Apr 15, 2025 · 25 comments
Closed
2 of 8 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@mitarachim
Copy link

mitarachim commented Apr 15, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.1.28-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Other

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log out if logged in.
  3. Refresh the page.

Expected Result:

Email field will auto focus.

Actual Result:

Email field is auto unfocused. Error is thrown.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6802426_1744698886714.20250415_143327.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021912126632863856206
  • Upwork Job ID: 1912126632863856206
  • Last Price Increase: 2025-04-15
  • Automatic offers:
    • nkdengineer | Contributor | 106929760
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @bfitzexpensify
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment labels Apr 15, 2025
Copy link

melvin-bot bot commented Apr 15, 2025

Triggered auto assignment to @bfitzexpensify (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.

Copy link

melvin-bot bot commented Apr 15, 2025

Triggered auto assignment to @Gonals (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Apr 15, 2025

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Apr 15, 2025
Copy link
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.

@nkdengineer
Copy link
Contributor

nkdengineer commented Apr 15, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-04-15 07:52:03 UTC.

Proposal

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

Email field is auto unfocused. Error is thrown.

What is the root cause of that problem?

useAccountValidation always returns the boolean value

function useAccountValidation() {
const [isAccountValidated] = useOnyx(ONYXKEYS.ACCOUNT, {selector: (account) => !!account?.validated});
const [isUserValidated] = useOnyx(ONYXKEYS.USER, {selector: (user) => !!user?.validated});
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing

Which causes blurOnSubmit to be true by default

blurOnSubmit={isAccountValidated === false}

then the input is blurred here after it's focued

useEffect(() => {
if (blurOnSubmit) {
input.current?.blur();

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

We shouldn't convert this data to boolean and use the original value.

function useAccountValidation() {
const [isAccountValidated] = useOnyx(ONYXKEYS.ACCOUNT, {selector: (account) => !!account?.validated});
const [isUserValidated] = useOnyx(ONYXKEYS.USER, {selector: (user) => !!user?.validated});
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing

We can define a new prop, shouldReturnOriginalValue, for this hoo,k and it will return the current value if shouldReturnOriginalValue is true

function useAccountValidation() {
const [isAccountValidated] = useOnyx(ONYXKEYS.ACCOUNT, {selector: (account) => !!account?.validated});
const [isUserValidated] = useOnyx(ONYXKEYS.USER, {selector: (user) => !!user?.validated});
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing

Then we can pass shouldReturnOriginalValue as true here

blurOnSubmit={isAccountValidated === false}

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

None

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.

@Gonals Gonals added External Added to denote the issue can be worked on by a contributor and removed DeployBlocker Indicates it should block deploying the API labels Apr 15, 2025
@melvin-bot melvin-bot bot changed the title Login - Email field is auto unfocused [$250] Login - Email field is auto unfocused Apr 15, 2025
Copy link

melvin-bot bot commented Apr 15, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021912126632863856206

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 15, 2025
Copy link

melvin-bot bot commented Apr 15, 2025

Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (External)

@Gonals
Copy link
Contributor

Gonals commented Apr 15, 2025

@abdulrahuman5196, this is a blocker, so we'll wnt it to move along ASAP. Are you able to work on it?

@abdulrahuman5196
Copy link
Contributor

@Gonals hi, I am not immediately available at this time. Could you kindly assign it to a different C+

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 15, 2025
@ishpaul777
Copy link
Contributor

@nkdengineer can you mention offending PR?

@nkdengineer
Copy link
Contributor

@ishpaul777 It comes from #59983

Copy link

melvin-bot bot commented Apr 15, 2025

📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Apr 15, 2025
@nkdengineer
Copy link
Contributor

@ishpaul777 The PR is ready for review.

@marcaaron marcaaron self-assigned this Apr 15, 2025
@marcaaron
Copy link
Contributor

Fix CP'd and asked QA for a re-test

@marcaaron marcaaron added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Weekly KSv2 labels Apr 16, 2025
@marcaaron
Copy link
Contributor

QA confirmed that this is now fixed.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Apr 18, 2025
@melvin-bot melvin-bot bot changed the title [$250] Login - Email field is auto unfocused [Due for payment 2025-04-25] [$250] Login - Email field is auto unfocused Apr 18, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 18, 2025
Copy link

melvin-bot bot commented Apr 18, 2025

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

Copy link

melvin-bot bot commented Apr 18, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.29-10 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-04-25. 🎊

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

Copy link

melvin-bot bot commented Apr 18, 2025

@ishpaul777 @bfitzexpensify @ishpaul777 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]

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Apr 25, 2025
Copy link

melvin-bot bot commented Apr 28, 2025

@bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@ishpaul777
Copy link
Contributor

ishpaul777 commented Apr 29, 2025

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 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: create hook to check validated user #59983

  • [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: no need

  • [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.- this was found while normal deploy QA we should have enough tests covering the flow already so no need

Copy link

melvin-bot bot commented Apr 30, 2025

@bfitzexpensify Huh... This is 4 days overdue. Who can take care of this?

@bfitzexpensify
Copy link
Contributor

Payment summary:

@ishpaul777 due $250 through NewDot Manual Requests
@nkdengineer due $250 via Upwork ✅

@garrettmknight
Copy link
Contributor

$250 approved for @ishpaul777

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants