Skip to content

feat(app): Add stacker & stacker labware to protocol setup & details #18219

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

Merged
merged 14 commits into from
May 5, 2025

Conversation

smb2268
Copy link
Contributor

@smb2268 smb2268 commented May 1, 2025

fix EXEC-1408, EXEC-1377, EXEC-1339, EXEC-1338, EXEC-1459, EXEC-1460

Overview

This PR adds the Flex Stacker SVG to the deck map, renders labware loaded in the shuttle and hopper on top of it, and adds that labware to protocol setup and details on both ODD and desktop

Test Plan and Hands on Testing

Look at:
Protocol Setup Module Map on ODD and Desktop (list view for this will be implemented in deck config epic):
Screenshot 2025-05-01 at 10 48 17 PM
Screenshot 2025-05-01 at 10 52 47 PM

Protocol Setup Labware List on ODD and Desktop:
Screenshot 2025-05-01 at 10 48 29 PM
Screenshot 2025-05-01 at 10 48 40 PM
Screenshot 2025-05-01 at 10 53 10 PM

Protocol Setup Labware Map on ODD and Desktop:
Screenshot 2025-05-01 at 10 49 12 PM
Screenshot 2025-05-01 at 10 52 57 PM

Protocol Details on ODD and Desktop:
Screenshot 2025-05-01 at 10 47 54 PM
Screenshot 2025-04-30 at 10 01 08 PM
Screenshot 2025-05-01 at 10 54 41 PM

Changelog

  1. Add Flex Stacker SVG, special case these modules so that we show a column 3 deck slot and the module in column 4, along with shifting the labware and necessary module data over to the hopper. Also increase the viewbox for the deckmap when stackers are attached
  2. Update getStackedItemsOnStartingDeck and other command transformation utils so that they include labware loaded through new flex stacker commands. Make helper utils to simplify UI usages of these command outputs
  3. Adapt styling of labware list items so STACKER A fits in line
  4. Refactor ProtocolDeck and ProtocolDetails to rely on new utilities, forcing analysis if it isn't up to date so we have all of the data we need

Review requests

Look through the code, test it out
Note: one of the files I moved, getInitialAndMovedLabwareInSlots is unrelated to these UI updates but seems fishy and is used for deck config compatibility. I made a ticket in the deck config stacker epic to investigate and fix it https://opentrons.atlassian.net/browse/EXEC-1470

Risk assessment

Medium - will affect protocol details for all protocols

@smb2268 smb2268 self-assigned this May 1, 2025
Copy link

codecov bot commented May 1, 2025

Codecov Report

Attention: Patch coverage is 1.64179% with 659 lines in your changes missing coverage. Please review.

Project coverage is 26.78%. Comparing base (d2c2588) to head (0779b7b).
Report is 11 commits behind head on edge.

Files with missing lines Patch % Lines
...s/transformations/getStackedItemsOnStartingDeck.ts 0.00% 173 Missing ⚠️
...vices/ProtocolRun/SetupLabware/SetupLabwareMap.tsx 0.00% 95 Missing ⚠️
app/src/organisms/ProtocolDeck/index.tsx 0.00% 83 Missing ⚠️
components/src/hardware-sim/BaseDeck/BaseDeck.tsx 4.65% 82 Missing ⚠️
...tions/getRequiredLabwareDetailsFromLoadCommands.ts 0.00% 53 Missing ⚠️
...tocolSetup/ProtocolSetupLabware/LabwareMapView.tsx 0.00% 51 Missing ⚠️
components/src/hardware-sim/Module/FlexStacker.tsx 2.27% 43 Missing ⚠️
...pp/src/organisms/Desktop/ProtocolsLanding/utils.ts 0.00% 17 Missing ⚠️
...ormations/getLabwareDefinitionsByURIForProtocol.ts 0.00% 17 Missing ⚠️
...Desktop/Devices/ProtocolRun/LabwareInfoOverlay.tsx 0.00% 11 Missing ⚠️
... and 9 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #18219      +/-   ##
==========================================
+ Coverage   21.41%   26.78%   +5.37%     
==========================================
  Files        3043     2981      -62     
  Lines      255339   233617   -21722     
  Branches    30420    28435    -1985     
==========================================
+ Hits        54689    62585    +7896     
+ Misses     200637   171009   -29628     
- Partials       13       23      +10     
Flag Coverage Δ
app 3.09% <0.14%> (+2.74%) ⬆️
components 4.55% <0.89%> (-0.11%) ⬇️
protocol-designer 18.98% <1.64%> (+0.06%) ⬆️
shared-data 73.72% <ø> (-0.04%) ⬇️
step-generation 4.55% <0.29%> (+0.17%) ⬆️

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

Files with missing lines Coverage Δ
.../src/molecules/LiquidDetailCard/LiquidCardList.tsx 0.00% <ø> (ø)
...organisms/Desktop/ChooseProtocolSlideout/index.tsx 0.00% <ø> (ø)
...vices/ProtocolRun/SetupLabware/SlotDetailModal.tsx 0.00% <ø> (ø)
...pp/src/organisms/Desktop/ProtocolDetails/index.tsx 0.00% <ø> (ø)
...rganisms/Desktop/ProtocolsLanding/ProtocolCard.tsx 0.00% <ø> (ø)
...ProtocolSetupLabware/LabwareLiquidsDetailModal.tsx 0.00% <ø> (ø)
...tup/ProtocolSetupLabware/SetupLabwareStackView.tsx 0.00% <ø> (ø)
app/src/organisms/ProtocolDeck/LabwareInfo.tsx 0.00% <ø> (ø)
app/src/organisms/ProtocolDeck/types.ts 100.00% <ø> (ø)
...colDeck/utils/getStandardDeckViewLayerBlockList.ts 3.84% <ø> (ø)
... and 29 more

... and 1550 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@@ -426,3 +522,7 @@ function StackedBadge(): JSX.Element {
</RobotCoordsForeignObject>
)
}

function getStackerLocationFromSlot(slotName: string): string {
return `${slotName.charAt(0)}4`
Copy link
Member

Choose a reason for hiding this comment

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

oh man at some point we really need to get some helper functions to get col/row from slots

@smb2268 smb2268 force-pushed the app_flex-stacker-ui branch from 7cfad90 to 269494a Compare May 2, 2025 02:44
@smb2268 smb2268 force-pushed the app_flex-stacker-ui branch from 269494a to ccda1aa Compare May 2, 2025 02:46
@smb2268 smb2268 marked this pull request as ready for review May 2, 2025 02:58
@smb2268 smb2268 requested a review from a team as a code owner May 2, 2025 02:58
@smb2268 smb2268 requested review from TamarZanzouri and removed request for a team May 2, 2025 02:58
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Looks good to me once tests and lint pass! Thank you!

@smb2268 smb2268 requested a review from a team as a code owner May 2, 2025 17:11
@smb2268 smb2268 requested review from mjhuff and a team May 2, 2025 17:28
@smb2268 smb2268 force-pushed the app_flex-stacker-ui branch 2 times, most recently from 6860cf0 to 996400b Compare May 5, 2025 00:36
@smb2268 smb2268 force-pushed the app_flex-stacker-ui branch from 996400b to 0779b7b Compare May 5, 2025 01:02
@smb2268 smb2268 merged commit 00aad92 into edge May 5, 2025
54 of 55 checks passed
@smb2268 smb2268 deleted the app_flex-stacker-ui branch May 20, 2025 18:32
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