Skip to content

feat: post-quiz conversion — signup CTA and cards unlocked feedback#111

Merged
OpenSauce merged 2 commits intomainfrom
task/68-post-quiz-conversion
Feb 22, 2026
Merged

feat: post-quiz conversion — signup CTA and cards unlocked feedback#111
OpenSauce merged 2 commits intomainfrom
task/68-post-quiz-conversion

Conversation

@OpenSauce
Copy link
Owner

Summary

  • Add anonymous signup CTA banner on quiz results page after completing a quiz
  • Add contextual "Flashcards unlocked!" messaging on category page when returning from a completed quiz
  • "No cards due" message only shows when user genuinely has zero unlocked cards

Test plan

  • Anonymous user completes a quiz → sees signup CTA banner below score
  • Logged-in user completes quiz → "Back to category" link includes ?quiz_completed=1
  • Category page with quiz_completed param shows green "Flashcards unlocked" banner
  • Category page without param still shows "No cards due" when appropriate
  • All 57 frontend tests pass

Copilot AI review requested due to automatic review settings February 22, 2026 17:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=1 query 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.

<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">
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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">

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 22, 2026 17:40
@OpenSauce OpenSauce force-pushed the task/68-post-quiz-conversion branch from 026edaa to 3f5bd58 Compare February 22, 2026 17:40
@OpenSauce OpenSauce merged commit 0dc559d into main Feb 22, 2026
5 checks passed
@OpenSauce OpenSauce deleted the task/68-post-quiz-conversion branch February 22, 2026 17:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +238 to 245
<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>
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
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.

2 participants