Skip to content

[Due for payment 2026-05-13] [Due for payment 2026-05-12] Search - "No content to add" error after clicking Ask Concierge with just a space #89522

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

Bug7144271_1777908054041.7.mp4

View all open jobs on GitHub

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

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on May 4, 2026

    @melvin-bot

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

  4. MelvinBot commented on May 4, 2026

    @MelvinBot
    Contributor

    Issue Analysis

    Root Cause: The search router shows the "Ask Concierge" option based on a bare truthy check of textInputValue at SearchRouter.tsx:203. A single space " " is truthy in JavaScript, so the option renders. When clicked, the untrimmed space is passed through the entire chain — askConcierge() → addComment() → API — and the server rejects it as empty content.

    Recommended Fix: Add a .trim() to the condition at SearchRouter.tsx:203:

    - const searchQueryItems = textInputValue
    + const searchQueryItems = textInputValue?.trim()

    This prevents both the search item and Ask Concierge item from appearing when the input is whitespace-only. As an additional safeguard, useAskConcierge.tsx should also trim the query before passing it to addComment.

    Investigation details

    Data flow:

    1. User types a space → textInputValue = " "
    2. SearchRouter.tsx:203 — truthy check passes, searchQueryItems array is created with both search and Ask Concierge items, each carrying searchQuery: textInputValue (line 217)
    3. User clicks Ask Concierge → SearchRouter.tsx:324-329 calls askConcierge(" ")
    4. useAskConcierge.tsx:30 passes the space to addComment with no trimming
    5. Report/index.ts:706 — text (space) is truthy, so the API call proceeds
    6. Server rejects the whitespace-only comment → "No content to add" error

    Confidence: High — the entire data flow is traced with no ambiguity.

    Possible duplicate: #89524 has the same title and appears to track the same issue.


    Next Steps: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

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

  6. changed the title [-]89508 Search - "No content to add" error after clicking Ask Concierge with just a space[/-] [+]Search - "No content to add" error after clicking Ask Concierge with just a space[/+] on May 4, 2026
  7. nlemma commented on May 4, 2026

    @nlemma

    Deploy Blocker #89524 was identified to be related to the PR #88727 that attempted to fix this issue.

  8. self-assigned this
    on May 4, 2026
  9. francoisl commented on May 4, 2026

    @francoisl
    Contributor

    @MelvinBot implement this. Also, what about the same code that's used in useSearchPageInput? Do we need to trim() there too?

    const searchQueryItems = textInputValue

  10. MelvinBot commented on May 4, 2026

    @MelvinBot
    Contributor

    🤖 Draft PR created: #89563

    Changes:

    • SearchRouter.tsx:203 — added .trim() to textInputValue truthiness check
    • useSearchPageInput.tsx:201 — same .trim() fix (yes, this needs it too — without it, whitespace-only input still shows a useless "search for a space" item)
    • useAskConcierge.tsx:26 — trims the query before calling addComment and bails if empty (defense-in-depth)

    Please mark it as "Ready for review" when it is ready for review.

  11. 1 remaining item

  12. MelvinBot commented on May 4, 2026

    @MelvinBot
    Contributor

    ⏱️ Ran out of time before I could finish. This usually means the task was too complex or I got stuck exploring. Please try again with a more specific request or post in #melvinbot-ai.

    Run details

  13. francoisl commented on May 4, 2026

    @francoisl
    Contributor

    Fix confirmed on staging

  14. added and removed
    ReviewingHas a PR in review
    on May 5, 2026
  15. changed the title [-]Search - "No content to add" error after clicking Ask Concierge with just a space[/-] [+][Due for payment 2026-05-12] Search - "No content to add" error after clicking Ask Concierge with just a space[/+] on May 5, 2026
  16. melvin-bot commented on May 5, 2026

    @melvin-bot

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

  17. melvin-bot commented on May 5, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.66-7 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-05-12. 🎊

  18. melvin-bot commented on May 5, 2026

    @melvin-bot

    @chuckdries / @francoisl 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]

  19. changed the title [-][Due for payment 2026-05-12] Search - "No content to add" error after clicking Ask Concierge with just a space[/-] [+][Due for payment 2026-05-13] [Due for payment 2026-05-12] Search - "No content to add" error after clicking Ask Concierge with just a space[/+] on May 6, 2026
  20. melvin-bot commented on May 6, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.67-13 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-05-13. 🎊

  21. melvin-bot commented on May 6, 2026

    @melvin-bot

    @chuckdries / @francoisl 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]

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

Metadata

Metadata

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