Skip to content

disable the button for the same request type only#2731

Open
wendyyang wants to merge 7 commits intoTriomic_Epicfrom
2665-y26-004---lcm-triomics---choose-workflow-emseq-rnaseq
Open

disable the button for the same request type only#2731
wendyyang wants to merge 7 commits intoTriomic_Epicfrom
2665-y26-004---lcm-triomics---choose-workflow-emseq-rnaseq

Conversation

@wendyyang
Copy link
Contributor

Closes #

Changes proposed in this pull request

update disable workflow button condition

Instructions for Reviewers

[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to main]
    - Check story numbers included
    - Check for debug code
    - Check version

@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 41.66667% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.90%. Comparing base (c789c0f) to head (ff31dac).

Files with missing lines Patch % Lines
...resenters/stock_plate_with_submission_presenter.rb 33.33% 6 Missing ⚠️
...ations/sequencescape/api/v2/submission_template.rb 50.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           Triomic_Epic    #2731      +/-   ##
================================================
- Coverage         84.91%   84.90%   -0.02%     
================================================
  Files               502      502              
  Lines             20615    20619       +4     
  Branches            377      377              
================================================
+ Hits              17506    17507       +1     
- Misses             3106     3109       +3     
  Partials              3        3              
Flag Coverage Δ
javascript 80.25% <ø> (ø)
pull_request 84.90% <41.66%> (-0.02%) ⬇️
push 84.90% <41.66%> (-0.02%) ⬇️
ruby 92.44% <41.66%> (-0.04%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@wendyyang wendyyang marked this pull request as ready for review March 5, 2026 08:59
@wendyyang
Copy link
Contributor Author

Click one of the button, submission is building, both button disabled
Screenshot 2026-03-05 at 11 43 05

When the submission is ready, the requests active, only one of the button disabled
Screenshot 2026-03-05 at 11 43 45

@wendyyang wendyyang requested a review from KatyTaylor March 5, 2026 14:50
def active_request_types
wells.flat_map(&:active_requests)
.map(&:request_type_key)
.uniq
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again, this could use requests_as_source rather than active_requests, since we're on the first plate in the pipeline here, expecting these requests to originate in this plate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

requests_as_source is private method, can't use

{
'EM-seq (+ WGS) Branch - Automated Submission' => 'limber_lcm_triomics_emseq',
'RNA-Seq Branch - Automated Submission' => 'limber_lcm_triomics_rnaseq'
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wonder if you could remove this hardcoding by using the submission template name / uuid, which you have, to query the SS API and retrieve the relevant request type key?

It would involve adding request_type to the submission template resource (v2 API) Sequencescape-side. A submission template can have multiple request types in an array, but the first one would be the relevant one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

refactored.

@wendyyang wendyyang requested a review from KatyTaylor March 11, 2026 18:12
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