Repository navigation
Part 2 - Fix review workspace settings onboarding task completion - #101125
robertjchen merged 15 commits into
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c788c27922
ℹ️ 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".
|
🤖 Code review — 1 blocker, 2 questions. Reviewed the diff against 🔴 Blocker: duplicate task completion when both receipt amounts change in one save
In the Repro: Rules → Receipt requirements → change both "Receipt required" and "Itemized receipt required" amounts → Save. Result: two distinct This is the exact case you guarded in Questions
Nits and things that checked out
Next Steps: Reply with |
|
🤖 Code quality review ( The wiring is three separate edits that must always happen togetherAdding a command to this feature means doing all three of these, in three different places:
Nothing enforces the set. Do 2 without 3 and the backend ticks the task while the client shows nothing until reload — the exact bug this PR fixes, reintroduced silently. Do 3 without 2 and the backend mints its own second completion action. Both failure modes are invisible at review time because each half looks correct on its own. This PR is Part 2 and it's already 21 threaded params and 20 copies of the same param-type comment; there will be a Part 3. Collapsing steps 2 and 3 into one call at the // Task.ts, next to withReviewWorkspaceSettingsTaskData
function writeWithReviewWorkspaceSettingsTask(command, parameters, onyxData, taskData: OnboardingTaskCompletionOnyxData) {
API.write(command, {...parameters, completedTaskReportActionID: taskData.completedTaskReportActionID}, withReviewWorkspaceSettingsTaskData(onyxData, taskData));
}Each action then goes from three edits to one line, and the half-wired states stop being expressible. ( Same idea for step 1: that JSDoc line is now byte-identical in 20 files under Worth fixing in this PRPositional-argument creep. Mutation-as-a-flag. setPolicyRequiresTag(policyData, tagRequired, categoryUpdateForTagRecompute, hasCategoryChange ? {} : reviewWorkspaceSettingsTaskData);No new tests. The only test change is absorbing the new argument into six existing Nits
Things that read well
Next Steps: Reply with |
|
waiting for review |
|
@situchan for review |
|
Reviewing shortly. tests still failing |
|
Author checklist is also not complete |
|
Fixed @situchan |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari1.mov2.3.mov4.5.mov6.mov7.mov8.9.mov10.mov |
|
🤖 Re-review at 🔴 Blocker: revert the
|
|
Done |
|
Test step 7 is wrong. It's under Workflows tab |
|
While testing 8 and 9, I noticed "marked as complete" message twice (one for optimistic, one from server). 8.9.movAre you able to reproduce? |
|
Couldn't reproduce 2026-10-05.15-05-09.mp4 |
|
I'd consider below findings not blocker. 1. Upgrade path doesn't send the task data
This is edge case because upgrade only works when online 2. Multi-level tag workspaces don't send it
The task data is only forwarded on the
Looks like out of scope as per
3. The locked-category prompt doesn't send it
|
My changes cover it.
The BE too doesn't complete it.
The BE too doesn't complete it. |
robertjchen
left a comment
There was a problem hiding this comment.
thanks, let's try this out! 🤞
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 robertjchen 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/robertjchen in version: 9.5.4-0 🚀
|
|
No help site update is needed. This PR fixes a bug so the "Review your workspace settings" onboarding task checks off right after you change a workspace setting, and no article under |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.5.4-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
The "Review your workspace settings" Concierge onboarding task only auto-completes when the backend finishes it as a side effect of specific workspace-setting API writes (per the report action types the backend engineer confirmed). Part 1 wired the client-side optimistic mirroring for 10 of those commands; several other settings the backend also completes were still missing this wiring, so the task either didn't check off until a later reload or, for one page, never did because the reachable UI called a different, unwired function than the one that actually had the logic.
This PR extends the same
useReviewWorkspaceSettingsTaskCompletionoptimistic-mirroring pattern to the remaining backend-confirmed commands: the auto-approve and auto-pay toggles and their amount/audit-rate fields, prevent self-approval, require tag, require category, and submission frequency (auto-harvesting), plus a fix for the itemized-receipt-required amount (the wiring existed only on an orphaned page nothing links to; the actual "Receipt requirements" page was missing it). Settings confirmed via live reload testing to not be completed by the backend (approval mode, prohibited-expense defaults, reimbursement/payer, distance-rate settings, address, avatar) were left unwired.Fixed Issues
$ #67648
PROPOSAL:
Tests
Precondition: sign in with an account onboarded as newDotAdmin (invited to a workspace as an admin) so the "Review your workspace settings" task exists in the onboarding/Concierge chat.
For each setting below: change it and Save, verify the task is checked, then reload the app and verify it remains checked.
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
2026-09-15.20-30-05.mp4