Skip to content

[Due for payment 2026-06-12] [$250] Expense - Colon symbol category cannot be selected as category #91133

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.3.78-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #85448
Email or phone of affected tester (no customers): sdsdjoijdoisnjodis@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Click + > Create expense > Manual.
  4. Enter amount > Next.
  5. On confirm page, click Category.
  6. Select any category.
  7. Click Category.
  8. Click + button.
  9. Enter : and save it.
    → Category is cleared after selecting :
  10. Open Category field.
    → : category is missing.
  11. Click + button.
  12. Enter : and save it.
    → It shows that the category exists but it is missing in the list.

Expected Result:

In Step 9, after entering colon symbol, the colon symbol will be the category.

Actual Result:

In Step 9, after entering colon symbol, the category is cleared.
In Step 10, the added colon symbol category is missing in category list.
In Step 12, tt shows that the colon symbol category exists but it is missing in the list.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7158349_1779229159073.1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7158349

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022057157946292784839
  • Upwork Job ID: 2057157946292784839
  • Last Price Increase: 2026-05-20
  • Automatic offers:
    • ijmalik | Contributor | 111531827
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. applause-bot commented on May 19, 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/7c1830620e44adfbd1af7c449ee4967c51c036b9831bfe913621a2a5c62f08c8

  2. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 19, 2026
  3. melvin-bot commented on May 19, 2026

    @melvin-bot

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

  4. melvin-bot commented on May 19, 2026

    @melvin-bot

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

  5. github-actions commented on May 19, 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.
  6. MelvinBot commented on May 19, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The new processCategoryNameSegments function (introduced in PR #85448) splits category names on : and filters out empty segments. When the category name is just ":", ":".split(":") produces ["", ""] — both empty strings are filtered out, returning an empty array [].

    This empty array causes three cascading failures:

    1. Category disappears from the list — getCategoryOptionTree iterates an empty array, so ":" is never added to the option tree.
    2. Selected category appears cleared — getDecodedLeafCategoryName returns "" for ":", so CategoryField displays a blank title.
    3. sortCategories drops the category — lodashSet(hierarchy, [], value) with an empty path is a no-op, silently losing the entry.

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

    In processCategoryNameSegments (src/libs/CategoryUtils.ts:163), add an early return when the result array is empty but the original category name is non-empty. If all segments are empty after filtering (meaning the name consists entirely of colons/whitespace), return the original trimmed name as a single-element array instead of []. This preserves the category as a valid leaf node.

    What alternative solutions did you explore?

    Investigation details

    Data flow:

    1. User creates category ":" → backend stores it
    2. sortCategories → processCategoryNameSegments(":") → [] → lodashSet(hierarchy, [], ...) is a no-op → category lost
    3. getCategoryOptionTree → same empty array → loop never runs → category invisible in picker
    4. getDecodedLeafCategoryName(":") → [] → undefined ?? "" → CategoryField shows blank title
    5. User tries to re-create ":" → backend says it exists, but UI can't display it

    Affected code paths:

    Possibly related: #82068 (multi-level categories with colons display issues)


    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.

  7. ijmalik commented on May 20, 2026

    @ijmalik
    Contributor

    This behavior is not a regression introduced by PR #85448. I’ve tested the same scenario in OldDot/Classic and confirmed that a colon‑only category : cannot be selected there either – it appears as an empty line in the dropdown and clicking it does nothing (the category field remains empty).

    Our PR’s behavior (the category not appearing in the list) is visually different but functionally identical to OldDot: the category : is not selectable.

    For a detailed breakdown, please see my comment in the PR: #85448 (comment)

    If the team decides that : should be selectable (unlike OldDot), that would be an enhancement request – but it is not a regression caused by this PR. I recommend closing this issue as “not a regression” (consistent with legacy behavior). Please let me know if you’d still like me to change the PR.

    Please see OldDot Demo Video

  8. ZhenjaHorbach commented on May 20, 2026

    @ZhenjaHorbach
    Contributor

    This behavior is not a regression introduced by PR #85448. I’ve tested the same scenario in OldDot/Classic and confirmed that a colon‑only category : cannot be selected there either – it appears as an empty line in the dropdown and clicking it does nothing (the category field remains empty).

    Our PR’s behavior (the category not appearing in the list) is visually different but functionally identical to OldDot: the category : is not selectable.

    For a detailed breakdown, please see my comment in the PR: #85448 (comment)

    If the team decides that : should be selectable (unlike OldDot), that would be an enhancement request – but it is not a regression caused by this PR. I recommend closing this issue as “not a regression” (consistent with legacy behavior). Please let me know if you’d still like me to change the PR.

    Please see OldDot Demo Video

    Thanks for checking!
    Plus, I think we can remove the deploy blocker
    Since it's a real edge case

  9. yuwenmemon commented on May 20, 2026

    @yuwenmemon
    Contributor

    Major edge case, yeah. And as @ijmalik pointed out here: #85448 (comment) this also happens on old dot as well.

  10. 49 remaining items

  11. ijmalik commented on Jun 22, 2026

    @ijmalik
    Contributor

    @ZhenjaHorbach – gentle ping. @mallenexpensify asked for your input on payment/regression a week ago. Could you take a look when you get a moment? Happy to provide context if needed. Thanks!

  12. mallenexpensify commented on Jun 22, 2026

    @mallenexpensify
    Contributor

    Apologies for the delay @ijmalik , I made @ZhenjaHorbach the issue owner and will ping them in Slack too.

  13. mallenexpensify commented on Jun 22, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @ijmalik paid $125 via Upwork
    Contributor+: @ZhenjaHorbach due $125 via NewDot

    Treating this as a followup, comment/reopen if you disagree. Followup cuz of the breakdown from @ijmalik here

    @ijmalik can you please accept the job below? Please reply here and tag me once you have.
    https://www.upwork.com/jobs/~022069128613906233002

  14. melvin-bot commented on Jun 22, 2026

    @melvin-bot

    @mallenexpensify Huh... This is 4 days overdue. Who can take care of this?

  15. ijmalik commented on Jun 23, 2026

    @ijmalik
    Contributor

    @mallenexpensify Done – I've accepted the job here . Thanks!

  16. mallenexpensify commented on Jun 23, 2026

    @mallenexpensify
    Contributor

    @ijmalik paid, summary updated above. Thx.

    When paying I found a duplicate contract I cancelled too. Apologies for that.

  17. garrettmknight commented on Jun 29, 2026

    @garrettmknight
    Contributor

    $125 approved for @ZhenjaHorbach

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.DailyKSv2EngineeringExternalAdded 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