feat: release channels (alpha/beta/stable) via PostHog feature flags

- Add `release_channel` to Settings (Rust + TypeScript)
- Add channel selector in Settings panel (alpha/beta/stable)
- Pass `release_channel` as PostHog person property on identify
- Add `isFeatureEnabled()` helper: alpha always true, beta/stable
  use PostHog flags with hardcoded fallback defaults
- Update `useFeatureFlag` to delegate to PostHog-backed evaluation
  (localStorage overrides still work for dev/QA)
- Create ADR-0042 (supersedes ADR-0017)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Test
2026-04-03 21:22:28 +02:00
parent 3172425a16
commit a0fc97e5cf
13 changed files with 137 additions and 28 deletions

View File

@@ -14,6 +14,7 @@ pub struct Settings {
pub analytics_enabled: Option<bool>,
pub anonymous_id: Option<String>,
pub update_channel: Option<String>,
pub release_channel: Option<String>,
}
fn settings_path() -> Result<PathBuf, String> {
@@ -67,6 +68,10 @@ fn save_settings_at(path: &PathBuf, settings: Settings) -> Result<(), String> {
.update_channel
.map(|k| k.trim().to_string())
.filter(|k| !k.is_empty()),
release_channel: settings
.release_channel
.map(|k| k.trim().to_string())
.filter(|k| !k.is_empty()),
};
let json = serde_json::to_string_pretty(&cleaned)