Conversation
Filter-driven reloads are now centralized to prevent multiple data fetches at once. Further, added a feature to cancel ongoing requests and ensure that older responses don’t replace newer data. After applying filters, there’s a temporary pause on auto-refresh to prevent interruptions while users are still filtering.
Removed duplicate fetch behavior in search/filter apply logic by avoiding page-navigation fetch plus manual reload in the same interaction.
6b979f9 to
3146682
Compare
|
Use Run test server using develop.opencast.org as backend: Specify a different backend like stable.opencast.org: It may take a few seconds for the interface to spin up. |
|
This pull request is deployed at test.admin-interface.opencast.org/1542/2026-04-03_14-43-49/ . |
|
This pull request has conflicts ☹ |
Arnei
left a comment
There was a problem hiding this comment.
Reads sound to me and works from my testing. I would like to see a brief comment in the code that explains the intent behind these functions (basically what you already wrote in the commit message).
| dispatch(goToPage(0)); | ||
| dispatch(deselectAll()); | ||
| dispatch(setOffset(0)); | ||
| dispatch(setPageActive(1)); |
There was a problem hiding this comment.
Should this not set to 0 instead of 1?
|
|
||
| currentLoadRequest.current?.abort?.(); | ||
|
|
||
| const fetchRequest = dispatch(fetchResource()) as Promise<PayloadAction<any, string>> & { abort:() => void }; |
There was a problem hiding this comment.
I think we can do without the type assertions here to make this a bit easier to read?
|
I made the changes before looking at this PR. It could arguably be fine to revert them? Not sure how this could be done at the redux level. You'd still have to have state somehow, but could you still keep that in refs? Would you want to use redux state? I don't know. |
Filter-driven reloads are now centralized to prevent multiple data
fetches at once. Further, added a feature to cancel ongoing requests and
ensure that older responses don’t replace newer data.
After applying filters, there’s a temporary pause on auto-refresh to
prevent interruptions while users are still filtering.
Removed duplicate fetch behavior in search/filter apply logic by
avoiding page-navigation fetch plus manual reload in the same
interaction.