You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vacation delegate - Workspace are not arranged in alphabetical order #101498
Version Number: 9.4.84-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#99460 Email or phone of affected tester (no customers):jsdoijnodsdisojo@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: User Settings
Action Performed:
Precondition:
Create a few workspaces.
Go to staging.new.expensify.com
Go to Account > Profile > Status.
Click Vacation delegate.
Enter an existing user email who is not workspace member.
Click on the user.
Expected Result:
Workspaces will be arranged in alphabetical order.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
The bug is a missing client-side sort in a brand-new RHP page — a few-line fix in WorkspaceSection/index.tsx is far safer and smaller than reverting a 5-file, ~380-line feature PR (plus 612 lines of tests) that also removed the old blocking policy-diff warning it replaced. Reverting would restore the previously-rejected warning UX to fix a purely cosmetic ordering issue.
Assigned: @jakubstec (PR author), @mountiny and @mkhutornyi (approving reviewers) from highest-confidence causing PR only — already assigned by melvin-bot, no change needed Labels: No changes. DeployBlockerCash is kept (an App PR caused this, and the issue is not reproducible on production). DeployBlocker was not present, so nothing was removed.
📋 Detailed Analysis
Evidence
The reported screen — the RHP that lists the workspaces a vacation delegate is missing from, shown after picking a non-member user — did not exist before PR feat: Replace vacation delegate policy diff warning with RHP invite step #99460. The PR description states it "Replaces the vacation delegate's blocking 'policy diff' warning with an RHP step (VacationDelegateMissingWorkspacesPage)".
All five files that make up that page are pure additions in PR feat: Replace vacation delegate policy diff warning with RHP invite step #99460 (MissingWorkspacesFooter.tsx +63, MissingWorkspacesIntro.tsx +48, WorkspaceRow.tsx +50, WorkspaceSection.tsx +48, index.tsx +174), confirmed via gh pr view 99460 --json files.
Consistent with "Reproducible in production?: N/A - new feature, doesn't exist in prod": the page itself is new to this release, so the bug cannot exist in production.
The unsorted render is visible in the PR diff itself, including the comment that documents the behaviour as intentional-by-omission: /** Workspaces to list, in the order the policy diff returned them. Nothing is rendered when empty. */
A repo-wide grep for policyDiff|adminPolicies|nonAdminPolicies across src/ shows no sort or localeCompare anywhere in this flow, so the omission is not compensated for further up or down the chain. No test in tests/ui/VacationDelegateMissingWorkspacesPageTest.tsx asserts row ordering, so adding a sort will not break existing tests.
index.tsx passes those arrays through unchanged, and WorkspaceSection maps over policyIDs directly to render one WorkspaceRow each. Because the display name is only resolved insideWorkspaceRow (policy?.name ?? translate('workspace.common.unavailable')), the list is ordered by whatever sequence the API returned the IDs in, never by the name the user actually sees. Hence the non-alphabetical order.
This is squarely an App-side fix: the response is well-formed and the ordering of an ID array is not something the backend should be relied on to guarantee — presentation order belongs in the client.
Suggested fix: resolve each row's title in WorkspaceSection and sort by it with the locale-aware comparator before rendering, matching the pattern used elsewhere in the app (const {translate, localeCompare} = useLocalize();, then sort). Two things to be careful about:
Do not sort in place.policyIDs is the Onyx-owned array (vacationDelegate.policyDiff.adminPolicies); .sort() mutates its receiver, so copy first ([...policyIDs].sort(...)).
Sort by the resolved title (including the workspace.common.unavailable fallback), not by policyID, so the order matches what is rendered. No useMemo — this file compiles under React Compiler.
adminWorkspaces in index.tsx (used for the actual invite call) is unaffected; its order has no user-visible or functional meaning.
changed the title [-]Vacation delegate - Workspace are not arranged in alphabetical order[/-][+][Due for payment 2026-09-28] Vacation delegate - Workspace are not arranged in alphabetical order[/+]on Sep 21, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.90-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-09-28. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
changed the title [-][Due for payment 2026-09-28] Vacation delegate - Workspace are not arranged in alphabetical order[/-][+]Vacation delegate - Workspace are not arranged in alphabetical order[/+]on Sep 24, 2026
Activity
applause-bot commentedon Sep 18, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/6ac948918377037ab84f2e7869c409ee8131d588dab8847c70c64350ab0f5beb
melvin-bot commentedon Sep 18, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #99460
github-actions commentedon Sep 18, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Sep 18, 2026
@mountiny @mkhutornyi you have been assigned to this deploy blocker because you reviewed the offending PR: #99460
melvin-bot commentedon Sep 18, 2026
@jakubstec you have been assigned to this deploy blocker because you authored the offending PR: #99460
melvin-bot commentedon Sep 18, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Sep 18, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: feat: Replace vacation delegate policy diff warning with RHP invite step - "feat: Replace vacation delegate policy diff warning with RHP invite step" by @jakubstec (High confidence)
Related Issues: Vacation delegate: adjust the policy diff warning (the issue PR #99460 implemented)
Recommendation: ROLL FORWARD
The bug is a missing client-side sort in a brand-new RHP page — a few-line fix in
WorkspaceSection/index.tsxis far safer and smaller than reverting a 5-file, ~380-line feature PR (plus 612 lines of tests) that also removed the old blocking policy-diff warning it replaced. Reverting would restore the previously-rejected warning UX to fix a purely cosmetic ordering issue.Assigned: @jakubstec (PR author), @mountiny and @mkhutornyi (approving reviewers) from highest-confidence causing PR only — already assigned by melvin-bot, no change needed
Labels: No changes.
DeployBlockerCashis kept (an App PR caused this, and the issue is not reproducible on production).DeployBlockerwas not present, so nothing was removed.📋 Detailed Analysis
Evidence
VacationDelegateMissingWorkspacesPage)".MissingWorkspacesFooter.tsx+63,MissingWorkspacesIntro.tsx+48,WorkspaceRow.tsx+50,WorkspaceSection.tsx+48,index.tsx+174), confirmed viagh pr view 99460 --json files.2026-09-17T10:50:43Zand is item 17 in the chronological list of Deploy Checklist: New Expensify 2026-09-17 for9.4.84-0— the exact version reported./** Workspaces to list, in the order the policy diff returned them. Nothing is rendered when empty. */Verification
Affected files (all added by PR #99460):
src/pages/settings/Profile/CustomStatus/VacationDelegateMissingWorkspacesPage/WorkspaceSection.tsx#L36-L43— the render loop, no sort appliedsrc/pages/settings/Profile/CustomStatus/VacationDelegateMissingWorkspacesPage/WorkspaceSection.tsx#L16-L18— the prop doc confirming backend ordering is used verbatimsrc/pages/settings/Profile/CustomStatus/VacationDelegateMissingWorkspacesPage/index.tsx#L57-L60and#L153-L162— where the two ID arrays are read offpolicyDiffand passed straight toWorkspaceSectionA repo-wide grep for
policyDiff|adminPolicies|nonAdminPoliciesacrosssrc/shows nosortorlocaleCompareanywhere in this flow, so the omission is not compensated for further up or down the chain. No test intests/ui/VacationDelegateMissingWorkspacesPageTest.tsxasserts row ordering, so adding a sort will not break existing tests.Root Cause
policyDiffis stored verbatim from theSetVacationDelegate305 (POLICY_DIFF_WARNING) response into the vacation-delegate NVP (src/libs/actions/VacationDelegate.ts#L102-L110). ItsadminPoliciesandnonAdminPoliciesare plainstring[]of policy IDs (src/types/onyx/VacationDelegate.ts#L4-L11) whose order carries no meaning.index.tsxpasses those arrays through unchanged, andWorkspaceSectionmaps overpolicyIDsdirectly to render oneWorkspaceRoweach. Because the display name is only resolved insideWorkspaceRow(policy?.name ?? translate('workspace.common.unavailable')), the list is ordered by whatever sequence the API returned the IDs in, never by the name the user actually sees. Hence the non-alphabetical order.This is squarely an App-side fix: the response is well-formed and the ordering of an ID array is not something the backend should be relied on to guarantee — presentation order belongs in the client.
Suggested fix: resolve each row's title in
WorkspaceSectionand sort by it with the locale-aware comparator before rendering, matching the pattern used elsewhere in the app (const {translate, localeCompare} = useLocalize();, then sort). Two things to be careful about:policyIDsis the Onyx-owned array (vacationDelegate.policyDiff.adminPolicies);.sort()mutates its receiver, so copy first ([...policyIDs].sort(...)).workspace.common.unavailablefallback), not bypolicyID, so the order matches what is rendered. NouseMemo— this file compiles under React Compiler.adminWorkspacesinindex.tsx(used for the actual invite call) is unaffected; its order has no user-visible or functional meaning.15 remaining items
[-]Vacation delegate - Workspace are not arranged in alphabetical order[/-][+][Due for payment 2026-09-28] Vacation delegate - Workspace are not arranged in alphabetical order[/+]melvin-bot commentedon Sep 21, 2026
@mkhutornyi
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.90-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-09-28. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
[-][Due for payment 2026-09-28] Vacation delegate - Workspace are not arranged in alphabetical order[/-][+]Vacation delegate - Workspace are not arranged in alphabetical order[/+]mallenexpensify commentedon Sep 24, 2026
Partial reminder to self, payment isn't due here.
mkhutornyi commentedon Sep 24, 2026
We can close this
melvin-bot commentedon Sep 24, 2026
@mkhutornyi Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Sep 28, 2026
@mkhutornyi Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Sep 29, 2026
@mkhutornyi Eep! 4 days overdue now. Issues have feelings too...