Skip to content

Conversation

@SyntaxColoring
Copy link
Contributor

@SyntaxColoring SyntaxColoring commented Nov 19, 2025

Overview

Protocol Designer lets the user Shift-click to select a range of steps in the timeline. Now that the timeline has nesting (concurrent Thermocycler profiles), we need to update that logic to account for some hazards when the range crosses the boundary of a nested group. This PR does that.

Closes EXEC-2060. See that ticket for a more full example of the problem we're solving.

Test Plan and Hands on Testing

I've done this:

  1. Import tc_dnd_demo.py
  2. Make sure the "enable concurrent module actions" feature flag is enabled
  3. Go through the test plan in EXEC-2060

Changelog

  • Update the logic in getShiftSelectedSteps() to avoid selecting steps that are not "user-visible"—i.e., the hidden "wait for profile to complete" step that implicitly comes at the end of every Thermocycler profile. Some of the other step CRUD actions are already doing the same thing.
  • Various small renames for clarity.
  • Delete SelectMultipleStepsForGroupAction, which was unused (never created, nor used in any reducer).

Review requests

OK with deleting SelectMultipleStepsForGroupAction?

Risk assessment

Low.

Comment on lines 42 to 46
export const getMetaSelectedSteps = (
multiSelectItemIds: StepIdType[] | null,
stepId: StepIdType,
selectedStepId: StepIdType | null
priorMultiSelectedItemIds: StepIdType[] | null,
newlySelectedStepId: StepIdType,
priorSingleSelectedStepId: StepIdType | null
): StepIdType[] => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No behavioral changes in getMetaSelectedSteps(), just renaming parameters for clarity.

Comment on lines +131 to +134
const orderedVisibleSteps = orderedStepIds
.slice(startIndex, endIndex + 1)
.filter(stepId => stepVisibilities[stepId].isVisibleToUser)
return orderedVisibleSteps
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This new .filter() is the actual behavioral change of this PR.

@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 55.10204% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.85%. Comparing base (5525881) to head (bc684e9).
⚠️ Report is 17 commits behind head on edge.

Files with missing lines Patch % Lines
...src/pages/Designer/ProtocolSteps/Timeline/utils.ts 57.44% 20 Missing ⚠️
...igner/ProtocolSteps/Timeline/ConnectedStepInfo.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #20193      +/-   ##
==========================================
- Coverage   56.91%   56.85%   -0.07%     
==========================================
  Files        3570     3573       +3     
  Lines      297737   298507     +770     
  Branches    42215    42326     +111     
==========================================
+ Hits       169453   169709     +256     
- Misses     128053   128567     +514     
  Partials      231      231              
Flag Coverage Δ
protocol-designer 19.17% <55.10%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
protocol-designer/src/ui/steps/actions/actions.ts 37.10% <ø> (+1.19%) ⬆️
protocol-designer/src/ui/steps/actions/types.ts 100.00% <ø> (ø)
...igner/ProtocolSteps/Timeline/ConnectedStepInfo.tsx 1.52% <0.00%> (ø)
...src/pages/Designer/ProtocolSteps/Timeline/utils.ts 57.85% <57.44%> (+37.48%) ⬆️

... and 24 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
Collaborator

@jerader jerader left a comment

Choose a reason for hiding this comment

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

just 1 thing i noticed: you can't duplicate the step if the thermocycler step is selected. You probably have a separate ticket for this though!

But otherwise, this looks good to me! nice 😎

@SyntaxColoring
Copy link
Contributor Author

Uhh whoa, no, that is weird. That definitely should work at this point, and I thought it was working a couple days ago. Maybe I screwed something up in a merge. Looking into it.

@SyntaxColoring
Copy link
Contributor Author

Oh, teehee, it's just because this PR is based on an edge commit that didn't have #20161 yet. The duplication does work when it's all combined.

Thanks for the quick review and for noticing that!

@SyntaxColoring SyntaxColoring merged commit b5233bc into edge Nov 19, 2025
22 of 23 checks passed
@SyntaxColoring SyntaxColoring deleted the cma_fix_range_selections branch November 19, 2025 20:26
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