Skip to content

Agents - "Search Agent" input appears with first created agent and not after creating 12+ #95860

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.33-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: #94995
Email or phone of affected tester (no customers): ibellicotest+2766@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome
App Component: User Settings

Action Performed:

  1. Open the staging.new.expensify.com website.
  2. Navigate to "Account" > "Agents"
  3. Create a new agent.
  4. Note that "Search Agent" input, appears above table, despite agents being less than twelve.

Expected Result:

"Search Agent" input should only appear after creating twelve or more agents.

Actual Result:

"Search Agent" input appears with first created agent and not after createing twelve or more.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7204914_1783703701093.Find_Agent.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7204914

Activity

  1. applause-bot commented on Jul 10, 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/8b22754ff13bf6358aba80510fe33e931723946402e40930ce7c8b896da4300f

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

    @melvin-bot

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

  4. melvin-bot commented on Jul 10, 2026

    @melvin-bot

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

  5. github-actions commented on Jul 10, 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 Jul 10, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The Agents table renders the search bar unconditionally, so it shows up as soon as there is 1 agent instead of 12+.

    AgentsTable mounts <Table.FilterBar> with no count condition. Inside the shared TableFilterBar, the only visibility gate is a zero-check — it hides the bar only when the list is empty:

    if (!originalDataLength) {
        return null;
    }

    TableFilterBar/index.tsx:60

    There is no CONST.STANDARD_LIST_ITEM_LIMIT (= 12) threshold anywhere in the Table framework. That constant is the app-wide convention for "only show a search input once the list is long enough," used by CategoryPicker, TaxPicker and DestinationPicker — but the new Table framework never applies it, so the Agents search appears at 1 agent.

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

    Gate the filter bar behind the standard 12-item threshold. In AgentsTable/index.tsx, only render <Table.FilterBar> when agents.length >= CONST.STANDARD_LIST_ITEM_LIMIT. Agents has no filter chips or filter trigger, so conditionally omitting the whole bar below 12 is safe (the NoResultsState only matters while searching, which can't happen without the bar).

    Placement note — targeted vs. framework-wide

    The same "search always visible" behavior is shared by ~20 other tables that use Table.FilterBar (Categories, Taxes, Per Diem, Workspaces, etc.) and shipped that way. So there are two options:

    • Targeted (recommended for the deploy blocker): gate only in AgentsTable, avoiding any behavior change to already-shipped tables.
    • Framework-wide: add a originalDataLength >= CONST.STANDARD_LIST_ITEM_LIMIT gate (or a threshold prop) inside the shared TableFilterBar. This is more consistent with the app-wide 12-item pattern, but it changes the search visibility of every other table, which is a broader product/design decision and riskier for a deploy blocker.

    What alternative solutions did you explore? (Optional)

    Confirm whether "search only at 12+" is actually the intended spec for the new Table framework. The current always-on behavior is uniform across all Table-based lists, so it may be a deliberate design choice — in which case the QA "expected result" would need updating rather than a code change. Worth a quick confirmation from the PR author / design before implementing.


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

  7. JS00001 commented on Jul 10, 2026

    @JS00001
    Contributor

    this is expected, we will show the searchbar when there is any data now

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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions