Gate Approvals/Payments isActive on Submit2026 workspaces#92051
Gate Approvals/Payments isActive on Submit2026 workspaces#92051MelvinBot wants to merge 1 commit into
Conversation
Co-authored-by: Hans <hungvu193@users.noreply.github.com>
|
🤖 To take ownership of this branch on your fork so you can push updates and let CI run the contributor-flow checks, run: git remote add upstream https://github.com/Expensify/App.git
git fetch upstream claude-fixSubmitWorkspaceWorkflowsToggles
git checkout -b claude-fixSubmitWorkspaceWorkflowsToggles upstream/claude-fixSubmitWorkspaceWorkflowsToggles
git push -u origin claude-fixSubmitWorkspaceWorkflowsTogglesThen close this PR and open a new one from your fork, or push directly to this branch and let it ride. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@MelvinBot Check all the check from the author checklist, fill the chrome section with this below url: Screen.Recording.2026-05-29.at.17.55.52.mov |
|
@garrettmknight Just want to double check if this looks correct to you? Screen.Recording.2026-05-29.at.17.55.52.mov |
|
@MelvinBot Mark this Pr ready for review |
|
@abzokhattab 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] |
Explanation of Change
On the Workflows tab of a Submit (
SUBMIT_2026beta) workspace, both the Approvals and Make or track payments toggles rendered as on even though they should appear off for Submit workspaces, and tapping them should route the user to the upgrade flow.Both rows derived their
isActivefrom raw backend policy fields without gating oncanAccessSubmit2026Features. The backend intentionally setsapprovalMode = ADVANCEDand a non-REIMBURSEMENT_NOreimbursementChoiceon Submit workspaces to support the Submit submission flow, so those values surfaced as "feature on" in the UI. The lock and upgrade routing were already wired up correctly — only the displayedisActivewas wrong.This PR gates both
isActiveexpressions on!canAccessSubmit2026Featuresso Submit workspaces render both toggles off, while preserving the existing lock + upgrade-navigation behavior:disabledAction→ upgrade modal (vianavigateToSubmitWorkspaceApprovalsUpgrade).onToggleSubmit branch → upgrade modal (nodisabledadded, because theonTogglealready handles Submit redirection).This is a render-only change. No backend, action, or Onyx changes — the deliberately-set policy values stay untouched.
Fixed Issues
$ #91988
PROPOSAL: #91988 (comment)
Tests
SUBMIT_2026beta.expensify.com/pricing.Offline tests
Same as Tests above — the change is render-only and uses values already in Onyx, so behavior should be identical when offline.
QA Steps
SUBMIT_2026beta on a Submit workspace.policy.approvalModeandpolicy.reimbursementChoice.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
Screen.Recording.2026-05-29.at.17.55.52.mov