Skip to content

Prevent outdated filter results from replacing newer results #24

Open

Description

@niat-web

Technical Area

Frontend / API integration (js/reports.js)

Description

If the filters are changed quickly, an earlier request that finishes late can add its results to the list after a newer request.

Current Behavior

loadReports() starts a request every time the filter form is submitted and adds the cards when a response arrives. It does not check whether a newer request has been started. Test: delay the request with status=FIXED by 2.5 seconds, then submit REPORTED right after. The dropdown shows "Reported", but the list contains both Reported and Fixed cards, because the late response added its cards to the list.

Expected Behavior

The list always shows the results for the most recent filter selection.

What Needs to Change

Make sure that only the results of the latest request are shown. The approach is open to the contributor.

Acceptance Criteria

  • After rapid filter changes, only the results of the latest selection are displayed
  • A slower, older request cannot overwrite or add to newer results
  • A request that is cancelled on purpose does not show an error message or a console error
  • The loading message is correct after rapid changes

Activity

  1. added
    bug
    frontend
    on Sep 29, 2026
  2. vegadarsiwork commented on Nov 4, 2026

    @vegadarsiwork

    Hi! I'd like to work on this. Plan: abort the previous request in loadReports() and ignore responses that aren't from the newest one, so a slow older request can't add cards. Aborted requests won't show errors.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions