[Feature Request]: Introduce 'flashback' flow to help learners get unstuck in explorations (GSoC'25 4.1)
Is your feature request related to a problem? Please describe.
When learners make a mistake on a concept they have previously demonstrated in an earlier part of a lesson, it often makes sense to redirect them back (or to a parallel flow) to try and reinforce earlier concepts that the learner may have not fully understood. However, in the current app implementation, learners subsequently need to re-answer all the cards between the earlier state and the state they had reached, which is frustrating.
#5572 is tracking a short-term solution to this problem, whereas this issue tracks a longer-term fix.
Describe the solution you'd like
This project aims to provide a new feature called 'flashbacks' which helps to bring the benefits of earlier redirection (i.e. reviewing an earlier concept that directly ties to the learner's likely misconception) without the frustrating experience of having to redo the all the questions up to returning back to the question that originally caused the learner to become stuck.
Additionally, this project also includes improving the general look-and-feel of submitted answers for both multiple choice and item selection interactions as these both currently rely on HTML generation rather than having a cleaner, natively rendered experience. This change will also allow them to be displayed properly in the 'flashback' experience.
Suggested milestones:
-
Milestone 1:
- The new flashback dialog is implemented and hooked up to the existing soft redirection button. (The in-line flow does not need to work at this stage.)
- When a learner is redirected, the Flashback Dialog should appear. Upon confirmation, the learner is taken back to the most recent instance of the card without adding a duplicate to the stack. This ensures a smoother learning experience without unnecessary reattempts of intermediate questions.
-
Milestone 2:
- Integrate the Flashback Dialog into the learner flow with an in-line view, where the "Learn Again" button is directly attached to the incorrect answer that triggered the flashback.
- Implement the updated designs for multiple choice and item selection interactions submitted answers to ensure a cleaner, natively rendered experience.
- Additionally, add relevant UI tests to verify the new functionality.
Technical hints/guidelines
- General changes explanation:
- The new flows are introducing a novel navigation pathway (being able to navigate 'back' to an earlier state, but interact with it in a completely unique way), as well as a parallel "I'm stuck" flow that's similar to hints and solutions, but more explicit (due to being largely controlled by a "I'm stuck" button). This pathway diverges for cases when the user is stuck on the first card of an exploration.
- This will require changes to both state navigation and general conceptual modeling for ephemeral states. This means refactoring how the app tracks and restores state when moving between flashbacks and the main learner flow.
- Note: we want to show the associated solution from hints and solutions, but only if available. The "See solution" should only be visible if the learner is stuck on the first question.
- UI places that need to be updated
- StateFragment & related models, including new views. More importantly, StateItemViewModel will have several new types and subclasses:
- One for the "I need help" button.
- One for the "See solution" box (which has two different states based on whether it's revealed).
- Ones for the pre-baked responses, e.g. "Need help? No problem..." and "Now that you have reviewed the solution..." responses. These could potentially be combined into one.
- One for the "Try again" button.
- One for the "Return to question" button.
- New dialog fragment models & listeners for the confirmation prompts for both navigating to a previous card and for revealing the solution.
- SelectionInteractionViewModel to not precompute a list-based HTML answer (i.e. convertSelectedItemsToHtmlString should be removed).
- StatePlayerRecyclerViewAssembler probably has multiple changes needed, but particularly it needs to properly support the new cases where multiple choice and item selection answers should be rendered as separate lists with an indicator for the correct answer. Note that part of this is probably already supported for drag and drop, but it needs to be reanalyzed and appropriated (or copied) for the new use case.
- StateFragment & related models, including new views. More importantly, StateItemViewModel will have several new types and subclasses:
- Domain changes
- ExplorationProgressController: to handle detecting new routing state, and to compute when it's appropriate to show a solution. Navigation is also different in these situations and requires additional changes to the controller (or StateDeck).
- StateDeck: requires changes to represent the new ephemeral state of previous cards (only when they're navigated to through the stuck flow; manually navigating back should show the normal CompletedState--this means that the deck is no longer immutable and can have transient states that only show up for specific scenarios).
- Model changes
- exploration.proto
- A new destination added to AnswerOutcome for "refresh previous state" with the state name.
- A new state_type for reviewable_state of type CompletedState (since no new fields are needed over that, it's just the view itself that needs to be handled differently in the UI layer).
- Changes to PendingState to represent a new property of whether the user can show the solution. The AnswerOutcome change already provides a signal on whether to show the "I need help" button, but not whether the user has exhausted enough submission attempts to warrant just giving them the solution.
- UserAnswer probably will need to be changed to mark which item among a list of items is the actual correct answer (for multiple choice and item selection).
- AnswerAndResponse will need to be turned into a oneof since it can now represent several different things (important: this needs to be done in a binary-compatible way for checkpoint loading to work--checkpoints of older states should be tested as part of this project):
- An actual answer and response (as it does today).
- One of the pre-baked responses, e.g. "Need help? No problem..." and "Now that you have reviewed the solution..." responses.
- The "see solution" box (two versions, revealed and unrevealed).
- exploration.proto
Describe alternatives you've considered
No response
Additional context
This is the high-level tracking issue corresponding to https://github.com/oppia/oppia/wiki/Google-Summer-of-Code-2025#41-flashbacks.
Relevant links: Tracking issue with mocks links (https://github.com/oppia/design-team/issues/179) and PRD (incomplete). Please note the following regarding these mocks:
- The mocks don't include explicit changes for multiple choice and item selection.
- The mocks don't quite represent the correct 'inline' experience that needs to be introduced for the 'Learn Again' button (which should be part of the answer & response section of the incorrect answer that is prompting for a revisit).
- Only the mocks with the orange toolbars are actually correct and need to be implemented (except for the otter, and the return button should be part of the flow rather than overlaid).
Meeting Minutes: Doc Link
GSoC Weekly Journal : Journal Link
Milestone 1
✅ PR 1.1 - [#5862]
Introduce a feature flag for the Flashback feature.
| Starting Date | Creation Date | Merge Date |
|---|---|---|
| 02-06-2025 | 03-06-2025 | 05-06-2025 |
| Tasks | Due Date | |
|---|---|---|
| ✅ | Introduce Feature flag in feature_flags.textproto file. |
03-06-2025 |
⏳ PR 1.2 - [#5864]
Implement logic to determine when to show “Revisit Previous Question” button for viewing the flashback card, and add tests.
| Starting Date | Creation Date | Merge Date |
|---|---|---|
| 04-06-2025 | 06-06-2025 | 09-06-2025 |
| Tasks | Due Date | |
|---|---|---|
| ✅ | Add a new field to the AnswerAndResponse message in exploration.proto. |
04-06-2025 |
| ✅ | Add a logic to detect flashbacks in ExplorationProgressController. |
04-06-2026 |
| ✅ | Add functions to StateDeck. |
05-06-2025 |
| ✅ | Add relevant tests. | 06-06-2025 |
⏳ PR 1.3 - [#5842]
Introduce new UI component for “Revisit Previous Question” button and add tests.
| Starting Date | Creation Date | Merge Date |
|---|---|---|
| 07-06-2025 | 10-06-2025 | 13-06-2025 |
| Tasks | Due Date | |
|---|---|---|
| ✅ | Introduce flashback_button_item.xml, FlashbackButtonViewModel. |
07-06-2025 |
| ✅ | Introduce rendering logic in StatePlayerRecyclerViewAssembler . |
09-06-2025 |
| ✅ | Add relevant test in StateFragmentTest. |
10-06-2025 |
⏳ PR 1.4 - [ #5865]
Implement navigation logic to view the Flashback Card, and add tests.
| Starting Date | Creation Date | Merge Date |
|---|---|---|
| 11-06-2025 | 16-06-2025 | 21-06-2025 |
| Tasks | Due Date | |
|---|---|---|
| ✅ | Add a new field to the EphemeralState message in exploration proto. |
11-06-2025 |
| ✅ | Integrate confirmation dialog into the learner navigation flow. | 12-06-2025 |
| ✅ | Implement functions for navigation logic in ExplorationProgressController. |
14-06-2025 |
| ✅ | Add test in ExplorationProgressControllerTest. |
16-06-2025 |
⏳ PR 1.5 - #
Introduce the UI components for Flashback Screen, integrate with the “Revisit Previous Question” button, and add relevant tests.
| Starting Date | Creation Date | Merge Date |
|---|---|---|
| 17-06-2025 | 24-06-2025 | 27-06-2025 |
| Tasks | Due Date | |
|---|---|---|
| ⏳ | Introduce return_to_question_button_item.xml, ReturnToQuestionViewModel. |
17-06-2025 |
| ⏳ | Add functions and implement logic in StatePlayerRecyclerViewAssembler. |
19-06-2025 |
| ⏳ | Implement logic to show Flashback toolbar. | 21-06-2025 |
| ⏳ | Add relevant test in StateFragmentTest. |
23-06-2025 |
⏳ PR 1.6 - #
Implement navigation logic for returning to the pending question after viewing Flashback and include tests.
| Starting Date | Creation Date | Merge Date |
|---|---|---|
| 25-06-2025 | 27-06-2025 | 30-06-2025 |
| Tasks | Due Date | |
|---|---|---|
| ⏳ | Add listener for “Return to Question" button. | 25-06-2025 |
| ⏳ | Implement functions for navigation logic in ExplorationProgressController. |
26-06-2025 |
| ⏳ | Add test in ExplorationProgressControllerTest. |
27-06-2025 |
Milestone 2
⏳ PR 2.1 - #
Enhance conversation flow by adding “Revisit Previous Question” button and feedback in the previous response section.
| Starting Date | Creation Date | Merge Date |
|---|---|---|
| 26-07-2025 | 01-08-2025 | 06-08-2025 |
| Tasks | Due Date | |
|---|---|---|
| ⏳ | Add functions in StatePlayerRecyclerViewAssembler. |
28-08-2025 |
| ⏳ | Add relevant tests. | 30-08-2025 |
⏳ PR 2.2 - #
Update the design of submitted answers for multiple-choice and item-selection interactions and add tests.
| Starting Date | Creation Date | Merge Date |
|---|---|---|
| 02-08-2025 | 13-08-2025 | 18-08-2025 |
| Tasks | Due Date | |
|---|---|---|
| ⏳ | Introduce multiple_choice_submitted_item.xml and item_selection_submitted_item.xml layouts. |
03-08-2025 |
| ⏳ | Add SelectionSubmittedItemViewModel and functions. |
05-08-2025 |
| ⏳ | Update the existing SubmittedAnswerViewModel. |
07-08-2025 |
| ⏳ | Modify submitted_answer_item.xml for UI enhancements. |
09-08-2025 |
| ⏳ | Add corresponding tests. | 11-08-2025 |
| ⏳ | Remove unnecessary code. | 12-08-2025 |
⏳ PR 2.3 - #
Capture and log events from the new Flashback screen.
| Starting Date | Creation Date | Merge Date |
|---|---|---|
| 14-07-2025 | 16-08-2025 | 19-08-2025 |
| Tasks | Due Date | |
|---|---|---|
| ⏳ | Capture Flashback-related events in ExplorationProgressController. |
14-08-2025 |
| ⏳ | Add tests in ExplorationProgressControllerTest. |
16-08-2025 |
⏳ PR 2.4 - #
Add additional Tests.
| Starting Date | Creation Date | Merge Date |
|---|---|---|
| 16-07-2025 | 20-08-2025 | 24-08-2025 |
| Tasks | Due Date | |
|---|---|---|
| ⏳ | Add tests in StateFragmentTest. |
17-08-2025 |
| ⏳ | Add tests in ExplorationProgressControllerTest. |
19-08-2025 |
Hi @subhajitxyz, could you please add the milestone table directly to the PR description? It’ll help ensure it doesn’t get lost in the thread as the conversation grows. Thanks!
Hi, @Nik-09, please take a look.
Thanks @subhajitxyz looks good