Skip to content

feat(opentrons-ai-client): add hidden feature flags #18198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 29, 2025

Conversation

shlokamin
Copy link
Contributor

@shlokamin shlokamin commented Apr 28, 2025

Overview

This PR adds client side feature flags to opentrons ai. To enable the feature flags, open up your browser console and call enablePrereleaseMode(). This will make a settings button show up in the header, which you can use to toggle feature flags.

Screenshot 2025-04-28 at 5 00 52 PM

Closes AUTH-1789

Changelog

  • Add frontend feature flags

Risk assessment

Low

@shlokamin shlokamin force-pushed the opentrons_ai-add-feature-flags branch from a40fe9f to dc7b78e Compare April 28, 2025 19:56
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

Attention: Patch coverage is 42.30769% with 15 lines in your changes missing coverage. Please review.

Project coverage is 23.51%. Comparing base (e40dc6f) to head (adc0c36).
Report is 31 commits behind head on edge.

Files with missing lines Patch % Lines
components/src/controls/ToggleButton.tsx 42.30% 15 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #18198      +/-   ##
==========================================
- Coverage   23.57%   23.51%   -0.06%     
==========================================
  Files        3038     3041       +3     
  Lines      254591   255463     +872     
  Branches    25634    25712      +78     
==========================================
+ Hits        60010    60066      +56     
- Misses     194566   195382     +816     
  Partials       15       15              
Flag Coverage Δ
protocol-designer 18.99% <42.30%> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
components/src/controls/index.ts 100.00% <ø> (ø)
components/src/controls/ToggleButton.tsx 44.82% <42.30%> (+23.39%) ⬆️

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

@shlokamin shlokamin marked this pull request as ready for review April 28, 2025 20:04
@shlokamin shlokamin requested review from a team as code owners April 28, 2025 20:04
@shlokamin shlokamin requested review from smb2268 and removed request for a team April 28, 2025 20:04
@shlokamin shlokamin requested a review from Elyorcv April 28, 2025 21:00
Copy link
Contributor

@Elyorcv Elyorcv left a comment

Choose a reason for hiding this comment

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

Awesome! I believe this is going to be used a lot down the line. LGTM!

I understand that we use the flag enablePrereleaseMode to control whether 'fake' is true/false after this merge?

@shlokamin
Copy link
Contributor Author

I understand that we use the flag enablePrereleaseMode to control whether 'fake' is true/false after this merge?

almost! we will read the state of enablePDProtocolGeneration, if that is true, we can then provide the fake key in the request payload

@shlokamin shlokamin merged commit 24eae74 into edge Apr 29, 2025
35 checks passed
@shlokamin shlokamin deleted the opentrons_ai-add-feature-flags branch April 29, 2025 19:06
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