Skip to content

fix: History stop loading more events if filters has no loaded events#1101

Merged
Assem-Uber merged 2 commits intocadence-workflow:masterfrom
Assem-Uber:fix/16192/history-stop-loading-if-filter-has-no-events-in-already-fetched-pages
Dec 2, 2025
Merged

fix: History stop loading more events if filters has no loaded events#1101
Assem-Uber merged 2 commits intocadence-workflow:masterfrom
Assem-Uber:fix/16192/history-stop-loading-if-filter-has-no-events-in-already-fetched-pages

Conversation

@Assem-Uber
Copy link
Contributor

@Assem-Uber Assem-Uber commented Dec 2, 2025

Summary
History stops loading if a filter is used that has no events in the already loaded page. This happens due to hiding the loading spinner that is responsible of loading more pages and showing No results early.

Fix
The fix is to keep showing loading spinner as long as there are next history pages to load and show only no results on reaching the end of the history. The spinner is within the main list virtouso

Testing

  • Tested with grouped/ungrouped views:
Screenshot 2025-12-02 at 15 07 09 Screenshot 2025-12-02 at 15 08 25
  • Spinner showing if filters has no events loaded yet:
Screen.Recording.2025-12-02.at.14.20.52.mov

@Assem-Uber Assem-Uber changed the title Keep loading more events if no initial results doesnt for filter fix: History stop loading more events if filters has no loaded events Dec 2, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where the workflow history would stop loading additional events when using filters that had no matching events in the already-loaded page. The fix ensures the loading spinner continues to display as long as there are more history pages to fetch, only showing "No Results" after reaching the end of available history.

  • Modified the condition for displaying "No Results" to check both empty filtered events AND absence of next page
  • Added conditional rendering for the compact section virtuoso list in grouped view
  • Enhanced test coverage with three new test cases covering different pagination scenarios

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/views/workflow-history/workflow-history.tsx Updated showHasNoResults logic to consider hasNextPage, wrapped compact section virtuoso in conditional check for non-empty filtered events
src/views/workflow-history/tests/workflow-history.test.tsx Added test cases to verify "No Results" displays correctly based on pagination state and filtered events

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Assem-Uber Assem-Uber merged commit 30f9765 into cadence-workflow:master Dec 2, 2025
9 checks passed
adhityamamallan pushed a commit to adhityamamallan/cadence-web that referenced this pull request Dec 3, 2025
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.

3 participants