Skip to content

chore: minor flags graduation - #2673

Open
camielvs wants to merge 1 commit into
masterfrom
08-27-chore_minor_flags_graduation
Open

chore: minor flags graduation#2673
camielvs wants to merge 1 commit into
masterfrom
08-27-chore_minor_flags_graduation

Conversation

@camielvs

@camielvs camielvs commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Description

Graduates two betas to on-by-default, and moves one toggle out of Beta Features:

  • Compare Runs — now on by default.
  • Conditional Execution — now on by default.
  • AI component descriptions — moves from Beta Features to Preferences, since it behaves like a user preference rather than an experiment.

That last move surfaced a gap. The AI descriptions toggle only means anything when Component Search is enabled, and Beta Features had a hand-written check to hide it in that case. Preferences had no equivalent check, so a user who switched Component Search off would have been shown a toggle that controls nothing.

Flags can now name a parent flag they depend on, and Settings hides any flag whose parent is switched off. The rule is applied in one place, so it holds for Preferences and Beta Features alike, and the old hand-written check is gone.

Related Issue and Pull requests

Type of Change

  • Improvement
  • Cleanup/Refactor
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

Test Instructions

  1. On a fresh profile, confirm Compare Runs and Conditional Execution are both available without turning anything on.
  2. Open Settings → Preferences. With Component Search on (the default), the "Auto-generate component search AI descriptions" toggle is listed.
  3. Go to Settings → Beta Features and switch Component Search off.
  4. Return to Preferences — the AI descriptions toggle is no longer shown.
  5. Switch Component Search back on; the toggle reappears with its previous value.

Additional Comments

The dependency is declared on the flag itself, so future flags with a parent get the same behaviour without either Settings section needing to know about them.

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 08-27-chore_minor_flags_graduation/8d6c359

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@camielvs
camielvs marked this pull request as ready for review August 27, 2026 18:26
@camielvs
camielvs requested a review from a team as a code owner August 27, 2026 18:26

@morgan-wowk morgan-wowk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Automated review

The default flips look right — compare-runs and conditional-execution are both still read at their consumers, so flipping their defaults to true actually takes effect.

SHOULD-FIX — moving component-search-v2-ai-descriptions to category: "setting" orphans its parent gate. As a beta flag it was deliberately hidden unless component-search-v2 was enabled (BetaFeaturesSettings.tsx:12-17, via componentSearchChildFlags). But setting-category flags render unconditionally in Preferences: SettingsFlagsContext.tsx partitions them into settings, and PreferencesSettings.tsx renders <Settings settings={settings} /> with no parent gate. So a user with component-search-v2 off now sees an "Automatically generate an AI description…" toggle in Preferences that controls a feature only reachable inside the V2 search path — an orphaned no-op — and the componentSearchChildFlags guard is now dead code for that key. If promoting it to Preferences is intended, the parent-off case needs handling (gate it in Preferences too, or keep it a child of the beta); if not, keep it beta.

@camielvs
camielvs force-pushed the 08-27-chore_minor_flags_graduation branch from 6211305 to 8d6c359 Compare September 3, 2026 20:12
@camielvs

camielvs commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

Good catch — fixed in 8d6c359.

Rather than adding a second gate in Preferences, I made the dependency declarative: a flag can now name a parent flag it depends on, and Settings hides any flag whose parent is switched off. The AI descriptions toggle therefore only appears when Component Search is on, wherever it happens to be rendered — one rule covering both Preferences and Beta Features, instead of each section carrying its own check. The flag still lands in Preferences, which was the intent of the change.

That also let me delete the componentSearchChildFlags set you flagged as dead. Worth noting its tests were passing against a fixture that hardcoded category: "beta", so they would have stayed green no matter what the real flag said — I rewrote them, and the gating behaviour now has its own tests covering dependency chains, unknown parents and cycles.

One thing I left alone: reading a flag directly (outside Settings) still ignores the parent. It makes no difference today, since the only consumer sits behind a route that already redirects when Component Search is off. Happy to tighten that separately if we add a dependent flag whose consumer is not route-gated.

@camielvs
camielvs requested a review from morgan-wowk September 3, 2026 20:24
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