Repository navigation
fix(tui): persist reverted exercise text - #162
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Record the edited and reverted editor states from a current Textual pilot. The capture also verifies that reverted text remains on disk after quit. Refs abhiksark#74.
Keep the exported screenshots unchanged visually while satisfying the repository whitespace check. Refs abhiksark#74.
abhiksark
left a comment
There was a problem hiding this comment.
Reviewed f3abd452e38aed00ed566107be2b9de3e3347bc4 against current dev. The persisted-text baseline fixes autosave followed by a revert, and app-level Ctrl+Q flushes the active track even from docs. PR suite: 221 passed; integration with current dev: 249 passed; passing curriculum verify, isolated build, installed-wheel TUI autosave/revert/quit smoke, and current rendered TUI captures passed. All eight CI matrix jobs passed in run 41799235875. No unresolved review threads remain. Approved for squash merge into dev under the maintainer's requested sequential queue.
Summary
Track the text actually saved to disk so reverting to the initially loaded exercise text schedules a save after an earlier autosave. Flush the active track on app-level Ctrl+Q, including while the docs screen is open.
Closes #74.
Validation
Reviewed head:
f3abd452e38aed00ed566107be2b9de3e3347bc4. Local platform: Linux, Python 3.13.13.python -m pytest -q: 221 passed on the PR branch, including the affectedtests/tui/coverage.Applied the PR to current
devat2be52219fd11f576d290d3096951c19aa491ec25;python -m pytest -q: 249 passed.python -m pythonlings --root tests/fixtures/passing_curriculum verify: passed.Textual pilot coverage checks edit/autosave/revert and F4, Escape, Ctrl+Q, quitting from docs, rapid consecutive edits, and initial loading without a redundant save.
A current screenshot capture repeated autosave/revert and verified editor text, disk text, current exercise, and preservation after Ctrl+Q.
git diff --check origin/dev...HEAD: passed.python -m build: source and wheel distributions built successfully in an isolated build environment.Installed the built wheel into
/tmp/pythonlings-pr-loop.dfKE0X/wheel-venv; the smoke test asserted imports came fromsite-packagesand confirmed autosave, revert, and immediate Ctrl+Q preserve the original disk contents.Hosted CI run 41799235875: all eight supported platform/Python matrix jobs passed at the reviewed head.
Screenshots
The current capture shows the persisted intermediate edit, followed by a revert to the original learner text. The disk contents were checked before each capture and after quitting.
Autosaved intermediate edit:
Reverted original text, persisted to disk:
The SVG files were exported from the running Textual app; rendered PNG copies were visually inspected during validation.