Repository navigation
[HOLD for payment 2025-02-05] [$250] Web - Workspace - "It's not here" error briefly appears when removing a member offline #54938
Description
Activity
- addedDailyKSv2KSv2BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.
on Jan 8, 2025 Triggered auto assignment to @trjExpensify (
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.Proposal
Please re-state the problem that we are trying to solve in this issue.
When removing a user in offline mode, the page displays FullPageNotFoundView for a second, causing a flicker issue.
What is the root cause of that problem?
The root cause is the condition that determines whether to show the
NotFoundPage. It does not account for the offline status of the app, leading to theNotFoundPagebeing displayed momentarily when the user is deleted offline.What changes do you think we should make in order to solve the problem?
We should update the condition that determines whether to show the
NotFoundPageto include a check for the offline status. Specifically, we should ensure that theNotFoundPageis not displayed when the app is offline.
We can add!isOfflinein this codeApp/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx
Lines 215 to 217 in 0f6756b
// eslint-disable-next-line rulesdir/no-negated-variables const shouldShowNotFoundPage = !member || (member.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && prevMember?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE); const shouldShowNotFoundPage = !member || (member.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && prevMember?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && !isOffline);
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
POC
New-Expensify.mp4
Marking the comment as NO_ACTION because it follows the proposal template correctly, including all mandatory lines.
Proposal
Please re-state the problem that we are trying to solve in this issue.
"It's not here" error briefly appears when removing a member offline
What is the root cause of that problem?
When we remove a user offline, the
pendingActionswill be set todelete.Member.removeMembers([accountID], policyID); So, when we close the modal to confirm deleting a user, the condition to show the ‘not found’ page becomes
true. As a result, we briefly see the ‘not found’ page before the modal closesconst shouldShowCardsSection = (!!policy?.areExpensifyCardsEnabled && !!paymentAccountID) || (!!policy?.areCompanyCardsEnabled && hasMultipleFeeds); What changes do you think we should make in order to solve the problem?
To resolve this issue, we must create a new flag to prevent showing the ‘not found’ page, something like this:
1 Create new state
const [canNavigateBack, setCanNavigateBack] = useState(false);
- When a user is removed, we set setCanNavigateBack to true
const removeUser = useCallback(() => { const removeUser = useCallback(() => { Member.removeMembers([accountID], policyID); setIsRemoveMemberConfirmModalVisible(false); setCanNavigateBack(true); }, [accountID, policyID]);- Update the condition to display the ‘Not Found’ page
const shouldShowNotFoundPage = Update to
const shouldShowNotFoundPage = !member || (member.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && prevMember?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && !canNavigateBack);What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
This is a UI component; unit tests are not required.
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.
I can repro this reliably:
2025-01-10_01-46-39.mp4
- addedExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributor
on Jan 10, 2025 - changed the title
[-]Web - Workspace - "It's not here" error briefly appears when removing a member offline[/-][+][$250] Web - Workspace - "It's not here" error briefly appears when removing a member offline[/+]on Jan 10, 2025 Job added to Upwork: https://www.upwork.com/jobs/~021877532634645405201
- addedHelp WantedApply this label when an issue is open to proposals by contributorsApply this label when an issue is open to proposals by contributors
on Jan 10, 2025 Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (
External)49 remaining items
- addedAwaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to production
on Jan 29, 2025 - changed the title
[-][$250] Web - Workspace - "It's not here" error briefly appears when removing a member offline[/-][+][HOLD for payment 2025-02-05] [$250] Web - Workspace - "It's not here" error briefly appears when removing a member offline[/+]on Jan 29, 2025 Reviewinglabel has been removed, please complete the "BugZero Checklist".The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.90-6 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-02-05. 🎊
For reference, here are some details about the assignees on this issue:
- @jjcoffee requires payment through NewDot Manual Requests
- @truph01 requires payment automatic offer (Contributor)
@jjcoffee @trjExpensify @jjcoffee 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]
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: https://github.com/Expensify/App/pull/41492/files#r1941440896
-
[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.
-
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
- Be an admin of a workspace with a member
Test:
- Navigate to Workspace settings -> Members
- Go offline
- Click on any member
- Click on the "Remove from workspace" button
- Click on the "Remove" button
- Verify that the modal closes without an "It's not here" error showing.
Do we agree 👍 or 👎
- moved this from Bugs and Follow Up Issues to Done in #expensify-bugs
on Feb 7, 2025 $250 approved for @jjcoffee
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
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.82-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
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: https://expensify.testrail.io/index.php?/tests/view/5425265&group_by=cases:section_id&group_id=229065&group_order=asc
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: Windows 10 / Chrome
App Component: Workspace Settings
Action Performed:
Expected Result:
"It's not here" error shouldn't be showing.
Actual Result:
"It's not here" error briefly appears when removing a member offline. It's not showing when the removal is done online.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6708802_1736316862690.bandicam_2025-01-08_07-03-50-887.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @trjExpensify