Files
buzz/desktop/src/shared/features/manifest.ts
Taylor Ho eb155c973f feat: add feature flags system with tiered gating
- Add features.json manifest at repo root (single source of truth)
- Implement useFeatureEnabled hook + FeatureGate component
- Add ExperimentalFeaturesCard settings panel with opt-in toggles
- Gate sidebar items: managed-agents, projects, workflows
- Gate settings sections via featureGate descriptor field
- Three tiers: stable (always on), experimental (opt-in), dev (dev-only)
- Global 'Show developer features' toggle for dev tier suppression
- localStorage persistence for user overrides
- Designed for Flutter consumption (JSON manifest, platforms field)

Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
2026-06-08 13:02:58 -07:00

18 lines
627 B
TypeScript

import manifestJson from "../../../../features.json";
import type { FeatureDefinition, FeaturesManifest } from "./types";
const manifest = manifestJson as FeaturesManifest;
/** All features defined in the manifest */
export const allFeatures: FeatureDefinition[] = manifest.features;
/** Only features available on desktop */
export const desktopFeatures: FeatureDefinition[] = manifest.features.filter(
(f) => !f.platforms || f.platforms.includes("desktop"),
);
/** Look up a feature by id */
export function getFeature(id: string): FeatureDefinition | undefined {
return manifest.features.find((f) => f.id === id);
}