Skip to content

[Due for payment 2026-11-11] [$175] Categories disappear after creating category from confirm page when submitting to employer #105809

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.5.31-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: #105575
Email or phone of affected tester (no customers): nojdosoijso@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Account has no workspace.
  1. Go to staging.new.expensify.com
  2. Go to self DM.
  3. Create an expense.
  4. Click Submit to my employer.
  5. On confirm page, click Category.
  6. Enter anything that will not return result.
  7. Click Create category.
  8. Click Category field.

Expected Result:

The default categories will not disappear after creating category from confirm page.

Actual Result:

The default categories disappear after creating category from confirm page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7304014_1793735716744.2.mp4

View all open jobs on GitHub

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

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @Krishna2323

Activity

  1. added
    DeployBlockerCash
    Bug
    on Nov 3, 2026
  2. applause-bot commented on Nov 3, 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/b40876d16cb2a5caa4ed938404d6f4cfc1f25cb83b43978423da451150d7d1ed

  3. melvin-bot commented on Nov 3, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #105575

  4. melvin-bot commented on Nov 3, 2026

    @melvin-bot

    @JS00001 @Krishna2323 you have been assigned to this deploy blocker because you reviewed the offending PR: #105575

  5. melvin-bot commented on Nov 3, 2026

    @melvin-bot

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

  6. github-actions commented on Nov 3, 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 Nov 3, 2026

    @MelvinBot
    Contributor

    Proposal

    Recommendation: revert Offer to create the searched-for category when a category search has no results unless a draft-aware fix can be verified immediately. Keep the deploy blocker.

    What is the root cause of that problem?

    The new creation flow treats a draft workspace as a saved workspace. Creating one category clears the draft categories, removing the defaults. Confidence: medium; code traced, not browser-verified.

    Code evidence

    This explains the disappearance without a search-filter bug or backend failure. The older + creation route uses the same unsafe action; reverting removes the new trigger, not that underlying defect.

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

    For draft workspaces, update draft categories locally and preserve defaults. Avoid saved-workspace category API calls before workspace creation. Test both creation routes and confirm custom categories survive final submission. Changing picker precedence alone will not preserve deleted draft data.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](hyperlink) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.


    view run

  8. Krishna2323 commented on Nov 4, 2026

    @Krishna2323
    Contributor

    @MelvinBot Please investigate how this issue relates to #101766 and its fix PR #105138, then recommend what we should do next.

    Context:

    Please check:

    1. Is [Due for payment 2026-11-11] [$175] Categories disappear after creating category from confirm page when submitting to employer #105809 caused by the same draft workspace problem as Expense - Not here error when trying to add category to submit to employer flow #101766? Would merging Create a real workspace when submitting a tracked expense to an employer with no workspace #105138 fix it on its own?
    2. Does createPolicyCategory send an API request for a workspace that only exists as a draft? What does that request do?
    3. Until Create a real workspace when submitting a tracked expense to an employer with no workspace #105138 merges, should we hide the create row when the workspace only exists in POLICY_DRAFTS? If so, where should that check live so it covers both the confirm page dropdown and the Category step page?

    Please give a clear recommendation: a small follow-up fix, waiting for #105138, or a revert. Include exact file:line references. Please don't open a PR yet.

  9. MelvinBot commented on Nov 4, 2026

    @MelvinBot
    Contributor

    Proposal

    Ship a small follow-up guard now; do not wait for Create a real workspace when submitting a tracked expense to an employer with no workspace. Revert only if that guard cannot be verified promptly.

    What is the root cause of that problem?

    Both issues involve draft-only workspaces. Expense - Not here error when trying to add category to submit to employer flow stops at the add-page access check; inline creation bypasses it.

    Evidence and API behavior

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

    Hide creation in shared CategoryPicker/index.tsx:169–177 when POLICY_DRAFTS contains the policy but POLICY does not. Wait for both subscriptions to resolve. This covers both callers; preserve offline creation for real optimistic workspaces. Verify both entry points before release.

    Confidence: medium; source-verified only. No PR opened.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](hyperlink) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.


    view run

  10. 1 remaining item

  11. melvin-bot commented on Nov 4, 2026

    @melvin-bot

    ⚠️ Something went wrong. This may be a transient issue. Try again. If it persists, check status.openai.com.

  12. Krishna2323 commented on Nov 4, 2026

    @Krishna2323
    Contributor
  13. MelvinBot commented on Nov 4, 2026

    @MelvinBot
    Contributor

    🤖 Web test steps verification results: ⚠️ partial

    Verified on dev NewDot web: draft-workspace full Category step hides searched-name creation and preserves default selection; real workspace supports searched-name creation. Anchored confirmation dropdown was unavailable in this session.

    Real workspace offers searched-name category creation

    Step Status
    Draft-workspace confirmation dropdown hides Create categoryConfirmation Category navigated to the full Category step instead of an anchored dropdown.
    ⚠️
    Draft-workspace full Category step hides searched-name creationSearching UnmatchedDraft105809 showed No results found, retained Add category, and showed no Create category option.
    Draft workspace unmatched category search without creation row
    ✅
    Default categories remain selectableClearing search restored all 19 default categories. Selecting Advertising returned to confirmation with Category, Advertising.
    ✅
    Existing +/Add category entry remainsAdd category remained present for draft and real workspaces. Real workspace opened the Name/Save form. Draft workspace opened a not-found page; baseline equivalence was not established.
    ⚠️
    Real workspace supports searched-name category creationSearch offered Create “Real105809Category” category. Selecting it returned with that category applied; reopening showed the new category alongside defaults.
    Real workspace offers searched-name category creation
    ✅
    Offline optimistic creationNetwork interception/offline emulation is outside the supported web-driving surface.
    ⚠️

    Draft PR: Hide searched category creation for draft-only workspaces, assigned to Krishna2323. Both caller guards are implemented; + is unchanged. Categorize and Share with accountant also need the guard; Travel promotes its draft immediately. All 11 targeted tests and relevant TypeScript projects passed, including offline fixtures for both callers. Broad checks timed out; formatter checking was blocked. Details are in the PR. Please mark it ready for review when your testing is complete.


    view run · no recording available

  14. added
    Reviewing
    on Nov 4, 2026
  15. changed the title [-]Categories disappear after creating category from confirm page when submitting to employer[/-] [+][$175] Categories disappear after creating category from confirm page when submitting to employer[/+] on Nov 4, 2026
  16. melvin-bot commented on Nov 4, 2026

    @melvin-bot
  17. IuliiaHerets commented on Nov 4, 2026

    @IuliiaHerets

    Issue is not repro anymore

    Original.issue.not.rpero.mp4
  18. removed
    DeployBlockerCash
    on Nov 4, 2026
  19. added
    Daily
    and removed
    Reviewing
    Hourly
    on Nov 4, 2026
  20. changed the title [-][$175] Categories disappear after creating category from confirm page when submitting to employer[/-] [+][Due for payment 2026-11-11] [$175] Categories disappear after creating category from confirm page when submitting to employer[/+] on Nov 4, 2026
  21. melvin-bot commented on Nov 4, 2026

    @melvin-bot

    @Krishna2323

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.31-4 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-11-11. 🎊

    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]

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

Metadata

Metadata

Labels

BugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions