Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): poll modules from protocol run module controls #14581

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

smb2268
Copy link
Contributor

@smb2268 smb2268 commented Mar 1, 2024

fix RQA-2419

Overview

Once a run is completed, the module cards on the controls section of the run view were not updating to reflect the most recent module information. This is because we were only polling for modules in the Setup section, which is disabled after the run begins. To fix this, I've enabled polling for modules from the Module Controls tab.

Test Plan

  1. Run a protocol that uses modules - I've linked one in the ticket that I tested earlier today on app&ui bot
  2. Once the run has finished, navigate to the Module Controls tab
  3. Take action with one of the modules by disabling it, setting temp, etc
  4. See that the module card updates with the changing information
  5. In the network tab of dev tools, you should see a /modules response every 5 seconds. If you dismiss the run by X'ing the run completed banner, the Module Controls tab should become disabled and this poll should stop

Changelog

Add optional pollModules param to useModuleRenderInfoForProtcolById that will poll useAttachedModules every 5 seconds when true
Pass this prop as true from ProtocolRunModuleControls

Review requests

Test this out and look over change

Risk assessment

Low

@smb2268 smb2268 self-assigned this Mar 1, 2024
@smb2268 smb2268 requested a review from a team as a code owner March 1, 2024 20:21
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 67.55%. Comparing base (323a2c7) to head (428931a).
Report is 3 commits behind head on chore_release-7.2.0.

Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##           chore_release-7.2.0   #14581      +/-   ##
=======================================================
- Coverage                67.60%   67.55%   -0.05%     
=======================================================
  Files                     2521     2521              
  Lines                    72211    72264      +53     
  Branches                  9289     9323      +34     
=======================================================
+ Hits                     48820    48821       +1     
- Misses                   21200    21252      +52     
  Partials                  2191     2191              
Flag Coverage Δ
app 63.86% <66.66%> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
.../Devices/ProtocolRun/ProtocolRunModuleControls.tsx 77.77% <ø> (ø)
...evices/hooks/useModuleRenderInfoForProtocolById.ts 79.31% <66.66%> (-2.84%) ⬇️

... and 2 files with indirect coverage changes

Copy link
Contributor

@mjhuff mjhuff left a comment

Choose a reason for hiding this comment

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

Nice!

@smb2268 smb2268 merged commit db0a539 into chore_release-7.2.0 Mar 4, 2024
21 of 22 checks passed
@smb2268 smb2268 deleted the app_poll-module-controls branch March 4, 2024 15:57
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.

2 participants