Skip to content

Reports-Search query does not update when click on week group header #80849

Closed

Description

@mitarachim

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.11-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: #80684
Email or phone of affected tester (no customers): ndk.2303+224@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Windows 11 Home/Chrome
App Component: Search

Action Performed:

  1. Open https://staging.new.expensify.com/
  2. Navigate to Reports > Expense
  3. Enter in the Search box field: 'groupBy:week'
  4. Click on a week group header (e.g., "Jan 25 - Jan 31, 2026")

Expected Result:

Verify the search query updates to filter by that week's date range
Verify groupBy is removed from the query
Verify only transactions from that week are displayed as individual items (not grouped)

Actual Result:

The search query does not update, the group only collapses instead.
Failed Test 10 in PR

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7060828_1769656443529.80684-Search_Query_Is_Not_Updated.mp4
Bug7060828_1769656336595.search_quey_is_not_updated_when_click_on_the_list_header.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Jan 29, 2026
  2. melvin-bot commented on Jan 29, 2026

    @melvin-bot

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

  3. melvin-bot commented on Jan 29, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jan 29, 2026

    @melvin-bot

    Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  5. github-actions commented on Jan 29, 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. OSBotify commented on Jan 29, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #80684 - "Add support for groupBy week in Search" by @cristipaval (High confidence)
    Related Issues: This PR was already reverted in #80824

    Recommendation: REVERT (Already Completed)

    The causing PR #80684 has already been reverted in PR #80824 on 2026-01-29. The issue reported in this deploy blocker is the expected behavior - the PR implementation had a bug where clicking on week group headers only collapsed/expanded the group instead of filtering transactions by that week date range.

    Labels: Removed DeployBlocker label (this is a Frontend bug). Kept DeployBlockerCash label because the App deploy is still blocked until the revert reaches staging.

    Detailed Analysis

    Evidence

    PR #80684 added support for groupBy:week in Search, which was merged on 2026-01-28 at 22:20:07 UTC. The issue reported here describes a failure in Test 10 from that PR's test plan, which expected:

    1. Click on a week group header (e.g., "Jan 25 - Jan 31, 2026")
    2. The search query should update to filter by that week's date range
    3. groupBy should be removed from the query
    4. Only transactions from that week should be displayed as individual items (not grouped)

    Actual behavior: The group only collapses instead of filtering.

    Verification

    I confirmed that:

    1. PR Add support for groupBy week in Search #80684 modified the Search component (src/components/Search/index.tsx) and added week grouping logic
    2. The PR added code to handle isTransactionWeekGroupListItemType(item) in the onSelectRow handler that should update the query
    3. However, the onPress handler in TransactionGroupListItem.tsx has conditional logic that prevents onSelectRow from being called for week groups with transactions

    Root Cause

    The bug is in the onPress callback in TransactionGroupListItem.tsx (lines 209-216):

    const onPress = useCallback(() => {
        if (isExpenseReportType || transactions.length === 0) {
            onSelectRow(item, transactionPreviewData);
        }
        if (!isExpenseReportType) {
            handleToggle();
        }
    }, [isExpenseReportType, transactions.length, onSelectRow, transactionPreviewData, item, handleToggle]);

    For week grouping (which is NOT an expense report type):

    • When the group has transactions, onSelectRow is NOT called
    • Instead, it only calls handleToggle() which collapses/expands the group
    • The week-filtering logic added in the Search component's onSelectRow handler never executes

    This means the feature implementation was incomplete - while the filtering logic was added to handle week groups, the UI interaction wasn't properly wired up to trigger it. The PR should have either:

    1. Modified the onPress logic to handle week groups differently (always call onSelectRow)
    2. Or added a separate click handler to the week header component itself

    The revert in PR #80824 was the correct immediate action to unblock the deploy.

  7. lakchote commented on Jan 29, 2026

    @lakchote
    Contributor

    I don't think this should be a blocker as it's not a core feature.

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jan 29, 2026
  9. self-assigned this
    on Jan 29, 2026
  10. lakchote commented on Jan 29, 2026

    @lakchote
    Contributor

    Solved in #80800 with ef97591

  11. melvin-bot commented on Jan 31, 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

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