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

refactor(app, react-api-client, api-client): add current run to protocol upload flow #8697

Merged
merged 7 commits into from
Nov 10, 2021

Conversation

b-cooper
Copy link
Contributor

@b-cooper b-cooper commented Nov 9, 2021

Overview

Add current run flag machinery to the api-client, react-api-client, and app's protocol upload flow.
Consolidate the front end representation of run records to remove the concept of run types (re: #8685).

Changelog

  • update useCurrentProtocolRun hook to remove stop and delete, and preemptively look for a current run
  • remove all references to runType in the runs resource tools of the api-client and react-api-client
  • remove useEnsureBasicSession and replace its usage with useCurrentProtocolRun in LPC
  • create new api-client function for the run resource to allow dismissing the current run via the PATCH /runs/:run_id {data: {current: false}} endpoint
  • create and wire up useDismissCurrentRunMutation hook for allowing a user to "close out" of the current protocol

Review requests

  • upload any type of protocol to the upload flow, does it succeed and proceed away from the empty state
  • once in the loaded state, close out the protocol, does it succeed and return to the empty state
  • @shlokamin do the changes to useLabwarePositionCheck work

Risk assessment

low

…hinery to protocol upload flow

Add current run flag machinery to the api-client, react-api-client, and app's protocol upload flow.
Consolidate the front end representation of run records to remove the concept of run types
@b-cooper b-cooper requested a review from shlokamin November 9, 2021 23:23
@b-cooper b-cooper requested review from a team as code owners November 9, 2021 23:23
@codecov
Copy link

codecov bot commented Nov 9, 2021

Codecov Report

Merging #8697 (8df200b) into edge (b97f1bb) will increase coverage by 0.01%.
The diff coverage is 65.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #8697      +/-   ##
==========================================
+ Coverage   74.65%   74.66%   +0.01%     
==========================================
  Files        1757     1757              
  Lines       47141    47113      -28     
  Branches     4719     4712       -7     
==========================================
- Hits        35192    35178      -14     
+ Misses      11143    11129      -14     
  Partials      806      806              
Flag Coverage Δ
app 70.78% <54.54%> (+0.09%) ⬆️
react-api-client 84.49% <90.00%> (-1.74%) ⬇️

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

Impacted Files Coverage Δ
...warePositionCheck/hooks/useLabwarePositionCheck.ts 5.88% <0.00%> (+0.13%) ⬆️
...src/organisms/ProtocolUpload/useCloseCurrentRun.ts 50.00% <50.00%> (ø)
...pp/src/organisms/ProtocolUpload/useCurrentRunId.ts 66.66% <66.66%> (ø)
.../organisms/ProtocolUpload/useCurrentProtocolRun.ts 75.00% <75.00%> (+26.72%) ⬆️
...pi-client/src/runs/useDismissCurrentRunMutation.ts 90.00% <90.00%> (ø)
app/src/organisms/ProtocolUpload/index.tsx 73.33% <100.00%> (ø)

@b-cooper b-cooper merged commit 67e73df into edge Nov 10, 2021
@b-cooper b-cooper deleted the app_current-run-to-hook branch November 10, 2021 00:05
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