Open m-natarajan opened 2 weeks ago
Triggered auto assignment to @greg-schroeder (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.
Typically I'd put this in #vip-vsb but that project is closed/paused. It sounds like this kind of chat bugs falls under #newdot-quality now per DBs comment here.
Job added to Upwork: https://www.upwork.com/jobs/~021841649844209879395
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rayane-djouah (External
)
Edited by proposal-police: This proposal was edited at 2024-10-03 03:17:43 UTC.
The "Not Found" page does not display when we press on the deleted message link.
We use this check to show not found page. It was working fine until in this PR we added && !!prevIsLinkedActionDeleted)
https://github.com/Expensify/App/blob/e02df29fc8ff05da2a242775fe972cf2bc5b817a/src/pages/home/ReportScreen.tsx#L363-L371
But this was also added to fix
But the user will notice a brief blink of the not found page because we clear the reportActionID not immediately and to prevent that, we can update the not found condition to only show if both the previous
prevIsLinkedActionDeleted
andisLinkedActionDeleted
are true.
In this PR we added an effect to remove reportActionID
from params
We can move the below code above this https://github.com/Expensify/App/blob/e02df29fc8ff05da2a242775fe972cf2bc5b817a/src/pages/home/ReportScreen.tsx#L664
And then we can use isLinkedActionBecomesDeleted
here instead of prevIsLinkedActionDeleted
. We will not show not found page when it's previously deleted.
https://github.com/Expensify/App/blob/e02df29fc8ff05da2a242775fe972cf2bc5b817a/src/pages/home/ReportScreen.tsx#L364
pseudocode
(!isLinkedActionInaccessibleWhisper && isLinkedActionDeleted && !isLinkedActionBecomesDeleted)
https://github.com/user-attachments/assets/f44e18f2-acfa-4eb1-95d8-a78df188fe2f
And the blinking issue remains fixed
https://github.com/user-attachments/assets/e4445cea-89ed-4c56-a371-4132c75a6a40
he "Not Found" page does not display when we press on the deleted message link.
prevIsLinkedActionDeleted
returns undefined
because the previous value is undefined
. As a result, the "Not found" page cannot be displayed due to this condition
https://github.com/Expensify/App/blob/f83b69e45451946c7505b773fb6e085fb2fe66c0/src/pages/home/ReportScreen.tsx#L364
To resolve this issue, we simply trigger an update to the value of prevIsLinkedActionDeleted.
// .src/pages/home/ReportScreen.tsx#L666
useEffect(() => {
// If the linked action is previously available but now deleted,
// remove the reportActionID from the params to not link to the deleted action.
const isLinkedActionBecomesDeleted = prevIsLinkedActionDeleted !== undefined && !prevIsLinkedActionDeleted && isLinkedActionDeleted;
if (!isLinkedActionBecomesDeleted) {
+ if (!isLinkedActionInaccessibleWhisper && isLinkedActionDeleted) {
+ fetchReportIfNeeded();
+ }
return;
}
Navigation.setParams({reportActionID: ''});
- }, [prevIsLinkedActionDeleted, isLinkedActionDeleted]);
+ }, [prevIsLinkedActionDeleted, isLinkedActionDeleted, isLinkedActionInaccessibleWhisper, fetchReportIfNeeded]);
@rayane-djouah friendly bump for review.
Thanks for the reminder. Will review in my morning
@Nodebrute's proposal looks good to me
:ribbon::eyes::ribbon: C+ reviewed
Triggered auto assignment to @aldo-expensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@aldo-expensify bump for assignment.
π£ @rayane-djouah π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @Nodebrute π 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 π
PR is up, looks like waiting on @aldo-expensify to review next!
Merged
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.43-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: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @jayeshmangwani Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1727868246323429
Action Performed:
Expected Result:
The "Not Found" page should be visible immediately if the message is deleted.
Actual Result:
The "Not Found" page does not display when we press on the deleted message link.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/user-attachments/assets/7fa3489a-b512-41c5-a4ea-f62834cf1ba9
https://github.com/user-attachments/assets/c4104637-fe09-4179-95a9-89dd182f9c16
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @rayane-djouah