Skip to content

Conversation

@Julesssss
Copy link
Contributor

@Julesssss Julesssss commented Jan 24, 2026

Details

When searching in Reports > Chats and typing "group-by:", autocomplete suggestions were incorrectly appearing for group-by options (from, card, withdrawal-id) even though group-by is not applicable to chats.

The SearchAutocompleteList component was defaulting to EXPENSE type when no explicit type filter was present in the query, ignoring the current page context.

Changes

  • Added optional contextType prop to SearchAutocompleteList to pass the current search type from queryJSON
  • Updated type determination to use: explicit type filter > contextType from page > default to EXPENSE
  • Pass queryJSON.type as contextType from SearchPageHeaderInput to SearchAutocompleteList in both narrow and wide layouts

Fixed Issues

$ #79783

Tests

  1. Navigate to Reports > Chats
  2. Click search input
  3. Type "group-by:"
  4. Verify NO autocomplete suggestions appear (previously showed group-by:from, group-by:card, group-by:withdrawal-id)
  5. Navigate to Reports > Expenses
  6. Type "group-by:"
  7. Verify autocomplete suggestions DO appear correctly

Evidence

Before:
bug-79783-reproduction

After:
bug-79783-fixed

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@Julesssss Julesssss requested review from a team as code owners January 24, 2026 02:45
@melvin-bot melvin-bot bot requested review from JmillsExpensify and amyevans and removed request for a team January 24, 2026 02:45
@melvin-bot
Copy link

melvin-bot bot commented Jan 24, 2026

@amyevans Please copy/paste the Reviewer Checklist from here into a new comment on this PR 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants