-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$250] Tasks - App goes back to main chat or LHN when editing a task's description #47671
Comments
Triggered auto assignment to @deetergp ( |
👋 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:
|
We think that this bug might be related to #vip-vsp |
Edited by proposal-police: This proposal was edited at {your_timestamp_here}. ProposalPlease re-state the problem that we are trying to solve in this issue.The user is returned back to the LHN on mobile or the chat that the task was in. The same happens on the name field after the description was edited once What is the root cause of that problem?
then:
then In PR, we call:
What changes do you think we should make in order to solve the problem?We can dismiss modal before call editTask in:
The same should be applied in edit title flow. What alternative solutions did you explore? (Optional)In case
to below: Line 567 in 6334d36
|
ProposalPlease re-state the problem that we are trying to solve in this issue.The main chat opens after editing task description. What is the root cause of that problem?When we edit the task, we notify the report that a new action has been added. Lines 568 to 569 in 80236f5
It will trigger App/src/pages/home/report/ReportActionsList.tsx Lines 362 to 372 in 80236f5
After editing the task, we call App/src/pages/tasks/TaskDescriptionPage.tsx Lines 55 to 58 in 80236f5
In App/src/libs/Navigation/dismissModalWithReport.ts Lines 70 to 72 in 80236f5
So, the first navigate to the self-report already closes the RHP and the Even though this happens after my PR where I add the navigate to self-report logic, but we already guard it with The issue is both FE and BE.
In FE, we optimistically add the update task description system message, but we don't update the Lines 505 to 524 in 80236f5
For the BE issue, looks like the BE doesn't consider the update task system message From the screenshot above, we can see that after the EditTask is completed, there are 2 reports onyx data. The first one contains the correct This makes What changes do you think we should make in order to solve the problem?The fix must be done for both BE and FE. The BE needs to return the correct
|
Edited by proposal-police: This proposal was edited at 2023-10-01T00:00:00Z. ProposalPlease re-state the problem that we are trying to solve in this issue.Tasks - App goes back to main chat or LHN when editing a task's description What is the root cause of that problem?When user edit task, dismissModal will be executed: App/src/pages/tasks/TaskDescriptionPage.tsx Lines 50 to 58 in 6334d36
and when before calling API write of edit_task: Lines 567 to 568 in 6334d36
App/src/pages/home/report/ReportActionsList.tsx Lines 362 to 372 in 6334d36
which will navigate to the report or scroll to bottom of the report. The navigate is executed first which will make the report screen go back to previous report. What changes do you think we should make in order to solve the problem?If the expected solution is to not scroll to bottom after editing the task, we could remove the What alternative solutions did you explore? (1)If the expected solution involves scrolling to the bottom, we can move the If scrolling is only necessary when the page report action list does not have the What alternative solutions did you explore? (Optional)To fix the const newestVisibleReportAction = sortedVisibleReportActions[0];
const newestPendingActionTime = useRef(report.lastVisibleActionCreated);
const newCreatedUserActions = useMemo(() => {
const previousLastReportAction = ReportActionsUtils.getReportAction(report.reportID, previousLastIndex.current);
const previousCreatedDate = new Date(previousLastReportAction.created);
const previousIndex = sortedVisibleReportActions.findIndex((action) => new Date(action.created) < previousCreatedDate);
const addedActions = sortedVisibleReportActions.slice(0, previousIndex.current === -1 ? -1 : previousIndex - 1);
const newCreatedActions = addedActions.filter((action) => (action.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD) && (new Date(action.created) > new Date(newestPendingActionTime.current)));
if (newCreatedActions.length > 0) {
newestPendingActionTime.current = newCreatedActions.reduce((a, b) => Math.max(new Date(a.created), new Date(b.created))).created;
}
return newCreatedActions;
}, [lastActionIndex]);
const hasNewestReportAction = (newCreatedUserActions.length > 0) || (new Date(newestVisibleReportAction?.created) >= new Date(report.lastVisibleActionCreated)); |
I think this blocker may be a result of this PR from yesterday's staging deploy #47209 |
It's actually happening after my PR #46724, but the root cause is actually an existing issue coming from both BE and FE optimistic data issues which is why I posted a proposal for this one. |
Job added to Upwork: https://www.upwork.com/jobs/~0135f56d92cfd4346d |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha ( |
Edited by proposal-police: This proposal was edited at 2024-09-16 06:45:28 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.The user is returned back to the LHN on mobile or the chat that the task was in. The same happens on the name field after the description was edited once What is the root cause of that problem?When we edit the task title, we will dismiss the modal App/src/pages/tasks/TaskTitlePage.tsx Line 55 in 685bb4c
But before that, we have a logic to that will trigger Line 568 in 685bb4c
In the normal case, we will scroll to the bottom but in this case It doesn't happen when we update the assignee because we wrap the dismiss logic in App/src/pages/tasks/TaskAssigneeSelectorModal.tsx Lines 200 to 204 in 685bb4c
Screen.Recording.2024-08-12.at.12.34.32.mp4What changes do you think we should make in order to solve the problem?On the FE side, we should update
Lines 513 to 515 in 685bb4c
and the same when editing the task assignee here
Line 578 in 685bb4c
OPTIONAL: We can also wrap dismiss modal in App/src/pages/tasks/TaskTitlePage.tsx Line 55 in 685bb4c
For BE, we should store and return the correct What alternative solutions did you explore? (Optional)NA |
@getusha We've got a good number of proposals here for you to review 🎉 |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Sorry this fell out of my radar. |
@tsa321 the issue occurs only when we have over 10ish edits. until then it doesn't seem to happen when editing the description. any explanation on that? |
@getusha Sorry for the late reply. When I open another chat, such as the Concierge chat, and then edit a task (even with minimal edits), the app returns to the Concierge chat after editing. So, it's not a matter of reaching the 10th edit— I can reproduce the issue with just a minimal number of edits: bug-d.mp4Either way the root cause is in this line: Line 569 in e84dab7
|
Current assignee @deetergp is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
📣 @tsa321 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@getusha PR is ready |
PR review is ongoing. |
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.22-5
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4872853
Email or phone of affected tester (no customers): gatantm+82@gmail.com
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
The task is saved and user stays on task view
Actual Result:
The user is returned back to the LHN on mobile or the chat that the task was in. The same happens on the name field after the description was edited once
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6576464_1724099959731.Recording__994.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @getushaThe text was updated successfully, but these errors were encountered: