Summary
Implement a beta features system that allows developers to define experimental features in a config file and users to toggle them on/off via the Settings UI.
Motivation
We need a way to:
- Ship experimental features without exposing them to all users by default
- Let users opt-in to try beta functionality
- Gate entire UI sections behind feature flags
- Track which features are enabled without code changes
Design
Hybrid Config + Database approach:
| Component |
Purpose |
beta-features.toml |
Defines available features (name, description, maturity) - version controlled |
forge_beta_feature_state table |
Stores user's enabled/disabled preferences |
| Settings UI |
"Beta Features" tab with toggles |
<BetaFeatureGate> |
React component for conditional rendering |
Developer Workflow
- Add feature to
beta-features.toml:
[features.my_feature]
name = "My Feature"
description = "What it does"
maturity = "experimental"
- Use in code:
// Backend
if services.beta_features.is_enabled("my_feature").await? { ... }
// Frontend
<BetaFeatureGate feature="my_feature">
<MyFeatureComponent />
</BetaFeatureGate>
Acceptance Criteria
Summary
Implement a beta features system that allows developers to define experimental features in a config file and users to toggle them on/off via the Settings UI.
Motivation
We need a way to:
Design
Hybrid Config + Database approach:
beta-features.tomlforge_beta_feature_statetable<BetaFeatureGate>Developer Workflow
beta-features.toml:Acceptance Criteria
beta-features.toml) for feature definitionsis_enabled()checkGET /api/forge/beta-features,POST .../toggleuseBetaFeature()hook<BetaFeatureGate>component for UI gating