Skip to content

feat: feature flags module + GUIDED_STUDY_AMICUS_SYNTHESIS flag (#1738)#1764

Merged
CraigBuckmaster merged 1 commit into
masterfrom
feature/issue-1738-feature-flags
Apr 26, 2026
Merged

feat: feature flags module + GUIDED_STUDY_AMICUS_SYNTHESIS flag (#1738)#1764
CraigBuckmaster merged 1 commit into
masterfrom
feature/issue-1738-feature-flags

Conversation

@CraigBuckmaster
Copy link
Copy Markdown
Owner

Closes #1738. Phase 3.1 of epic #1725 — opens Phase 3.

Why

The Amicus-drafted synthesis path needs to ship behind a flag so the structured premium path can land first while #1446 catches up. This card creates the tiny compile-time feature-flag table + helper, and resolves the inline-constant placeholder I left in #1736.

What

  • app/src/config/featureFlags.tsFEATURE_FLAGS const, FeatureFlag type, isFlagEnabled(flag) helper. GUIDED_STUDY_AMICUS_SYNTHESIS defaults false. Per-flag JSDoc lists what to verify before flipping (Epic Epic: Amicus — AI Study Partner (v1) #1446 status, prompts review, prompt-cache hit rate).
  • app/src/config/__tests__/featureFlags.test.ts — default-off assertion, exhaustive-shape check (every flag is a boolean), helper round-trip.
  • app/src/components/guidedStudy/SynthesisFreeRecap.tsx — replace the inline Phase 2.7 placeholder const GUIDED_STUDY_AMICUS_SYNTHESIS = false with isFlagEnabled('GUIDED_STUDY_AMICUS_SYNTHESIS'). Resolves the deferred item I flagged in the Phase 2.7 — Free synthesis recap (SynthesisFreeRecap component) + free NextChapterNudge #1736 PR description.

Acceptance criteria

  • Module exists and exports flags + helper
  • Default for GUIDED_STUDY_AMICUS_SYNTHESIS is false
  • isFlagEnabled('GUIDED_STUDY_AMICUS_SYNTHESIS') returns false
  • isFlagEnabled('garbage') is a compile error (FeatureFlag keyof typed)
  • tsc / lint / full suite (3851 tests) clean

Rollback

Revert the PR. The SynthesisFreeRecap consumer falls back to importing… nothing — clean revert.

Notes for Craig

  • Kanban move requires manual action.

Generated by Claude Code

Phase 3.1 of epic #1725. Tiny compile-time feature-flag table so the
Amicus-drafted synthesis path can ship behind a switch and be enabled
later by a single-line PR + EAS Update.

- config/featureFlags.ts: FEATURE_FLAGS const + FeatureFlag type +
  isFlagEnabled(flag) helper. Per-flag JSDoc lists what to verify
  before flipping (Epic #1446 status, prompts review, prompt-cache
  hit rate). GUIDED_STUDY_AMICUS_SYNTHESIS defaults false.
- config/__tests__/featureFlags.test.ts: default-off assertion,
  exhaustive-shape check (every flag is a boolean), helper round-trip.
- components/guidedStudy/SynthesisFreeRecap.tsx: replace the inline
  Phase 2.7 placeholder constant with isFlagEnabled('GUIDED_STUDY_
  AMICUS_SYNTHESIS') — resolves the deferred item I noted in #1736.

tsc / lint / 3851 full-suite tests green.
@github-actions
Copy link
Copy Markdown

Test Results

✅ All tests passed

Passed Failed Total
Tests ✅ 3851 ❌ 0 3851
Suites ✅ 518 ❌ 0 518

Coverage

Statements Branches Functions Lines

⏱️ Duration: 91.7s

@CraigBuckmaster CraigBuckmaster merged commit 34534e4 into master Apr 26, 2026
6 checks passed
@CraigBuckmaster CraigBuckmaster deleted the feature/issue-1738-feature-flags branch April 26, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 3.1 — Feature flags module + GUIDED_STUDY_AMICUS_SYNTHESIS flag

1 participant