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): fix RecentRunProtocolCard redirecting to /protocols before /runs/:runId/setup #14486

Merged

Conversation

mjhuff
Copy link
Contributor

@mjhuff mjhuff commented Feb 13, 2024

Closes RQA-2290

Overview

Notification changes uncovered a bug in which a RecentRunProtocolCard caused redirection to the /runs/:runId/setup page before the actual run had loaded, which caused the TopLevelRedirect hook to bounce back to the /protocols page until the run loads. Instead of relying on run within TopLevelRedirect for this one off route case, move the redirect within ProtocolSetup and redirect if run status is stopped. This creates the same end behavior without the temporary redirect to /protocols.

Test Plan

  • Click a recent protocol card. You shouldn't see a redirect to /protocols before the /setup route.
  • Usually requires testing on a physical ODD to repro the issue.

Changelog

  • Fixed a bug in which clicking a protocol card would temporarily redirect to the Protocol Dashboard.

Risk assessment

low

…/runs/:runId/setup

Notification changes uncovered a bug in which a RecentRunProtocolCard caused redirection to the
/runs/:runId/setup page before the actual run had loaded, which caused the TopLevelRedirect hook to
bounce back to the /protocols page until the run loads. Instead of relying on run within
TopLevelRedirect for this one off route case, move the redirect within ProtocolSetup and redirect if
run status is stopped. This creates the same end behavior without the temporary redirect to
/protocols.
@mjhuff mjhuff requested a review from a team February 13, 2024 19:59
@mjhuff mjhuff requested a review from a team as a code owner February 13, 2024 19:59
@mjhuff mjhuff requested review from ncdiehl11 and removed request for a team February 13, 2024 19:59
Copy link

codecov bot commented Feb 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (15986f0) 67.77% compared to head (529efc5) 67.77%.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           chore_release-7.2.0   #14486   +/-   ##
====================================================
  Coverage                67.77%   67.77%           
====================================================
  Files                     2519     2519           
  Lines                    72013    72013           
  Branches                  9274     9274           
====================================================
+ Hits                     48804    48807    +3     
+ Misses                   20991    20989    -2     
+ Partials                  2218     2217    -1     
Flag Coverage Δ
app 64.64% <100.00%> (+0.01%) ⬆️

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

Files Coverage Δ
app/src/App/hooks.ts 10.71% <ø> (+0.36%) ⬆️
app/src/pages/ProtocolSetup/index.tsx 72.68% <100.00%> (+0.76%) ⬆️

@mjhuff mjhuff merged commit ebe7164 into chore_release-7.2.0 Feb 13, 2024
30 checks passed
@mjhuff mjhuff deleted the app_fix-recent-run-card-protocols-redirect branch February 13, 2024 21:26
TamarZanzouri pushed a commit that referenced this pull request Feb 16, 2024
…/runs/:runId/setup (#14486)

Closes RQA-2290

Notification changes uncovered a bug in which a RecentRunProtocolCard caused redirection to the
/runs/:runId/setup page before the actual run had loaded, which caused the TopLevelRedirect hook to
bounce back to the /protocols page until the run loads. Instead of relying on run within
TopLevelRedirect for this one off route case, move the redirect within ProtocolSetup and redirect if
run status is stopped. This creates the same end behavior without the temporary redirect to
/protocols.
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