-
Notifications
You must be signed in to change notification settings - Fork 0
Auto-clear saved code in Drill Mode when a submission is CORRECT or ACCEPTABLE #70
Copy link
Copy link
Open
Labels
area:ui/uxUI layout, styling, accessibility, and UX flows (client-side behavior and visual polish).UI layout, styling, accessibility, and UX flows (client-side behavior and visual polish).area:webControllers, JSP/JSTL, view models, and UI wiring.Controllers, JSP/JSTL, view models, and UI wiring.enhancementNew feature or requestNew feature or requestfeature:drill-modeDrill queue, scheduling (nextDueAt), streak/timesSeen, and related UI.Drill queue, scheduling (nextDueAt), streak/timesSeen, and related UI.feature:practice-modePractice flow, challenge prompts, and basic submission behavior.Practice flow, challenge prompts, and basic submission behavior.post-mvpUse for all issues/PRs that do not belong to the MVP release. Will be implement post-MVP.Use for all issues/PRs that do not belong to the MVP release. Will be implement post-MVP.priority:P2-normalNormal priority; plan within the current milestone.Normal priority; plan within the current milestone.status:triageNewly filed or uncategorized. Needs initial review, labeling, and priority assignment.Newly filed or uncategorized. Needs initial review, labeling, and priority assignment.
Milestone
Metadata
Metadata
Assignees
Labels
area:ui/uxUI layout, styling, accessibility, and UX flows (client-side behavior and visual polish).UI layout, styling, accessibility, and UX flows (client-side behavior and visual polish).area:webControllers, JSP/JSTL, view models, and UI wiring.Controllers, JSP/JSTL, view models, and UI wiring.enhancementNew feature or requestNew feature or requestfeature:drill-modeDrill queue, scheduling (nextDueAt), streak/timesSeen, and related UI.Drill queue, scheduling (nextDueAt), streak/timesSeen, and related UI.feature:practice-modePractice flow, challenge prompts, and basic submission behavior.Practice flow, challenge prompts, and basic submission behavior.post-mvpUse for all issues/PRs that do not belong to the MVP release. Will be implement post-MVP.Use for all issues/PRs that do not belong to the MVP release. Will be implement post-MVP.priority:P2-normalNormal priority; plan within the current milestone.Normal priority; plan within the current milestone.status:triageNewly filed or uncategorized. Needs initial review, labeling, and priority assignment.Newly filed or uncategorized. Needs initial review, labeling, and priority assignment.
Projects
Status
Todo
Problem / context
In Drill and Practice Modes, Monaco-powered solutions are persisted in
localStorageso a user doesn’t lose work between attempts.However, when a user solves a challenge (CORRECT or ACCEPTABLE), this persistence becomes counterproductive:
We need a mechanism to automatically clear the saved attempt when the user successfully solves a challenge.
Proposed solution
When a submission receives an Outcome of
CORRECTorACCEPTABLE, the client should:Identify the relevant storage key:
cf.challenge.{id}.codeImmediately delete it before or after redirecting back to the next drill, depending on UX.
Ensure the editor loads only the default template next time.
Implementation Options (any are acceptable):
Option A — Clear via JSP-rendered Inline Script
Server detects a correct outcome and injects:
Option B — Clear Inside the Submission Script
Modify the client-side JS in
drill/solve.jsp(andpractice/solve.jsp?):Option C — Hybrid
Server sets a flag → JS reads flag → clears storage.
Expected Behavior
After solving a challenge, the next time it appears in the drill queue, the editor is empty or template-filled, NOT showing the past correct solution.
Users cannot accidentally “cheat themselves” using leftover saved code.
In scope / Out of scope
In scope:
Out of scope:
Acceptance criteria
Area
area:ui/ux
Dependencies / related issues
No response
Checklist