Repository navigation
Chat - #focus prompt does not appear when user create 30 reports #49944
Description
Activity
- addedDeployBlockerCashThis issue or pull request should block deploymentThis issue or pull request should block deploymentDeployBlockerIndicates it should block deploying the APIIndicates it should block deploying the API
on Sep 30, 2024 Triggered auto assignment to @thienlnam (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commented
on Sep 30, 2024 on Sep 30, 2024 – with GitHub ActionsContributorMore actions👋 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.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
Appears to be from #49735
- Reacted by Monil Bhavsar
- removedDeployBlockerIndicates it should block deploying the APIIndicates it should block deploying the API
on Sep 30, 2024 Reproducible in staging?: Y
Reproducible in production?: Y@lanitochka17 is this supposed to be blocker?
Oh whoops, didn't catch that - yeah it would not be a blocker in that case
- addedDailyKSv2KSv2and removedDeployBlockerCashThis issue or pull request should block deploymentThis issue or pull request should block deploymentHourlyKSv2KSv2
on Sep 30, 2024 Proposal
Please re-state the problem that we are trying to solve in this issue.
The prompt is not displayed, neither when creating 30 reports nor when logging in to an account that has 30 reports
What is the root cause of that problem?
- When user create more than 30 reports and if they have not tried focus mode yet, BE does not return the
nvp_tryFocusMode, sohasTriedFocusModeisundefined:
App/src/libs/actions/PriorityMode.ts
Line 64 in 69483ff
hasTriedFocusMode = val; hence the condition:
is alwaysApp/src/libs/actions/PriorityMode.ts
Line 80 in 69483ff
if (ReportConnection.getAllReports() === undefined || hasTriedFocusMode === undefined || isInFocusMode === undefined || isLoadingReportData) { truesincehasTriedFocusModeis alwaysfalse.- As a result, there is no focus promp is triggered.
What changes do you think we should make in order to solve the problem?
- I think BE should return exactly value
trueorfalsefor thenvp_tryFocusMode. - Then in:
App/src/libs/actions/PriorityMode.ts
Line 80 in 69483ff
if (ReportConnection.getAllReports() === undefined || hasTriedFocusMode === undefined || isInFocusMode === undefined || isLoadingReportData) {
we just need to update the condition:hasTriedFocusMode === undefinedto:
!isBoolean(hasTriedFocusMode)What alternative solutions did you explore? (Optional)
- When user create more than 30 reports and if they have not tried focus mode yet, BE does not return the
I don't think we need frontend fix here. Returning the NVP always should fix the issue
PR was deployed
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.41-4
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
The #focus prompt should be displayed when user has 30 reports
Actual Result:
The prompt is not displayed, neither when creating 30 reports nor when logging in to an account that has 30 reports
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6620304_1727709449354.Record_2024-09-27-23-41-23.mp4
View all open jobs on GitHub