Per tho: don't add the screenshot test suite to this PR — it's not a
common path elsewhere yet, and the dedicated config / CI step / 12 PNGs
go with it.
Removed:
- desktop/playwright-screenshot.config.ts
- desktop/tests/e2e/screenshot-feature-flags.ts
- 12 screenshot PNGs under desktop/tests/e2e/screenshots/
- the Desktop screenshot e2e step from .github/workflows/ci.yml
Kept (genuine test infra, not a 'test addition' in tho's sense):
- bridge.ts seedPreviewFeatures option — preview features default-on in
E2E so existing smoke specs (workflows.spec.ts etc.) can still reach
preview-gated entry points
- tests/helpers/features.ts — single SoT for the seeding's preview ID
list, derived from preview-features.json
- src/shared/features/resolveEnabled.test.mjs — unit coverage for code
this PR added
Updated stale doc comment in bridge.ts that referenced the removed spec
by name.
Signed-off-by: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co>
Per tho's clarification, the manifest is preview-only by design — a bad
rebase had widened it to include stable entries with an explicit `tier`
field. Restoring the original shape:
- Rename `features.json` -> `preview-features.json` (loader, alias,
ts-config, vite alias, test-loader-hooks, helpers, log strings).
- Drop the 4 stable entries from the manifest. Only the 4 preview
features remain (workflows, projects, pulse, forum).
- Drop the `tier` field from the schema, types, and Zod validator —
manifest membership is now sufficient ("in the file = preview;
absent = stable, fail-open").
- Simplify `resolveEnabled(featureId, overrides)` — once you're inside
it, the feature is preview by definition.
- `useFeatureEnabled`: in-manifest -> check overrides; otherwise return
true (fail-open).
- `usePreviewFeatureWarning`: gate on manifest membership instead of
`tier === 'preview'`.
- Settings: `ExperimentalFeaturesCard` lists every desktop feature in
the manifest directly; SettingsView feature gate uses the new
`resolveEnabled` signature.
- Tests: rewrote `resolveEnabled.test.mjs` for the new signature; helper
drops the tier filter.
Per Marge's review on the previous push, `screenshot-feature-flags.ts`
was dropped from smoke testMatch but no CI step invoked the dedicated
screenshot config — coverage was dark. Adding a `Desktop screenshot e2e`
step in `.github/workflows/ci.yml` that runs `--config=
playwright-screenshot.config.ts` after the smoke step, restoring
coverage without dirtying smoke.
Signed-off-by: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co>
Per tho's call: manifest membership signals 'this needs gating'; absence
means 'just render it.' A stray <FeatureGate feature='removed-id'> should
not hide UI. Dev-mode console.warn stays so typos still surface during
development; only the resolution flips false -> true.
No call sites or tests asserted the old fail-closed behavior.
Signed-off-by: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co>
- B1: real Zod manifest validation; on parse failure log + return empty
- C1: invert preview-route gating (Pulse, projects, workflows, forum
post) — render screen and surface a sonner toast.warning via
new usePreviewFeatureWarning hook so direct links still work
- C3: derive localStorage overrides key from manifest.version
- N1: replace stale 'avoids JSON.parse' comment with accurate
reference-equality cache rationale
- N2: add cross-window 'storage' listener to mirror channel sections /
stars / mutes / thread follows pattern
- N3: explicit getServerSnapshot returning '{}' for SSR/test safety
- N4: swap 'channels' for 'doctor' in resolveEnabled test (channels
isn't in the manifest; doctor is stable)
- N5: drop screenshot-feature-flags from smoke testMatch — runs only
under playwright-screenshot.config.ts now
Signed-off-by: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co>
managed-agents is tier: 'stable' in features.json, so the wrapper
always resolved to true — leftover from the original fail-open
blocker fix. Removed the wrapper, kept the SidebarMenuItem.
Biome + typecheck clean; agents.spec.ts, smoke.spec.ts, and the
screenshot-feature-flags suite all pass locally (27/27).
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co>
Both the screenshot 'all on' test and the bridge mock seed were
hand-maintaining a parallel array of preview feature ids. tier
transitions (e.g. promoting huddles to stable) required updating
two places that the type system couldn't help us with.
Add tests/helpers/features.ts as a single source of truth that
imports /features.json directly and filters tier === 'preview'.
The 'all on' test now loops over PREVIEW_FEATURE_IDS, and bridge.ts
re-uses the same constant for its localStorage seeding.
12/12 screenshot-feature-flags tests pass locally.
Signed-off-by: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
CI was failing 16 smoke tests (workflows.spec, channels.spec, smoke.spec,
file-attachment.spec) because preview-gated UI (workflows, forum, pulse,
projects) didn't render in mock-bridge tests. Tests clicked testIDs that
were behind <FeatureGate>, timing out.
- bridge.ts: seed sprout-feature-overrides-v1 in localStorage with all
preview feature IDs enabled by default via addInitScript. New
seedPreviewFeatures option (default true) opts out for specs that
exercise the toggle UI itself.
- screenshot-feature-flags.ts: pass seedPreviewFeatures: false so the
Experiments toggle flow still drives each feature on via the UI.
59/59 affected smoke tests passing locally.
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
- Remove huddles entry from features.json (stable = no manifest entry)
- Unwrap FeatureGate wrappers in AppShell.tsx and ChannelMembersBar.tsx
- Remove unused FeatureGate imports
- Remove huddles screenshot test and view-huddles.png
- Remove huddles toggle from 'all on' test (now 4 features)
12/12 E2E tests passing.
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
- Rename sidebar label from 'Experimental' to 'Experiments'
- Add h2 title in main body to match other settings panels
- Fix biome formatting: collapse FeatureGate JSX, expand sections array
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
- Rewrote screenshot-feature-flags.ts: removed stale 'unstable' tier
references (relay-members, identity-archive), updated close button
selector to settings-back-to-app
- Deleted all old screenshots + feature-flags-tour/ artifacts
- Regenerated 13 fresh screenshots matching current UI
- Added Experiments nav group to SettingsView (was defined but missing
from settingsNavGroups)
- Registered test in playwright.config.ts smoke project
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
- Wrap HuddleIndicator in ChannelMembersBar with FeatureGate
- Wrap HuddleBar in AppShell with FeatureGate
- Keep HuddleProvider in place (useHuddle called unconditionally elsewhere)
- Huddles now properly hidden when preview toggle is off
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
- Remove 'unstable' from FeatureTier type and resolveEnabled logic
- Remove identity-archive and relay-members from manifest (stable, permission-gated)
- Move mesh-compute to preview tier
- Flatten ExperimentalFeaturesCard to simple list (no disclosure/badges)
- Fix semantic HTML: replace <label> with <div> + aria-labelledby
- Remove featureGate from relay-members settings (role-gated only)
- Remove unstable tier tests
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
- Rename tab label from 'Preview & Unstable' to 'Experimental'
- Show preview features as a flat list (no section heading)
- Add collapsible disclosure button at bottom to reveal unstable features
- Unstable rows get a warning badge; otherwise visually identical to preview rows
- Collapsed/expanded state is local (not persisted)
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Detect existing installs via prior localStorage keys (sprout-theme,
sprout-workspaces). New installs get clean opt-in; existing users
keep features they were already using.
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
1. Migration: existing users auto-seed experimental features as enabled
on first load (no feature loss on upgrade). New installs get opt-in UX.
2. Reactivity: SettingsView uses useFeatureSnapshot() so section list
updates instantly when toggles change (fixes stale useMemo deps).
3. Standards: Switch component replaces raw checkboxes, data-testid on
every toggle (feature-toggle-{id}, feature-toggle-dev-global).
4. Tests: 11 unit tests for resolveEnabled covering all tiers + edge cases.
5. Architecture: @features-manifest Vite alias replaces fragile ../../../../
relative import. Test loader also resolves the alias.
6. Versioned localStorage: keys now use -v1 suffix aligned to manifest version.
7. Cache: JSON.parse result cached across hook instances per render cycle.
8. Dev warning: console.warn in dev when getFeature() returns undefined.
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
- 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>