Skip to content

[Due for payment 2026-07-07] [Due for payment 2026-07-06] LHN - #admins room remains in LHN after deleting workspace #94747

Closed

Description

@applause-bot

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: 9.4.21-2
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: #94104
Email or phone of affected tester (no customers): sdjnoisdjdosijsonssjo@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Left Hand Navigation (LHN)

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a new Gmail account.
  3. Complete onboarding with Track expenses for my business.
  4. Delete the workspace.
  5. Go to Inbox.

Expected Result:

#admins room will be removed from LHN after deleting workspace.

Actual Result:

#admins room remains in LHN after deleting workspace.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7192411_1782511384097.1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7192411

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 27, 2026
  2. applause-bot commented on Jun 27, 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/380b18a42288bc3297ebe5e7a992a170abf2619d72268998d5f326aa07139fb7

  3. melvin-bot commented on Jun 27, 2026

    @melvin-bot

    @lakchote recently merged #94104, but they are OOO right now, so I'll auto-assign someone else.

  4. melvin-bot commented on Jun 27, 2026

    @melvin-bot

    Triggered auto assignment to @chuckdries (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  5. melvin-bot commented on Jun 27, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  6. github-actions commented on Jun 27, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  7. MelvinBot commented on Jun 27, 2026

    @MelvinBot
    Contributor

    Issue Analysis

    Root Cause: PR #94104 added two unconditional admin-room exemptions to the LHN visibility gates that don't account for the room's archived/deleted state:

    • SidebarUtils.ts:339 — (isChatReport(report) && isAdminRoom(report)) makes any admin room override the hidden gate.
    • ReportUtils.ts:9568 — !isAdminRoom(report) exempts admin rooms from the empty-chat exclusion.

    Before the PR, the empty #admins room was filtered out of the LHN, so deleting the workspace appeared to "remove" it. The PR force-shows it so the freshly-created Track workspace room stays visible — but the same exemptions now also keep it visible after the workspace is deleted.

    ⚠️ Important — this likely conflicts with intended behavior. Expensify/App#70413 (closed Sep 2025) was the inverse report: "#Admins room disappears from LHN after deleting workspace," and its agreed expected result was that the room should remain in the LHN in an archived state, so the user can still view history. The current tester's expected result ("room should be removed") directly contradicts that. So "room remains" may be working as intended, just shown as archived. This should be confirmed before treating it as a deploy blocker / writing a fix.

    The deciding question: after deletion, does the lingering #admins room render as archived (greyed, archived header) or as a normal/active room?

    Recommended fix (only if the room shows as active): scope the two exemptions to non-archived rooms (e.g. add && !isReportArchived at SidebarUtils.ts:339, and !(isAdminRoom(report) && !isReportArchived) at the ReportUtils.ts:9568 gate). This keeps the live workspace room visible while letting deleted/archived rooms fall through to the normal archived-report logic. Note this still leaves the room visible as archived (per #70413) — it does not make it vanish.

    Investigation details & evidence

    Deletion flow (researcher, high confidence on code path): deleteWorkspace optimistically archives all policy-related rooms — the admin room qualifies via isChatRoom and gets private_isArchived: currentTime on its REPORT_NAME_VALUE_PAIRS (Policy.ts:569-575, report set built in useTransactionViolationOfWorkspace.tsx:14-16). It is not removed from Onyx and not given pendingAction: DELETE on the report.

    So in the normal path the room should be archived after deletion → meaning it should remain visible (archived) by design, and PR #94104 doesn't change that. The only way PR #94104 is the true cause is if this specific Track-onboarding repro leaves the admin room non-archived (e.g. the reportsToArchive snapshot misses the freshly-onboarded room because its policyID/chatType isn't populated at deletion time). That's the thing to verify in the repro/video.

    PR #94104 diff: only added the two exemptions above plus a unit test — no archived/deleted guard. Files changed: src/libs/ReportUtils.ts (+1), src/libs/SidebarUtils.ts (+2), tests/unit/ReportUtilsTest.ts (+23).

    Alternative explanation considered & ruled in: the genuine conflict with Expensify/App#70413 is why I'm not recommending a blind "hide the room" fix — that would re-introduce the #70413 bug.

    Related issues

    • Expensify/App#70413 — (closed) inverse report; established the intended "remain archived after deletion" behavior. Read this before acting.

    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/94747) to create a draft PR (scoped-fix path).
    To refine: @MelvinBot <your feedback> — e.g. confirm from the video whether the lingering room is archived or active, and I'll narrow the analysis.
    To reject: Explain why you are rejecting Melvin's proposal.

  8. mountiny commented on Jun 29, 2026

    @mountiny
    Contributor

    @emkhalid @linhvovan29546 @lakchote fo visibility, I will revert the offending pr

  9. 4 remaining items

  10. izarutskaya commented on Jun 29, 2026

    @izarutskaya

    Build 9.4.21-7
    Windows 11 / Chrome
    Not repro

    admin.room.mp4
  11. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jun 29, 2026
  12. changed the title [-]LHN - #admins room remains in LHN after deleting workspace[/-] [+][Due for payment 2026-07-06] LHN - #admins room remains in LHN after deleting workspace[/+] on Jun 29, 2026
  13. melvin-bot commented on Jun 29, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  14. melvin-bot commented on Jun 29, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.21-9 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-07-06. 🎊

  15. melvin-bot commented on Jun 29, 2026

    @melvin-bot

    @mountiny The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]

  16. changed the title [-][Due for payment 2026-07-06] LHN - #admins room remains in LHN after deleting workspace[/-] [+][Due for payment 2026-07-07] [Due for payment 2026-07-06] LHN - #admins room remains in LHN after deleting workspace[/+] on Jun 30, 2026
  17. melvin-bot commented on Jun 30, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.24-0 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-07-07. 🎊

  18. melvin-bot commented on Jun 30, 2026

    @melvin-bot

    @mountiny The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]

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

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions