-
Notifications
You must be signed in to change notification settings - Fork 7
fix: confirm F2 resets before discarding learner edits #47
Copy link
Copy link
Open
Labels
area: tuiTextual terminal user interfaceTextual terminal user interfacebugSomething isn't workingSomething isn't workingdev sprintPythonlings Community Dev Sprint August 2026Pythonlings Community Dev Sprint August 2026help wantedExtra attention is neededExtra attention is neededsize: MMedium, self-contained contributionMedium, self-contained contribution
Description
Metadata
Metadata
Assignees
Labels
area: tuiTextual terminal user interfaceTextual terminal user interfacebugSomething isn't workingSomething isn't workingdev sprintPythonlings Community Dev Sprint August 2026Pythonlings Community Dev Sprint August 2026help wantedExtra attention is neededExtra attention is neededsize: MMedium, self-contained contributionMedium, self-contained contribution
Motivation
F2 currently resets learner code immediately. Reset is destructive from a learner perspective, so the default TUI path must make cancellation easy and failures visible.
Current evidence
F2to reset the current exercise..pythonlings/originals/, and reset failures are possible when a snapshot is missing or unreadable.Exact scope
Add a safe-default confirmation modal for F2 reset.
yconfirms;nand Esc cancel. Reset errors must render visibly in the TUI instead of propagating as a crash.Acceptance checklist
yperforms the reset and refreshes the current exercise view.nand Esc cancel without changing the learner file or progress state.n, cancel via Esc, and visible reset failure.Explicit exclusions
Do not change CLI
pythonlings resetconfirmation semantics, add a bulk-reset flow, auto-save destructive changes, or redesign unrelated TUI navigation.Likely files
pythonlings/screens/track.pyand/orpythonlings/app.pypythonlings/widgets/orpythonlings/screens/modal component (new as needed)pythonlings/pythonlings.tcsstests/tui/test_app_pilot.pyVerification
Manually run the TUI against a fixture workspace and exercise confirm, both cancel keys, and a deliberately missing snapshot.
Sprint coordination
See the sprint Discussion. This issue is unassigned and is not a reservation.