Skip to content

89508 Search - "No content to add" error after clicking Ask Concierge with just a space #89524

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.66-1
Reproducible in staging?: Yes
Reproducible in production?: Unable to validate in Prod - Provide reasoning.
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #88727
Email or phone of affected tester (no customers): applausetester+sdodsaf@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Open search.
  3. Enter a space.
  4. Click Ask Concierge.

Expected Result:

Ask Concierge option should not appear when only a space is entered.

Actual Result:

Ask Concierge option shows up when only a space is entered.
"No content to add" error shows up due to the sent empty message.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

To be added by Applause Leads

View all open jobs on GitHub

Applause Internal Information
Exported by: Nathan Lemma
Bug ID: 7144271

Activity

  1. applause-bot commented on May 4, 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/1654ce51517637f2c71467be78be80106c09bed1af8ec9c1518e57e656e63721

  2. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 4, 2026
  3. github-actions commented on May 4, 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.
  4. melvin-bot commented on May 4, 2026

    @melvin-bot

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

  5. melvin-bot commented on May 4, 2026

    @melvin-bot

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

  6. MelvinBot commented on May 4, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The "Ask Concierge" option visibility in the search router is controlled by a truthiness check on textInputValue at SearchRouter.tsx:203. Since a space character ' ' is truthy in JavaScript, entering just a space causes both the "Find item" and "Ask Concierge" options to appear. When clicked, the space is passed untrimmed through useAskConcierge.tsx:34 to addComment, which sends the whitespace-only message to the backend. The backend rejects it with "No content to add".

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

    In SearchRouter.tsx:203, change textInputValue to textInputValue.trim() so the search query items (including Ask Concierge) only appear when meaningful non-whitespace input exists. As defense-in-depth, also add a trim guard at the top of the callback in useAskConcierge.tsx:24 to early-return if the trimmed query is empty.

    What alternative solutions did you explore?

    Could validate only at the addComment level in Report/index.ts, but that would still leave the UI showing Ask Concierge for whitespace-only input, which is a UX issue regardless of whether the message send is blocked. Trimming at the source (the search router) is cleaner.

    Investigation details

    Data flow:

    1. User types a space → textInputValue = ' '
    2. textInputValue is truthy → searchQueryItems array created with Ask Concierge item (line 203)
    3. User clicks Ask Concierge → item.searchQuery = ' ' extracted (line 325)
    4. askConcierge(' ') → addComment({ text: ' ' }) (useAskConcierge.tsx:30-34)
    5. addActions: if (text && !file) passes since ' ' is truthy (Report/index.ts:706)
    6. Whitespace message sent to backend → rejected with "No content to add"

    Related issue: #89522 is a duplicate of this issue.


    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. francoisl commented on May 4, 2026

    @francoisl
    Contributor

    Dupe of #89522?

  8. melvin-bot commented on May 4, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions