follow up: default new WS to Control if user is in annual subscription#86301
follow up: default new WS to Control if user is in annual subscription#86301stitesExpensify merged 4 commits intoExpensify:mainfrom
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb1da8388e
ℹ️ 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".
| value: { | ||
| id: policyID, | ||
| type: type || CONST.POLICY.TYPE.TEAM, | ||
| type: type || (isAnnualSubscription ? CONST.POLICY.TYPE.CORPORATE : CONST.POLICY.TYPE.TEAM), |
There was a problem hiding this comment.
Honor annual default when draft workspace type is unset
createDraftInitialWorkspace() now tries to default annual users to a Control workspace, but this line still uses type || ... while type is always initialized to CONST.POLICY.TYPE.TEAM in the function signature. In the common case where callers omit type, the fallback for isAnnualSubscription is never reached, so the draft remains Team. This breaks the new annual-default behavior for any flow that relies on the draft value before/without a successful createWorkspace round-trip.
Useful? React with 👍 / 👎.
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: HybridApp03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4 |
|
bump here @Ollyws |
|
@daledah I did ask a question above if you could have a look. |
|
@Ollyws i still can't see your comment. Could you please add the comment again? web-resize.mp4 |
|
@daledah done |
|
@Ollyws I've tried Incognito Mode and other devices but I still can't see your comment. Could you please add a screenshot of your comment? |
|
@daledah Strange, I just asked:
on line 2335 of policy.ts ( |
|
@MelvinBot can you answer the above question too? |
|
The In planType: isApprovedAccountant ? (val[INPUT_IDS.PLAN_TYPE] as PolicyType) : undefined,So for all other callers — onboarding, settlement button, travel workspace, track workspace, upgrade flow — In short: only Approved Accountants can explicitly choose a plan type; everyone else gets it determined automatically by the fallback logic. |
|
@Ollyws basically what Melvin said above^, we don't pass type on any other calls of this function. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @stitesExpensify 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! 🧪🧪
|
Explanation of Change
Fixed Issues
$ #65697
PROPOSAL: #65697 (comment)
Tests
Precondition: Account is in annual subscription
Offline tests
QA Steps
Precondition: Account is in annual subscription
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Screen.Recording.2025-08-01.at.04.10.53.mov
Android: mWeb Chrome
Screen.Recording.2025-08-01.at.04.12.00.mov
iOS: Native
iOS: mWeb Safari
Screen.Recording.2025-08-01.at.04.13.05.mov
MacOS: Chrome / Safari
Screen.Recording.2026-03-25.at.15.56.05.mov
MacOS: Desktop
Screen.Recording.2025-08-01.at.04.14.25.mov