feat: post-quiz conversion — signup CTA and cards unlocked feedback#111
feat: post-quiz conversion — signup CTA and cards unlocked feedback#111
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements post-quiz conversion features to improve user engagement and retention. It adds a signup CTA banner for anonymous users after completing a quiz, contextual "Flashcards unlocked!" feedback when returning from a completed quiz, and refines the "No cards due" messaging.
Changes:
- Anonymous users see a signup CTA banner on quiz results page after completing a quiz
- Logged-in users get a
?quiz_completed=1query parameter in their "Back to category" link - Category page displays a "Flashcards unlocked!" banner when users arrive with the quiz_completed parameter
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/pages/quiz/[slug].vue | Adds useAuth composable, signup CTA banner for anonymous users, and conditional "Back to category" links with quiz_completed query parameter for logged-in users |
| frontend/pages/category/[slug].vue | Adds quizJustCompleted state, handles quiz_completed query parameter, and displays "Flashcards unlocked!" banner with conditional "No cards due" messaging |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
frontend/pages/category/[slug].vue
Outdated
| <p class="text-sm text-green-700">Your first review is scheduled for tomorrow. Come back then to start building long-term memory.</p> | ||
| </div> | ||
|
|
||
| <div v-else-if="stats.due === 0 && categoryLessons.length > 0" class="text-gray-500 text-center text-sm mt-2"> |
There was a problem hiding this comment.
The condition for showing "No cards due" doesn't check if the user has unlocked new cards (stats.new). According to the PR description, this message should "only show when user genuinely has zero unlocked cards", but currently it shows whenever stats.due is 0, even if stats.new is greater than 0. Consider changing the condition to also check stats.new === 0 to accurately reflect when a user has no unlocked cards at all.
| <div v-else-if="stats.due === 0 && categoryLessons.length > 0" class="text-gray-500 text-center text-sm mt-2"> | |
| <div v-else-if="stats.due === 0 && categoryLessons.length > 0 && stats.new === 0" class="text-gray-500 text-center text-sm mt-2"> |
026edaa to
3f5bd58
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <div v-else-if="stats.due === 0 && quizJustCompleted && categoryLessons.length > 0" class="rounded-xl border border-green-200 bg-green-50 px-5 py-4 text-left mt-2"> | ||
| <p class="text-sm font-semibold text-green-800 mb-1">Flashcards unlocked!</p> | ||
| <p class="text-sm text-green-700">Your first review is scheduled for tomorrow. Come back then to start building long-term memory.</p> | ||
| </div> | ||
|
|
||
| <div v-else-if="stats.due === 0 && stats.new === 0 && categoryLessons.length > 0" class="text-gray-500 text-center text-sm mt-2"> | ||
| <p>No cards due. Complete more lessons to build your review queue.</p> | ||
| </div> |
There was a problem hiding this comment.
The new empty-state condition stats.due === 0 && stats.new === 0 doesn’t match the intent of “no unlocked cards”. After a quiz submission, flashcards are seeded as UserFlashcard rows with next_review in the future (so due is 0 and new is also 0), meaning this branch will incorrectly show “No cards due. Complete more lessons…” after a refresh/navigation without quiz_completed. Consider basing this message on an explicit “has unlocked cards” signal (e.g., any completed lesson / any seeded cards) and showing an “all caught up / next review tomorrow” message when unlocked cards exist but none are due.
Summary
Test plan