Align optimistic task chatType inheritance with backend behavior#84263
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
Auth PR merged. I will continue working on this once the Auth PR is deployed to production. |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@MelvinBot is the Jest Unit Test failure related to this PR? |
|
No, the failing Jest test is not related to this PR. Failing test: Why it's unrelated:
|
|
@sobitneupane 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a649012e0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Ensure onboarding tasks inherit policyAdmins when admins chat data is fallback-only, and strengthen unit coverage by asserting chatType on each generated onboarding task report.
|
@codex review. |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
No product review needed |
|
Sobit does not seem to have enough spare cycles to review this. @shubham1206agra, would you like to review this? |
|
@c3024 I will review this shortly then |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-03-30.at.2.25.22.PM.mov |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #84258 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
Use optional chaining to read chatType from targetChatReport, avoiding a verbose object/type guard.
|
@c3024 I don't think Applause can follow the QA steps you listed since it involves debugging Onyx. Can you update those to something they can test? |
|
Yes, they might not be able to follow the steps. Updated them. Thanks! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @arosiclair 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/arosiclair in version: 9.3.52-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. The changes here are purely internal — they align the optimistic task report's The existing help article at |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.52-9 🚀
|
Explanation of Change
This PR aligns optimistic task report chatType behavior with backend task creation behavior.
parentChatTypeinput tobuildOptimisticTaskReport.chatTypeonly when parent chatType ispolicyAdmins.chatTypeunset forpolicyExpenseChat(and other chat types), so tasks are not misclassified.buildOptimisticTaskReport.chatType: policyAdminschatTypeunsetFixed Issues
$ #84258
PROPOSAL: N/A
Tests
chatType: policyAdmins.chatType: policyExpenseChat.Offline tests
NA
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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))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.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari