Skip to content

fix(tui): persist reverted exercise text - #162

Merged
abhiksark merged 4 commits into
abhiksark:devfrom
suganthan2005:fix/issue-74-persist-reverted-text
Nov 4, 2026
Merged

abhiksark merged 4 commits into
abhiksark:devfrom
suganthan2005:fix/issue-74-persist-reverted-text

Conversation

@suganthan2005

@suganthan2005 suganthan2005 commented Oct 15, 2026 •

Copy link
Copy Markdown

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 affected tests/tui/ coverage.

  • Applied the PR to current dev at 2be52219fd11f576d290d3096951c19aa491ec25; 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 from site-packages and 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:

Autosaved intermediate exercise edit

Reverted original text, persisted to disk:

Reverted original exercise text persisted to disk

The SVG files were exported from the running Textual app; rendered PNG copies were visually inspected during validation.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3311e224-7b81-4fc0-850b-11db061ef56d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

suganthan2005 and others added 3 commits October 16, 2026 02:50
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 abhiksark left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.

@abhiksark
abhiksark merged commit e102551 into abhiksark:dev Nov 4, 2026
9 checks passed
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