21925: Don't pass full resource to progress bar useEffect to stop request spam
authorStephen Smith <stephen@curii.com>
Fri, 21 Jun 2024 18:18:30 +0000 (14:18 -0400)
committerStephen Smith <stephen@curii.com>
Fri, 21 Jun 2024 18:18:30 +0000 (14:18 -0400)
commitb8bcc4837894cdf3159505e44e0302716ceeb8a4
tree9d7f0246ad6956adcbbf3196a05d3e5b60f9352d
parentcbd0fc836f0152953f78e1205a02c673ccca2843
21925: Don't pass full resource to progress bar useEffect to stop request spam

* Changes progress bar fetch to accept UUID
* Split polling flag into 2 for process and project
  * Fetch method now only returns polling flag for projects
  * The previous changes for project support switched to updating isRunning
    in the fetch action where it would use the store for processes and progress
    counts for projects
  * This resulted in polling not starting if a draft process is already open
    when started since it would only update if already polling
  * This new approach uses the store (including WS updates) for processes and
    polling-based updates for projects
  * Splitting these up also allows eliminating an extra refresh when project
    polling stops while keeping a final refresh when websocket updates a process
    to stopped
* Added comments and better type guards

Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>
services/workbench2/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx
services/workbench2/src/store/subprocess-panel/subprocess-panel-actions.ts