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
Workspace - Workspace selection list does not appear when creating a report #99334
Version Number: 9.4.59-3 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#98973 Email or phone of affected tester (no customers):jose.sat94+10jul@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: MacBook Pro/13.7.8, iPhone 13/18.6.2 App Component: Other
Action Performed:
Launch Expensify app
Log in with valid credentials to an account with 2+ workspaces
Press FAB and select "Create report"
Expected Result:
The workspace selection list opens, allowing the user to select a workspace. Each workspace row displays its corresponding avatar next to its name.
Actual Result:
The workspace selection list does not appear. A report is created directly without allowing the user to select a workspace.
Root cause: This is very likely expected behavior, not a code defect. The FAB → "Create report" flow intentionally skips the workspace selection list and creates the report directly whenever the account has an active (default) eligible group workspace. The picker only opens when the default is personal (no active group workspace) and there are 2+ eligible group workspaces.
constisDefaultPersonal=!activePolicy||activePolicy.type===CONST.POLICY.TYPE.PERSONAL||!isGroupPolicy(activePolicy);consthasMultipleNonPersonalWorkspaces=groupPoliciesWithChatEnabled.length>1;if(!workspaceIDForReportCreation||(isDefaultPersonal&&hasMultipleNonPersonalWorkspaces)||(isDefaultBillingRestricted&&hasMultipleNonPersonalWorkspaces)){// ...navigate to the workspace selection list}
When the test account has an active workspace set, isDefaultPersonal is false and workspaceIDForReportCreation resolves to that active policy, so none of the "show selector" conditions match → the report is created directly in the active workspace. Having "2+ workspaces" alone is not sufficient to open the picker.
This branching (auto-select the default workspace and skip the picker) was introduced back in May 2026 (PR #88374, "auto-select workspace after confirmation on creating report"), which is consistent with the report being reproducible in both staging and production.
Most likely explanation: PR #98973's QA precondition ("account with 2+ workspaces → picker opens") is incomplete. The picker only opens for a 2+ workspace account when no active group workspace is set (default is personal). The tester's account almost certainly had an active workspace, so it correctly created the report directly.
Recommended next step: This needs a product decision rather than a straightforward code fix:
If current behavior is intended → update the QA precondition: the tester must have a personal active workspace (or no active group workspace) to reach the selection list, then re-run PR #98973's QA.
If the picker should always appear for 2+ workspaces → the fix is to loosen the condition at useCreateReport.tsx:122 so it opens on hasMultipleNonPersonalWorkspaces regardless of isDefaultPersonal. Note this would change long-standing intended behavior and affect the FAB, the Search "Create" dropdown, and the empty-reports state, so it should be confirmed with the team first.
getDefaultChatEnabledPolicy returns the active policy when it is an eligible group policy — so workspaceIDForReportCreation is defined and isDefaultPersonal is false.
Back in useCreateReport.tsx:122-137, with a defined non-personal default, control falls through to onCreateReport(false) (or the empty-report confirmation), creating the report directly.
Two conditions must both hold for the picker to appear:
Default workspace is personal (isDefaultPersonal — i.e. no active group workspace), and
If the account's "2+ workspaces" include only one eligible group workspace, or an active group workspace is set, the picker is skipped by design.
Alternative explanations considered: A regression from PR #98973 was ruled out — that PR only migrated workspace avatar rendering (PolicyAvatar/usePolicyIcons) and did not touch the create-report branching. The bug being reproducible in production also rules out an unmerged-PR regression.
Confidence: High on the mechanism (why the picker is skipped); the open question of whether the current behavior is correct is a product decision.
Related issues
No clear duplicate found in a quick scan of open issues.
Next Steps for Contributor+ team: To accept the "expected behavior" conclusion: update PR #98973's QA precondition (personal active workspace / no active group workspace) and re-run. To change the behavior: confirm the product decision with the team, then @MelvinBot implement this to loosen the condition. To refine:@MelvinBot <your feedback> To reject: explain why.
I traced this end to end and I agree with the overall conclusion that this is working as intended, but I want to correct two things in the analysis above so the C+ has an accurate picture.
The #88374 attribution is wrong. PR #88374 is "Reapply: Show Create Report CTA for users without a workspace" — it adds the no-workspace → upgrade flow (fixing #83782/#84139). It does not introduce the "skip the picker when an active workspace exists" branching, so it can't be cited as the origin of this behavior.
The real evidence that this is intentional is in the tests, not that PR. The gate lives at useCreateReport.tsx#L117-L122, and the intended contract is spelled out verbatim in the unit tests:
useCreateReportTest.tsx#L195: "Per spec: selector shows iff default workspace is personal AND user has 2+ non-personal options."
useCreateReportTest.tsx#L219-L238: "does NOT show selector when default is non-personal, even with multiple non-personal workspaces" — "Per spec: if default is already non-personal, just create in default — no selector."
So the reporter's account clearly had an active group workspace set. getDefaultChatEnabledPolicy resolves the default to that active policy, isDefaultPersonal is false, and by the spec above the report is created directly — no picker. Having "2+ workspaces" is not sufficient on its own; the default must also be personal. This matches "reproducible in staging and production" — nothing changed here.
On the code defect question: there isn't one. The current behavior is the specified behavior, backed by the tests above. PR #98973 only migrated workspace-avatar rendering (PolicyAvatar/usePolicyIcons) and never touched this branching, so it's not a regression from that PR either — its QA precondition is just incomplete.
Recommended resolution: treat this as a QA-precondition fix, not a code change. To exercise PR #98973's picker step, the tester's account needs a personal (or unset) active workspace plus 2+ eligible group workspaces; with an active group workspace, direct creation is correct. If the team instead decides the picker should always appear for 2+ workspaces, that's a product change that would also require updating the three // Per spec tests above, so it should be confirmed as an intentional behavior change first.
@ZhenjaHorbach flagging for the product call on whether the current "skip picker when an active group workspace exists" contract is what we want, or whether this is purely a QA-steps correction.
Activity
applause-bot commentedon Aug 24, 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/75dc1d89f6a646f48f0f2caa15db8dddadfaa5e3bbd773ecf44931018d7c4687
MelvinBot commentedon Aug 24, 2026
Issue Analysis
Root cause: This is very likely expected behavior, not a code defect. The FAB → "Create report" flow intentionally skips the workspace selection list and creates the report directly whenever the account has an active (default) eligible group workspace. The picker only opens when the default is personal (no active group workspace) and there are 2+ eligible group workspaces.
The gating lives in
useCreateReport.tsx:117-122:When the test account has an active workspace set,
isDefaultPersonalisfalseandworkspaceIDForReportCreationresolves to that active policy, so none of the "show selector" conditions match → the report is created directly in the active workspace. Having "2+ workspaces" alone is not sufficient to open the picker.This branching (auto-select the default workspace and skip the picker) was introduced back in May 2026 (PR
#88374, "auto-select workspace after confirmation on creating report"), which is consistent with the report being reproducible in both staging and production.Most likely explanation: PR
#98973's QA precondition ("account with 2+ workspaces → picker opens") is incomplete. The picker only opens for a 2+ workspace account when no active group workspace is set (default is personal). The tester's account almost certainly had an active workspace, so it correctly created the report directly.Recommended next step: This needs a product decision rather than a straightforward code fix:
#98973's QA.useCreateReport.tsx:122so it opens onhasMultipleNonPersonalWorkspacesregardless ofisDefaultPersonal. Note this would change long-standing intended behavior and affect the FAB, the Search "Create" dropdown, and the empty-reports state, so it should be confirmed with the team first.Investigation details
Flow (FAB "Create report"):
CreateReportMenuItem.tsx:53-57buildsgroupPoliciesWithChatEnabled(eligible group policies, capped at 2) and resolvesdefaultChatEnabledPolicyviagetDefaultChatEnabledPolicy.getDefaultChatEnabledPolicyreturns the active policy when it is an eligible group policy — soworkspaceIDForReportCreationis defined andisDefaultPersonalisfalse.useCreateReport.tsx:122-137, with a defined non-personal default, control falls through toonCreateReport(false)(or the empty-report confirmation), creating the report directly.Two conditions must both hold for the picker to appear:
isDefaultPersonal— i.e. no active group workspace), andgetGroupPoliciesWhereReportCanBeCreated: paid-group or submit policies that are shown).If the account's "2+ workspaces" include only one eligible group workspace, or an active group workspace is set, the picker is skipped by design.
Alternative explanations considered: A regression from PR
#98973was ruled out — that PR only migrated workspace avatar rendering (PolicyAvatar/usePolicyIcons) and did not touch the create-report branching. The bug being reproducible in production also rules out an unmerged-PR regression.Confidence: High on the mechanism (why the picker is skipped); the open question of whether the current behavior is correct is a product decision.
Related issues
No clear duplicate found in a quick scan of open issues.
Next Steps for Contributor+ team:
To accept the "expected behavior" conclusion: update PR
#98973's QA precondition (personal active workspace / no active group workspace) and re-run.To change the behavior: confirm the product decision with the team, then
@MelvinBot implement thisto loosen the condition.To refine:
@MelvinBot <your feedback>To reject: explain why.
view run
melvin-bot commentedon Aug 24, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach (
External)melvin-bot commentedon Aug 24, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
mukhrr commentedon Aug 24, 2026
I think this is expected
David-2002065 commentedon Aug 24, 2026
I traced this end to end and I agree with the overall conclusion that this is working as intended, but I want to correct two things in the analysis above so the C+ has an accurate picture.
The
#88374attribution is wrong. PR #88374 is "Reapply: Show Create Report CTA for users without a workspace" — it adds the no-workspace → upgrade flow (fixing #83782/#84139). It does not introduce the "skip the picker when an active workspace exists" branching, so it can't be cited as the origin of this behavior.The real evidence that this is intentional is in the tests, not that PR. The gate lives at
useCreateReport.tsx#L117-L122, and the intended contract is spelled out verbatim in the unit tests:useCreateReportTest.tsx#L195: "Per spec: selector shows iff default workspace is personal AND user has 2+ non-personal options."useCreateReportTest.tsx#L219-L238: "does NOT show selector when default is non-personal, even with multiple non-personal workspaces" — "Per spec: if default is already non-personal, just create in default — no selector."useCreateReportTest.tsx#L240-L260: same guarantee for a Submit workspace.So the reporter's account clearly had an active group workspace set.
getDefaultChatEnabledPolicyresolves the default to that active policy,isDefaultPersonalisfalse, and by the spec above the report is created directly — no picker. Having "2+ workspaces" is not sufficient on its own; the default must also be personal. This matches "reproducible in staging and production" — nothing changed here.On the code defect question: there isn't one. The current behavior is the specified behavior, backed by the tests above. PR #98973 only migrated workspace-avatar rendering (
PolicyAvatar/usePolicyIcons) and never touched this branching, so it's not a regression from that PR either — its QA precondition is just incomplete.Recommended resolution: treat this as a QA-precondition fix, not a code change. To exercise PR #98973's picker step, the tester's account needs a personal (or unset) active workspace plus 2+ eligible group workspaces; with an active group workspace, direct creation is correct. If the team instead decides the picker should always appear for 2+ workspaces, that's a product change that would also require updating the three
// Per spectests above, so it should be confirmed as an intentional behavior change first.@ZhenjaHorbach flagging for the product call on whether the current "skip picker when an active group workspace exists" contract is what we want, or whether this is purely a QA-steps correction.
melvin-bot commentedon Aug 27, 2026
@ZhenjaHorbach Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
ZhenjaHorbach commentedon Aug 28, 2026
Yeah
Looks like an expected behaviour
ZhenjaHorbach commentedon Aug 28, 2026
🎀👀🎀
melvin-bot commentedon Aug 28, 2026
Triggered auto assignment to @neil-marcellini, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
ZhenjaHorbach commentedon Aug 28, 2026
@neil-marcellini
I suppose we can close this since it's an expected behaviour
melvin-bot commentedon Aug 31, 2026
@neil-marcellini Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
neil-marcellini commentedon Sep 1, 2026
Yep this is expected. I'll comment in Slack and make sure those involved in the PR where this was found update the steps and get it properly QAed.
neil-marcellini commentedon Sep 1, 2026
Brought to Slack for QA updates, all done here.