Skip to content

feat(quiz): hasQuiz event feature flag (frontend 2/4) - #185

Open
GerardPaligot wants to merge 12 commits into
mainfrom
feat/quiz-hasquiz-flag
Open

feat(quiz): hasQuiz event feature flag (frontend 2/4)#185
GerardPaligot wants to merge 12 commits into
mainfrom
feat/quiz-hasquiz-flag

Conversation

@GerardPaligot

Copy link
Copy Markdown
Owner

Summary

Part 2 of 4 of the Quiz frontend feature. Adds a hasQuiz event feature flag end-to-end so the upcoming Quiz tab can be shown only when relevant.

  • Backend: new FeatureKey.Quiz; QuizQuestionEntity.findByEvent(eventId); every FeaturesActivated builder now sets hasQuiz = (FeatureKey.Quiz enabled) || (event has ≥ 1 quiz question). The flag short-circuits the DB check when the manual flag is on.
  • API DTO: FeaturesActivated.hasQuiz (@SerialName("has_quiz"), default false for backward compat).
  • Client cache: has_quiz column on the SQLDelight FeaturesActivated table + 4.sqm migration for existing installs; threaded through both the mobile (EventDaoSQLDelight) and wasmJs (EventDaoSettings) read/write paths.
  • Shared entity: FeatureFlags.hasQuiz.

Scope

Part 2 of 4. The flag is delivered to the client's FeatureFlags here; the actual tab gating lands in Plans 3 (Android UI) and 4 (iOS UI) alongside the tab it gates. No UI changes in this PR.

Stacking

Stacked on #184 (shared quiz core) — base branch feat/quiz-frontend. It will auto-retarget to main once #184 merges.

Test Plan

  • ./gradlew :backend:test — new EventFeaturesQuizTest (3 truth-table cases via getV4) + QuizQuestionEntityTest pass
  • ktlint + detekt clean on backend, shared:core, shared:models
  • Compiles on android, iOS (simulatorArm64), desktop, wasmJs; SQLDelight regenerates

🤖 Generated with Claude Code

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.

1 participant