update createWorkspace API params#71174
Conversation
chiragsalian
left a comment
There was a problem hiding this comment.
I noticed in your PR you pass a payload like,
"categories","company-cards","workflows","invoices","accounting","rules","distance-rates","tags","expensify-card","per-diem"
Instead of that instead lets use POLICY.MORE_FEATURES keys like,
areInvoicesEnabled, ARE_PER_DIEM_RATES_ENABLED
etc, this is because the backend is aware of the latter keys while its not aware of the former keys.
|
Also in the backend these keys are currently used. so 7 keys. i believe you are sending 3 additional ones. Let us know if its important for backend to cover the 3 additional ones you send as well or not. |
@chiragsalian @fedirjh I think we should keep 10 keys because we're showing 10 options. 3 of them (ARE_CATEGORIES_ENABLED, ARE_COMPANY_CARDS_ENABLED, ARE_WORKFLOWS_ENABLED) are enabled by default, but users can disable them
|
Updated! |
@dukenv0307 hmmm If they are disabled, then they will be excluded from the list. If they are enabled, we don't queue any requests for those keys. |
|
@fedirjh Sorry I don't get your point. Can you give me the examples when |
|
@dukenv0307 I misread your comment. We should display all the options, but only we need to send these keys if they are enabled. |
|
@fedirjh Yeah, but based on this comment, we just defined 7 keys on BE, but we have 10 keys on FE. |
|
3 additional keys mentioned here are: ARE_CATEGORIES_ENABLED, ARE_COMPANY_CARDS_ENABLED, ARE_WORKFLOWS_ENABLED |
@dukenv0307 Why do we have to send these 3 additional keys? do we have a request queued for those keys when enabled? |
No, because they're enabled by default. But in case users disable them, we have to handle it on BE instead of calling APIs to disable, right? |
|
@fedirjh ^ |
|
Oh, I see it now. Let me check the BE. |
Looking at the Web-E code, within features: { enabled: [], disabled: [] }or add a separate |
|
If selectedFeatures is undefined, we can keep the same behavior as before (3 features are enabled by default). Otherwise, we will enable the features contained in selectedFeatures. Or we can make it required, then I can fallback it to [ARE_CATEGORIES_ENABLED, ARE_COMPANY_CARDS_ENABLED, ARE_WORKFLOWS_ENABLED] before sending API. It's just my idea, you guys can choose other solutions that are more efficient |
Nice find. I totally didn't check or think of those first 3. I had to think over this for a bit, i think both posted options has some cons,
Alright with that said, im opting for option 3, i.e., when in doubt do what the database does i.e., (it looks like the backend saves one extra than what the front end shows so feel free to ignore whichever is extra) What do you guys think? |
|
@chiragsalian I agree with the proposed Option 3, that'd make it much clear and explicit, and am ready to start the Auth PR. 👍 |
|
awesome sounds good, let me know when those PRs are ready. Let us know your thoughts too @dukenv0307 when you get a chance. |
|
Option 3 looks good |
|
I'll update the PR soon |
Codecov Report❌ Patch coverage is
... and 54 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@thesahindia 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] |
|
Nice, this direction looks better to me, while testing it works good too. Let's remember to keep this PR on HOLD though and it should be merged after the web-e and auth PRs are live. |
|
Neat, we got the backend PRs merged. They should go live by Monday/Tuesday. |
|
Will get to it today. |
Are the changes live now? |
It's on staging now. I guess you can test it with selecting staging server from newDot. |
|
Both the backend PRs are live now. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-10-14.at.9.23.30.PM.movAndroid: mWeb ChromeScreen.Recording.2025-10-15.at.12.55.10.AM.moviOS: HybridAppScreen.Recording.2025-10-15.at.6.00.14.PM.moviOS: mWeb SafariScreen.Recording.2025-10-15.at.6.02.38.PM.movMacOS: Chrome / SafariScreen.Recording.2025-10-14.at.1.38.00.PM.movMacOS: DesktopScreen.Recording.2025-10-15.at.6.06.20.PM.mov |
|
@dukenv0307, please add the videos and merge main. |
|
@thesahindia Done |
|
Thank you for the changes 🙂 |
|
✋ 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/chiragsalian in version: 9.2.33-0 🚀
|
|
Reverting to resolve this blocker |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.33-4 🚀
|

Explanation of Change
Fixed Issues
$ #67642
PROPOSAL: #67642 (comment)
Tests
Offline tests
Same as above
QA Steps
Same as above
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))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
Screen.Recording.2025-10-14.at.23.33.41.mov
Android: mWeb Chrome
Screen.Recording.2025-10-14.at.23.27.27.mov
iOS: Native
Screen.Recording.2025-10-14.at.23.32.25.mov
iOS: mWeb Safari
Screen.Recording.2025-10-14.at.23.23.02.mov
MacOS: Chrome / Safari
Screen.Recording.2025-10-14.at.23.20.29.mov
MacOS: Desktop
Screen.Recording.2025-10-14.at.23.30.51.mov