Skip to content

[Due for payment 2026-07-16] [$250] Workspace - Review your workspace settings task is not shown in concierge for admin member. #90933

Closed

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: V9.3.75-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-29923/folder/13177080/41237953/1417944864
Email or phone of affected tester (no customers): dreamnitethedragon+vegst@gmail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Win 10.chrome
App Component: Workspace Settings

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create workspace - add a member with admin role
  3. Log out and login as admin
  4. Open Concierge chat

Expected Result:

Review your workspace settings task must be shown in concierge for admin member.

Actual Result:

Review your workspace settings task is not shown in concierge for admin member.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Video.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022056283392920925963
  • Upwork Job ID: 2056283392920925963
  • Last Price Increase: 2026-05-18
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 18, 2026
  2. MelvinBot commented on May 18, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The invite onboarding flow (which creates the "Review your workspace settings" task) is blocked by getGuidedSetupDataForOpenReport when isOnboardingCompleted is true. This means that if the invited admin has already completed their initial guided setup flow (i.e. they are an existing user), the guard at line 1386 returns early and the admin invite tasks — including "Review your workspace settings" — are never created.

    The backend sets NVP_INTRO_SELECTED with choice='newDotAdmin' when a user is invited as admin, but the client-side guard conflates initial onboarding completion with invite onboarding completion. The correct guard for invite onboarding is isInviteOnboardingComplete, not isOnboardingCompleted.

    What changes do you think we should make in order to solve the problem?

    In getGuidedSetupDataForOpenReport, the early-return condition should not check isOnboardingCompleted for invite-specific choices (ADMIN, SUBMIT, CHAT_SPLIT). The isInviteOnboardingComplete flag already prevents duplicate invite onboarding.

    Restructure the guard so that:

    1. If introSelected is not set → return early (no onboarding needed)
    2. If the choice is an invite choice (ADMIN/SUBMIT/CHAT_SPLIT) → only check isInviteOnboardingComplete and hasOpenReportWithGuidedSetupData
    3. If the choice is a regular onboarding choice → check isOnboardingCompleted as before

    The same logic adjustment should be mirrored in the loading guard in ReportFetchHandler.tsx so that invite onboarding is properly delayed while the app is loading, even for users who already completed initial onboarding.

    What alternative solutions did you explore? (Optional)

    An alternative would be to have the backend reset hasCompletedGuidedSetupFlow when setting the admin invite NVP_INTRO_SELECTED, but this would be a worse approach because it conflates two independent onboarding states and could cause the user to re-enter the initial onboarding flow.

    Investigation details

    Data flow:

    1. Backend sets NVP_INTRO_SELECTED with choice='newDotAdmin' when a user is invited as admin to a workspace
    2. ReportFetchHandler reads introSelected from Onyx and passes it to openReport()
    3. openReport() calls getGuidedSetupDataForOpenReport() which checks the guard at line 1386
    4. For existing users, isOnboardingCompleted is true → function returns undefined → no tasks created

    Key code at Report/index.ts:1386:

    if (!introSelected || isOnboardingCompleted || isInviteOnboardingComplete || hasOpenReportWithGuidedSetupData) {
        return undefined;
    }

    The isOnboardingCompleted check is the problem — it prevents invite onboarding for any user who already completed initial onboarding, which is the common case for users invited as admin to an existing workspace.

    The ADMIN onboarding message is defined at OnboardingFlow.ts:353-356 and includes reviewWorkspaceSettingsTask and adminSubmitExpenseTask, posted to the Concierge chat (not the #admins room).


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  3. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 18, 2026
  4. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on May 18, 2026
  5. KJ21-ENG commented on May 18, 2026

    @KJ21-ENG
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2026-05-18 08:04:30 UTC.

    Proposal

    What is the root cause of that problem?

    The Review your workspace settings task is created from guidedSetupData sent with OpenReport, and the frontend already has the ADMIN onboarding message with reviewWorkspaceSettingsTask.

    The failure is that the admin-invite state is not reliable/complete:

    1. The backend does not consistently update the invited admin's nvp_introSelected to an admin workspace invite state. As shown in review, the user can still have an old selection, so the App opens Concierge without an admin-invite intent.
    2. When nvp_introSelected is correct, the App still treats nvp_onboarding.hasCompletedGuidedSetupFlow as a blocker for invite onboarding in getGuidedSetupDataForOpenReport() and in the loading guard in ReportFetchHandler. That flag only means normal guided setup is complete; invite onboarding should be controlled by introSelected.isInviteOnboardingComplete.

    So the task is not created because the backend must send the correct admin invite intent, and the frontend must not suppress that pending invite just because normal onboarding is already complete.

    What changes do you think we should make in order to solve the problem?

    Backend:

    • When a user is invited or added to a workspace with the admin role, update that user's nvp_introSelected to the admin workspace invite state: choice = ADMIN, inviteType = WORKSPACE, and isInviteOnboardingComplete = false, unless invite onboarding is already complete.
    • Do not reset hasCompletedGuidedSetupFlow; normal guided setup and invite onboarding are separate states.

    Frontend:

    • In ReportFetchHandler, base the invite loading guard on the invite state only: supported invite choices (ADMIN, SUBMIT, CHAT_SPLIT), not IOU/invoice invites, and isInviteOnboardingComplete = false. Remove the dependency on normal guided setup completion.
    • Keep the app-loading defer so the workspace settings link is built after policy data is available, and let the route-driven fetch retry when the corrected invite state or app-loading state changes.
    • In getGuidedSetupDataForOpenReport(), allow pending invite onboarding to bypass the normal hasCompletedGuidedSetupFlow blocker, while keeping the existing duplicate protection through isInviteOnboardingComplete and queued OpenReport requests with guidedSetupData.
    • Pass the invite path as wasInvited when preparing onboarding data so the optimistic update does not mark normal guided setup as newly completed.

    Test branch for the App-side frontend changes: main...KJ21-ENG:KJ21-ENG/90933-admin-invite-onboarding-v2

    What alternative solutions did you explore? (Optional)

    I considered deriving the admin invite state from policy role data on the frontend, but that is broader than necessary and could treat any existing workspace admin opening Concierge as an invite-onboarding user. The backend should own the invite intent; the frontend should honor the corrected NVP safely.

    I also considered resetting hasCompletedGuidedSetupFlow, but that would conflate normal guided setup with invite onboarding and could re-trigger the wrong onboarding state.

  6. David-2002065 commented on May 18, 2026

    @David-2002065
    Contributor

    Proposal

    What is the root cause of that problem?

    When an invited admin opens Concierge for the first time, the OpenReport API call is never sent with guidedSetupData, so the backend never creates the Review your workspace settings task that the admin onboarding flow expects.

    The flow that should fire is:

    1. ReportFetchHandler mounts on the Concierge route and calls fetchReport() from this effect — its deps are only route-related, so it fires once on mount and never re-fires when app data finishes loading:
      https://github.com/Expensify/App/blob/main/src/pages/inbox/ReportFetchHandler.tsx#L262-L267

    2. Inside fetchReport() there is a deliberate bail-out for invite-onboarded users while isLoadingApp is still true. The bail-out exists because workspaceSettingsLink needs the policy to be loaded first (see [Due for payment 2025-11-06] [$250] Workspace - Not found page is displayed when user tap on hyperlink "workspace setting" #71742). For an admin invitee (choice === ADMIN, inviteType === WORKSPACE) this branch returns early on the very first call:
      https://github.com/Expensify/App/blob/main/src/pages/inbox/ReportFetchHandler.tsx#L128-L140

    3. From that point on nothing re-triggers fetchReport() when isLoadingApp flips to false. None of the other effects in this file (wasJustWiped, anonymous→signed-in, INVITE_TO_ROOM, transaction-thread effects) match the Concierge admin-invite scenario, so openReport is never called with guidedSetupData.

    4. As a result, getGuidedSetupDataForOpenReport never gets a chance to build the optimistic admin tasks (reviewWorkspaceSettingsTask, adminSubmitExpenseTask) defined for the ADMIN choice:
      https://github.com/Expensify/App/blob/main/src/libs/actions/Report/index.ts#L1376-L1396
      https://github.com/Expensify/App/blob/main/src/libs/actions/Welcome/OnboardingFlow.ts#L353-L356

    The bail-out at step 2 is correct in spirit (we must wait for policy data), but the missing companion — a re-trigger once the data is actually ready — is what causes the task to never appear in Concierge for admin invitees.

    What changes do you think we should make in order to solve the problem?

    Add a one-shot re-trigger effect in ReportFetchHandler that calls fetchReport() again once both isLoadingApp and isLoadingReportData are false, but only for users whose introSelected matches the invite-onboarding criteria the bail-out checks for. A ref guards against repeated calls.

         const isInviteOnboardingComplete = introSelected?.isInviteOnboardingComplete ?? false;
         const isOnboardingCompleted = onboarding?.hasCompletedGuidedSetupFlow ?? false;
    +    const didTriggerInviteOnboardingFetchRef = useRef(false);
         useEffect(() => {
             // This function is triggered when a user clicks on a link to navigate to a report.
             // For each link click, we retrieve the report data again, even though it may already be cached.
             // There should be only one openReport execution per page start or navigating
             fetchReport();
         }, [route, isLinkedMessagePageReady, reportActionIDFromRoute]);
    +
    +    // Re-trigger fetchReport for invite onboarding users once both isLoadingApp and
    +    // isLoadingReportData are false. The bail-out inside fetchReport waits for policy
    +    // and concierge report data; this effect resumes it exactly once when that data
    +    // becomes available. Using a ref (instead of usePrevious) covers the iOS case
    +    // where the component mounts after isLoadingApp is already false.
    +    // See: https://github.com/Expensify/App/issues/74781
    +    useEffect(() => {
    +        if (isLoadingApp || isLoadingReportData || didTriggerInviteOnboardingFetchRef.current) {
    +            return;
    +        }
    +        if (isOnboardingCompleted || isInviteOnboardingComplete || !introSelected) {
    +            return;
    +        }
    +        const {choice, inviteType} = introSelected;
    +        const isInviteIOUorInvoice = inviteType === CONST.ONBOARDING_INVITE_TYPES.IOU || inviteType === CONST.ONBOARDING_INVITE_TYPES.INVOICE;
    +        const isInviteChoiceCorrect = choice === CONST.ONBOARDING_CHOICES.ADMIN || choice === CONST.ONBOARDING_CHOICES.SUBMIT || choice === CONST.ONBOARDING_CHOICES.CHAT_SPLIT;
    +        if (isInviteChoiceCorrect && !isInviteIOUorInvoice) {
    +            didTriggerInviteOnboardingFetchRef.current = true;
    +            fetchReport();
    +        }
    +    }, [isLoadingApp, isLoadingReportData, introSelected, isOnboardingCompleted, isInviteOnboardingComplete]);

    Supporting change: add a wasInvited: true argument when getGuidedSetupDataForOpenReport calls prepareOnboardingOnyxData (src/libs/actions/Report/index.ts near L1404-L1412), so the optimistic update does not incorrectly flip hasCompletedGuidedSetupFlow for users who reached Concierge via the invite path. A test in tests/unit/pages/inbox/ReportFetchHandlerTest.tsx should cover the case where isLoadingApp starts as true and transitions to false with introSelected.choice === ADMIN.

    What alternative solutions did you explore? (Optional)

    • Add isLoadingApp to the dependency array of the existing route-driven fetchReport effect at L262-L267. Rejected because that effect is intentionally scoped to route navigation (route, isLinkedMessagePageReady, reportActionIDFromRoute); broadening its deps would also re-fire openReport on every isLoadingApp toggle for users not in the invite-onboarding state, producing redundant API calls and undoing the original narrowing of that effect.

    • Drop the isLoadingApp guard inside fetchReport (L128-L140). Rejected because the guard was added specifically to prevent the workspaceSettingsLink from being built before policies load ([Due for payment 2025-11-06] [$250] Workspace - Not found page is displayed when user tap on hyperlink "workspace setting" #71742). Removing it brings back that bug — the admin task would appear with an empty/broken workspace link.

    • Move the gating into getGuidedSetupDataForOpenReport so openReport always runs and only the guided-setup payload is deferred. Rejected because the persisted-request dedup (hasOpenReportWithGuidedSetupData) already counts on the first OpenReport carrying the guided-setup payload; deferring it would require a second OpenReport call and a more invasive dedup change for what is essentially a missing re-trigger.

  7. melvin-bot commented on May 18, 2026

    @melvin-bot

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

  8. changed the title [-]Workspace - Review your workspace settings task is not shown in concierge for admin member.[/-] [+][$250] Workspace - Review your workspace settings task is not shown in concierge for admin member.[/+] on May 18, 2026
  9. melvin-bot commented on May 18, 2026

    @melvin-bot
  10. github-actions commented on May 18, 2026

    @github-actions
    Contributor

    ⚠️ @dilshodmackbook-sketch Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.

  11. MobileMage commented on May 18, 2026

    @MobileMage
    Contributor

    🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.

  12. github-actions commented on May 18, 2026

    @github-actions
    Contributor

    ⚠️ @MobileMage Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.

  13. 71 remaining items

  14. melvin-bot commented on Jul 15, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  15. melvin-bot commented on Jul 15, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/2056283392920925963/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  16. mallenexpensify commented on Jul 17, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @KJ21-ENG paid $250 via Upwork
    Contributor+: @cretadn22 due $250 via NewDot

    @KJ21-ENG can you please accept the job below? Please reply here and tag me once you have.
    If you're not sent an offer in Upwork when you're assigned to an issue, please tag me. If an Upwork job exists, please submit a proposal.
    https://www.upwork.com/jobs/~022078259734776686091

    ^ Test case created. Thx

  17. KJ21-ENG commented on Jul 18, 2026

    @KJ21-ENG
    Contributor

    @mallenexpensify Offer accepted, Thanks!

  18. JmillsExpensify commented on Jul 18, 2026

    @JmillsExpensify
    Contributor

    $250 approved for @cretadn22

  19. KJ21-ENG commented on Jul 21, 2026

    @KJ21-ENG
    Contributor

    @mallenexpensify Pinging here in case missed, Thanks!

  20. mallenexpensify commented on Jul 22, 2026

    @mallenexpensify
    Contributor

    @KJ21-ENG paid, summary updated above. Thx.

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething 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