Skip to content

Conversation

@rclarke0
Copy link
Contributor

@rclarke0 rclarke0 commented Nov 17, 2025

Overview

Refactor start run disablement button to display toast description.

Test Plan and Hands on Testing

  • smoke tested on the app
Screenshot 2025-11-17 at 4 47 31 PM

Changelog

  • removed disabled state
  • added new strings to support specific protocol disablement reasons.

Review requests

  • review additional messages added
  • ensure changes I made don't mean you can start the run even if it should be disabled.

Risk assessment

  • lowish

Closes EXEC-1635

@rclarke0 rclarke0 requested a review from mjhuff November 17, 2025 22:22
@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

❌ Patch coverage is 0% with 70 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.91%. Comparing base (4994e79) to head (4ef2f58).
⚠️ Report is 33 commits behind head on edge.

Files with missing lines Patch % Lines
...nt/ActionButton/hooks/useActionBtnDisabledUtils.ts 0.00% 37 Missing ⚠️
...nt/ActionButton/hooks/useActionButtonProperties.ts 0.00% 32 Missing ⚠️
...lRunHeader/RunHeaderContent/ActionButton/index.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             edge   #20182       +/-   ##
===========================================
+ Coverage   25.89%   56.91%   +31.02%     
===========================================
  Files        3566     3566               
  Lines      297498   297609      +111     
  Branches    42041    42278      +237     
===========================================
+ Hits        77023   169378    +92355     
+ Misses     220456   127957    -92499     
- Partials       19      274      +255     
Flag Coverage Δ
app 46.43% <0.00%> (+43.56%) ⬆️

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

Files with missing lines Coverage Δ
...lRunHeader/RunHeaderContent/ActionButton/index.tsx 2.43% <0.00%> (+2.43%) ⬆️
...nt/ActionButton/hooks/useActionButtonProperties.ts 1.23% <0.00%> (+1.23%) ⬆️
...nt/ActionButton/hooks/useActionBtnDisabledUtils.ts 1.75% <0.00%> (+1.75%) ⬆️

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

@mjhuff mjhuff left a comment

Choose a reason for hiding this comment

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

Nice work! Structure is good overall, just left a few functional fixes and cleanup comments.

interface ActionButtonProps extends BaseActionButtonProps {
isResetRunLoadingRef: MutableRefObject<boolean>
isClosingCurrentRun: boolean
protocolRunHeaderRef: RefObject<HTMLDivElement> | null
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
protocolRunHeaderRef: RefObject<HTMLDivElement> | null

I don't think we need this?


const { isDisabled, disabledReason } = useActionBtnDisabledUtils({
isCurrentRun,
useActionBtnDisabledUtils({
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
useActionBtnDisabledUtils({

Hm, I don't think we need this here now that this functionality is encapsulated by useActionButtonProperties?

!isValidRunAgain
) {
return t('setup_incomplete')
if (isCalibrationComplete) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (isCalibrationComplete) {
if (!isCalibrationComplete) {

return t('instrument_calibration_incomplete')
} else if (isMissingModules) {
return t('modules_missing')
} else if (isModuleCalibrationComplete) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
} else if (isModuleCalibrationComplete) {
} else if (!isModuleCalibrationComplete) {

return t('module_calibration_incomplete')
} else if (isFixtureMismatch) {
return t('fixture_mismatch')
} else if (isValidRunAgain) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
} else if (isValidRunAgain) {
} else if (!isValidRunAgain) {

return t('close_door')
} else if (isClosingCurrentRun) {
return t('shared:robot_is_busy')
} else if (!isCameraReadyToRun) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, I think it's probably slightly better user flow to group the "click buttons on your desktop app" disabled reasons together, and then group together the "be at your robot to do stuff" reasons together. In theory, this would help reduce the amount of back and forth between robot and desktop app someone may have to do.

Since a user is going to be clicking the start run button on their desktop, can we move the "software update is available" and "enable camera", "is fixture mismatch", "is valid run again", and "robot is busy" reasons to the top of this list, and then have all the "be at your robot reasons" beneath it?

@rclarke0 rclarke0 merged commit a464439 into edge Nov 20, 2025
37 of 38 checks passed
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