Skip to content

feat(quiz): Android Quiz UI — tab, code entry, questions, result (frontend 3/4)#186

Open
GerardPaligot wants to merge 9 commits into
feat/quiz-hasquiz-flagfrom
feat/quiz-android-ui
Open

feat(quiz): Android Quiz UI — tab, code entry, questions, result (frontend 3/4)#186
GerardPaligot wants to merge 9 commits into
feat/quiz-hasquiz-flagfrom
feat/quiz-android-ui

Conversation

@GerardPaligot

Copy link
Copy Markdown
Owner

Summary

Part 3 of 4 of the Quiz frontend feature. Adds the Android (Compose Multiplatform) Quiz UI on top of the shared core (#184) and the hasQuiz flag (#185).

  • Quiz tab, gated on FeatureFlags.hasQuiz in MainNavigationViewModel (mirrors the hasNetworking/hasPartnerList gating). The nav graph is registered unconditionally so deep links keep working.
  • Three screens (stateless panes + Koin ViewModels, StateFlow<UiState>):
    • Home / code entry — enter the partner code; prompts for a display name once (persisted), then registers the player. Shows the cumulative score (rank hidden).
    • Questions — single-select tappable answers; sticky submit enabled only when every question is answered.
    • Result — aggregate score + per-question feedback (correct/incorrect icon + the question text). Revisiting a completed quiz shows the saved result or an "already completed" state.
  • 5 new feature modules under features/quiz/ (routes, ui, panes, presentation, di) mirroring the networking feature's convention plugins; reuses the design-system TopAppBar, Material3 Scaffold/Button/OutlinedTextField, SmallTag, SpacingTokens, ConfilyTheme.
  • 9 ViewModel unit tests (Ktor-free, fake QuizRepository) covering load/select/submit, CodeNotFound, AlreadySubmitted, saved-result, already-completed, register delegation, cumulative score, and question-label resolution.

Scope

Part 3 of 4 (Android UI). iOS (SwiftUI) is the final PR. No backend changes.

Stacking

Stacked on #185 (hasQuiz flag) — base branch feat/quiz-hasquiz-flag. Auto-retargets as the stack merges.

Test Plan

  • ./gradlew :features:quiz:quiz-presentation:desktopTest — 9 ViewModel tests pass
  • ktlint + detekt clean on all new + edited modules
  • ./gradlew :androidApp:assembleDebug — BUILD SUCCESSFUL; :androidApp:lintDebug — 0 errors
  • Debug APK launches on emulator without crash
  • Visual check of the tab requires a backend event with hasQuiz=true (not seedable locally)

🤖 Generated with Claude Code

GerardPaligot and others added 9 commits June 2, 2026 23:12
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…stration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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