Skip to content

Conversation

@smb2268
Copy link
Contributor

@smb2268 smb2268 commented Oct 28, 2025

Overview

This PR enables you to add a flex stacker to a PD protocol, properly visualize it on all deck maps, and add compatible labware to the shuttle position.

Test Plan and Hands on Testing

With enablePrereleaseMode on in PD, turn on the stacking feature flag
Add a stacker to your protocol, play around with the various deck maps and add/remove and move labware on the stacker shuttles
Screenshot 2025-10-28 at 5 06 12 PM
Screenshot 2025-10-28 at 5 06 06 PM
Screenshot 2025-10-28 at 5 05 53 PM
Screenshot 2025-10-28 at 5 05 43 PM
Screenshot 2025-10-28 at 5 02 18 PM

Changelog

Adjust deck thumbnail, zoomed deck map, and deck edit screens to adapt to the stacker's extra footprint (all through manual visual checking unfortunately)
Create list of Stacker recommended and compatible labware for addition in the

Review requests

Test this out!

Risk assessment

Low

@smb2268 smb2268 requested a review from a team as a code owner October 28, 2025 21:13
@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 61.79775% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.25%. Comparing base (cc914a2) to head (751d928).
⚠️ Report is 1 commits behind head on edge.

Files with missing lines Patch % Lines
...l-designer/src/utils/labwareModuleCompatibility.ts 19.04% 17 Missing ⚠️
...-designer/src/pages/ProtocolOverview/SlotHover.tsx 36.36% 7 Missing ⚠️
.../src/pages/Designer/DeckSetup/DeckSetupDetails.tsx 0.00% 4 Missing ⚠️
...igner/src/pages/ProtocolOverview/DeckThumbnail.tsx 66.66% 3 Missing ⚠️
...botCoordinateSpace/RobotCoordinateSpaceWithRef.tsx 94.11% 1 Missing ⚠️
...ner/src/pages/Designer/DeckSetup/SelectedItems.tsx 75.00% 1 Missing ⚠️
...rc/pages/ProtocolOverview/DeckThumbnailDetails.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #19959      +/-   ##
==========================================
+ Coverage   24.23%   24.25%   +0.02%     
==========================================
  Files        3540     3536       -4     
  Lines      298344   298216     -128     
  Branches    39863    39861       -2     
==========================================
+ Hits        72298    72341      +43     
+ Misses     226028   225857     -171     
  Partials       18       18              
Flag Coverage Δ
protocol-designer 18.72% <61.79%> (+0.01%) ⬆️
step-generation 5.44% <0.00%> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
...rc/pages/Designer/DeckSetup/DeckSetupContainer.tsx 52.85% <100.00%> (+0.73%) ⬆️
...designer/src/pages/Designer/DeckSetup/constants.ts 89.62% <100.00%> (+1.19%) ⬆️
...col-designer/src/pages/Designer/DeckSetup/utils.ts 40.96% <100.00%> (ø)
...botCoordinateSpace/RobotCoordinateSpaceWithRef.tsx 97.72% <94.11%> (-2.28%) ⬇️
...ner/src/pages/Designer/DeckSetup/SelectedItems.tsx 90.47% <75.00%> (-0.50%) ⬇️
...rc/pages/ProtocolOverview/DeckThumbnailDetails.tsx 41.23% <0.00%> (ø)
...igner/src/pages/ProtocolOverview/DeckThumbnail.tsx 73.83% <66.66%> (-0.71%) ⬇️
.../src/pages/Designer/DeckSetup/DeckSetupDetails.tsx 0.35% <0.00%> (-0.01%) ⬇️
...-designer/src/pages/ProtocolOverview/SlotHover.tsx 80.76% <36.36%> (-5.55%) ⬇️
...l-designer/src/utils/labwareModuleCompatibility.ts 71.07% <19.04%> (-8.74%) ⬇️

... and 4 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.

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.

Oof. Nice work that I wish we didn't have to do.

Copy link
Contributor

@TamarZanzouri TamarZanzouri left a comment

Choose a reason for hiding this comment

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

LGTM! I don't see any test changes though?

Comment on lines 54 to 56
wholeDeckViewBox = adjustViewBoxForStacker
? `${viewBoxOriginX + STACKER_VIEWBOX_ADJUSTMENTS.viewBoxOriginX} ${viewBoxOriginY + STACKER_VIEWBOX_ADJUSTMENTS.viewBoxOriginY} ${deckXDimension + STACKER_VIEWBOX_ADJUSTMENTS.deckXDimension} ${deckYDimension + STACKER_VIEWBOX_ADJUSTMENTS.deckYDimension}`
: `${viewBoxOriginX} ${viewBoxOriginY} ${deckXDimension} ${deckYDimension}`
Copy link
Contributor

Choose a reason for hiding this comment

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

const base = [viewBoxOriginX, viewBoxOriginY, deckXDimension, deckYDimension] as const
const adj = [
  base[0] + STACKER_VIEWBOX_ADJUSTMENTS.viewBoxOriginX,
  base[1] + STACKER_VIEWBOX_ADJUSTMENTS.viewBoxOriginY,
  base[2] + STACKER_VIEWBOX_ADJUSTMENTS.deckXDimension,
  base[3] + STACKER_VIEWBOX_ADJUSTMENTS.deckYDimension,
] as const

const adjustedViewBox = adjustViewBoxForStacker ? adj : base
wholeDeckViewBox = `${adjustedViewBox[0]} ${adjustedViewBox[1]} ${adjustedViewBox[2]} ${adjustedViewBox[3]}`

Comment on lines 135 to 138
? deckDef.dimensions[0] +
(hasFlexStacker
? FLEX_STACKER_FIXTURE_PADDING
: RIGHT_COLUMN_FIXTURE_PADDING)
Copy link
Contributor

Choose a reason for hiding this comment

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

we should avoid using a nested ternary

Comment on lines 119 to 130
const _getLabwareCompatibleWithFlexStacker = (
def: LabwareDefinition2
): boolean => {
return (
RECOMMENDED_LABWARE_BY_MODULE[FLEX_STACKER_MODULE_TYPE].includes(
def.parameters.loadName
) ||
def.metadata.displayCategory === 'wellPlate' ||
def.metadata.displayCategory === 'reservoir'
)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
const _getLabwareCompatibleWithFlexStacker = (
def: LabwareDefinition2
): boolean => {
return (
RECOMMENDED_LABWARE_BY_MODULE[FLEX_STACKER_MODULE_TYPE].includes(
def.parameters.loadName
) ||
def.metadata.displayCategory === 'wellPlate' ||
def.metadata.displayCategory === 'reservoir'
)
}
const _getLabwareCompatibleWithFlexStacker = (
def: LabwareDefinition2
): boolean =>
(
RECOMMENDED_LABWARE_BY_MODULE[FLEX_STACKER_MODULE_TYPE].includes(
def.parameters.loadName
) ||
def.metadata.displayCategory === 'wellPlate' ||
def.metadata.displayCategory === 'reservoir'
)

@koji
Copy link
Contributor

koji commented Oct 29, 2025

need to tweak the y pos

Screenshot 2025-10-29 at 12 16 15 PM

@smb2268
Copy link
Contributor Author

smb2268 commented Oct 29, 2025

need to tweak the y pos

Screenshot 2025-10-29 at 12 16 15 PM

Ah, this is probably because of the waste chute adjusting the y in the left side. I wonder if we need to build in an additional variable y for the waste chute here

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.

5 participants