Skip to content

Conversation

@ryanthecoder
Copy link
Contributor

Overview

add the typescript hooks for the aspirate/dispense while tracking commands

@ryanthecoder ryanthecoder requested review from a team as code owners October 27, 2025 18:18
@ryanthecoder ryanthecoder requested review from smb2268 and removed request for a team October 27, 2025 18:18
@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

❌ Patch coverage is 0% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.65%. Comparing base (82fb268) to head (6e692fa).
⚠️ Report is 11 commits behind head on edge.

Files with missing lines Patch % Lines
...tring/utils/commandText/getPipettingCommandText.ts 0.00% 21 Missing ⚠️
...rganisms/CommandText/useCommandTextString/index.ts 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #19935      +/-   ##
==========================================
+ Coverage   24.23%   24.65%   +0.41%     
==========================================
  Files        3540     3539       -1     
  Lines      298345   298225     -120     
  Branches    39863    39861       -2     
==========================================
+ Hits        72298    73517    +1219     
+ Misses     226029   224690    -1339     
  Partials       18       18              
Flag Coverage Δ
app 2.10% <0.00%> (+1.17%) ⬆️
protocol-designer 18.70% <0.00%> (-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 Δ
...rganisms/CommandText/useCommandTextString/index.ts 60.92% <0.00%> (-0.38%) ⬇️
...tring/utils/commandText/getPipettingCommandText.ts 68.75% <0.00%> (-7.73%) ⬇️

... and 93 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
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

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

Yeah this looks basically right to me, thanks! Just small adjustments.

Comment on lines 64 to 90
@@ -72,6 +80,14 @@ export const getPipettingCommandText = ({
flow_rate: flowRate,
})
}
case 'aspirate_while_tracking': {
return t('aspirate_while_tracking', {
track_from_location: trackFromLocation,
track_to_location: trackToLocation,
volume,
flow_rate: flowRate,
})
}
Copy link
Contributor

Choose a reason for hiding this comment

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

A few things:

  1. I think this case value needs to be aspirateWhileTracking instead of aspirate_while_tracking, to match what Protocol Engine puts in the commandType.
  2. I would move the trackFromLocation and trackToLocation variable declarations inside the case block. That lets TypeScript narrow the type of command based on the fact that commandType === 'aspirateWhileTracking'. It will be able to see that command.params.trackFromLocation and command.params.trackToLocation will always exist, which lets you delete the trackFromLocation in command.params check.
  3. Reminder to add a similar block for dispenseWhileTracking.

@ryanthecoder ryanthecoder force-pushed the EXEC-1776-runlog-bindings branch from 27153fe to 896de1a Compare October 29, 2025 14:49
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.

3 participants