Follow ups to Broken Connection with direct feeds#57242
Conversation
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@DylanDylann can you please complete the review here? |
|
@joekaufmanexpensify Could you help to set up my accounts to test this PR? |
|
🚧 @mountiny has triggered a test build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🚧 @mountiny has triggered a test build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
Confirmed! The violation is not live updating, but when you click into the expense, it is there for the admin viewing their own expenses. 2025-02-25_10-25-14.mp4 |
Confirmed! Violation on open and processing expenses with mark as cash for both. 2025-02-25_10-33-39.mp4
Violation and no mark as cash on approved. 2025-02-25_10-34-21.mp4 |
Confirmed. Admin can see violation on employee's expense on an open report. 2025-02-25_10-37-46.mp4 |
|
Thank you @joekaufmanexpensify! |
|
Sure, I am on it |
Reviewer Checklist
Screenshots/VideosAndroid: mWeb Chrome
Screen.Recording.2025-02-26.at.21.22.25.moviOS: Native
Screen.Recording.2025-02-26.at.21.19.43.moviOS: mWeb Safari1. In the employee view
Screen.Recording.2025-02-26.at.21.21.13.mov |
| if (!isPolicyAdmin(policy) || isCurrentUserSubmitter(report?.reportID)) { | ||
| return true; | ||
| } | ||
| return isOpenExpenseReport(report) || (isProcessingReport(report) && isInstantSubmitEnabled(policy)); |
There was a problem hiding this comment.
@VickyStash Could you help to explain why do we need to add isInstantSubmitEnabled condition?
There was a problem hiding this comment.
@DylanDylann Let me double check it to be sure!
There was a problem hiding this comment.
@DylanDylann That's mentioned in the doc:
- Admins can see this violation on open reports (which makes it clear why the submit button is either hidden, or submitting splits some expenses to a new report) and processing reports with instant submit (which clarifies why the approve/pay button is hidden, or why taking that action splits some expenses to a new report.)
- Admins can’t see this violation on processing reports (with delayed submission), approved reports, or paid reports (same as OldDot.)
mountiny
left a comment
There was a problem hiding this comment.
Thanks! One questions but please add it as a follow up
| const brokenConnectionViolations = violations.filter((violation) => isBrokenConnectionViolation(violation)); | ||
| return brokenConnectionViolations.length > 0 && (!isPolicyAdmin(policy) || isOpenExpenseReport(report) || (isProcessingReport(report) && isInstantSubmitEnabled(policy))); | ||
|
|
||
| if (brokenConnectionViolations.length > 0) { |
There was a problem hiding this comment.
@VickyStash Could you please write unit test covering the shouldShowBrokenConnectionViolation logic?
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.7-1 🚀
|
|
@joekaufmanexpensify Looks like our applause QA team could not test this PR. Could this be verified internally? |
|
@kavimuru Yeah, this one should be internal QA. I will QA it now and then mark it on the checklist when done. |
|
QA'ed on staging and all looks good! |
|
Thanks! |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.1.7-2 🚀
|










Explanation of Change
Fixes for broken connection violations display
Fixed Issues
$ #57162
PROPOSAL: N/A
Tests
Pre-steps
Receipts to test with: you can find in slack.
Test steps:
Mark as cashbutton are displayed.Offline tests
Same, as in the Tests section.
QA Steps
Same, as in the Tests section.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Admin view:

Member - processing view:

Member - approved view:

Member - open view:

Android: mWeb Chrome
Admin view:

Member - processing view:

Member - approved view:

Member - open view:

iOS: Native
Member - processing view:

Member - approved view:

Member - open view:

Admin view:

iOS: mWeb Safari
Member - open view:

Member - approved view:

Member - processing view:

Admin view:

MacOS: Chrome / Safari
Member - processing view:

Member - approved view:

Member - open view:

Admin view:

MacOS: Desktop
Member - processing view:

Member - approved view:

Member - open view:

Admin view:
