Skip to content

Workspace - Workspace selection list does not appear when creating a report #99334

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


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:

  1. Launch Expensify app
  2. Log in with valid credentials to an account with 2+ workspaces
  3. 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.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7240352_1787436080684.bugg.1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7240352

Issue OwnerCurrent Issue Owner: @neil-marcellini

Activity

  1. applause-bot commented on Aug 24, 2026

    @applause-bot
    Author

    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

  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 24, 2026
  3. MelvinBot commented on Aug 24, 2026

    @MelvinBot
    Contributor

    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:

    const isDefaultPersonal = !activePolicy || activePolicy.type === CONST.POLICY.TYPE.PERSONAL || !isGroupPolicy(activePolicy);
    const hasMultipleNonPersonalWorkspaces = 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.
    Investigation details

    Flow (FAB "Create report"):

    Two conditions must both hold for the picker to appear:

    1. Default workspace is personal (isDefaultPersonal — i.e. no active group workspace), and
    2. 2+ eligible group workspaces where a report can be created (getGroupPoliciesWhereReportCanBeCreated: 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 #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.


    view run

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 24, 2026
  5. melvin-bot commented on Aug 24, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach (External)

  6. melvin-bot commented on Aug 24, 2026

    @melvin-bot

    Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

  7. mukhrr commented on Aug 24, 2026

    @mukhrr
    Contributor

    I think this is expected

  8. David-2002065 commented on Aug 24, 2026

    @David-2002065
    Contributor

    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:

    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.

  9. melvin-bot commented on Aug 27, 2026

    @melvin-bot

    @ZhenjaHorbach Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  10. ZhenjaHorbach commented on Aug 28, 2026

    @ZhenjaHorbach
    Contributor

    Yeah
    Looks like an expected behaviour

  11. ZhenjaHorbach commented on Aug 28, 2026

    @ZhenjaHorbach
    Contributor

    🎀👀🎀

  12. melvin-bot commented on Aug 28, 2026

    @melvin-bot

    Triggered auto assignment to @neil-marcellini, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  13. ZhenjaHorbach commented on Aug 28, 2026

    @ZhenjaHorbach
    Contributor

    @neil-marcellini
    I suppose we can close this since it's an expected behaviour

  14. melvin-bot commented on Aug 31, 2026

    @melvin-bot

    @neil-marcellini Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  15. neil-marcellini commented on Sep 1, 2026

    @neil-marcellini
    Contributor

    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.

  16. neil-marcellini commented on Sep 1, 2026

    @neil-marcellini
    Contributor

    Brought to Slack for QA updates, all done here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions