chore: minor flags graduation - #2673
Conversation
🎩 PreviewA preview build has been created at: |
morgan-wowk
left a comment
There was a problem hiding this comment.
🤖 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.
6211305 to
8d6c359
Compare
|
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 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. |

Description
Graduates two betas to on-by-default, and moves one toggle out of Beta Features:
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
Checklist
Screenshots (if applicable)
Test Instructions
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.