Repository navigation
fix Copilot - Not here page when click Create expense in delegate mode - #102346
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Code reviewVerdict: Looks correct. I found no blocking issues. Required checks pass; only Why the Suggestions (non-blocking):
What I checked
|
Regression checkResult: I found no confirmed regressions. For any expense or IOU report whose linked chat is loaded, the new code returns the same result as before. Behavior changes only for an expense report you own whose chat can't be found. That is the case this PR fixes. Risks worth a look (none confirmed):
Other findings:
Scenarios I cleared
The chat fallback in the expense flows:
I checked the code only and didn't run the app, because I found no suspected regression to reproduce. Jest passed in CI on this commit. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari102346.mov |
Regression check (follow-up)Result: I found no regressions. This follow-up adds a web test and closes two risks the earlier code-only check left open. Web smoke test (✅ pass on commit
The test didn't reproduce the delegate-mode scenario from the linked issue. It needs two accounts with Copilot access. Risks the earlier check left open:
Other screens that changedAfter this PR, only three screens behave differently for an owner's open expense report with no linked chat:
All three now match the "Add expense" button, which already used |
d0d3206 to
da925d5
Compare
|
@Julesssss kind bump |
Julesssss
left a comment
There was a problem hiding this comment.
Oh sorry for delay here. Please can you merge main and resolve conflicts?
Done thanks |
|
🚧 Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ 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/Julesssss in version: 9.5.16-0 🚀
|
|
No help site update needed. This PR is a bug fix: Add expense on an empty expense report now opens the expense flow as users already expect, and it doesn't change any feature, label, or step that an article describes. |
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 9.5.18-0 🚀
|
|
No help site update needed. This PR fixes a bug where Add expense on an empty expense report synced from another session (for example, a Copilot session) failed. After the fix, the button works as users already expect, and no help article sentence becomes incorrect. |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.5.18-1 🚀
Bundle Size Analysis (Sentry): |





Explanation of Change
The "Add expense" button and the page it opens used different checks. A report received from another session has no
parentReportID/chatReportID, so the page rejected it and later steps couldn't find the workspace chat.canRequestMoney: expense reports now usecanAddTransaction, the same check the button uses.getChatReportFromMoneyRequestReport: whenchatReportIDis missing, finds the workspace chat from the report'spolicyIDandownerAccountID. Used by all the expense creation flows.Fixed Issues
$ #97769
PROPOSAL: #97769 (comment)
Tests
Preconditions:
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
test2.mov
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
test1.mov