Skip to content

feat(tui): advance checked exercises after a countdown - #171

Merged
abhiksark merged 2 commits into
devfrom
feature/auto-advance-completed-exercises
Nov 5, 2026
Merged

abhiksark merged 2 commits into
devfrom
feature/auto-advance-completed-exercises

Conversation

@abhiksark

@abhiksark abhiksark commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Complete #129 on a feature branch from current dev, retaining contributor credit. Passing checks with a standalone completion marker start a five-second countdown; resuming edits cancels it. At expiry, remove only real standalone comment tokens, rerun checks, save progress, and advance.

Preserve marker text inside string literals and leave text unchanged when tokenization fails. Carry submitted text and a run identity through worker callbacks so stale or cancelled results cannot schedule advancement or replace a newer failure. Marker text inside a string keeps the existing manual-completion prompt. Preserve the autosave/revert and quit-flush behavior from #162 and the core completion-marker contract.

Supersedes #129 after merge. No matching issue was linked by the original contribution.

Tests

Reviewed head: d9b1a3c5f6ff43498c804429e7da94ae27316f3b; Linux, Python 3.13.13.

  • ruff check .: passed.
  • ruff format --check --quiet .: passed.
  • python -m pytest -q: 271 passed in 40.74s, including welcome copy, runner/CLI, reference solutions, autosave/revert, and quit behavior.
  • pythonlings --root tests/fixtures/passing_curriculum verify: passed.
  • Five new regression cases failed against the original implementation: multiline strings, a real marker beside a multiline-string marker, malformed text, edits during an in-flight pass, and a non-removable string marker. All pass after the fixes. An additional Unicode line-separator regression rejected incorrect token-to-line mapping; installed-wheel checks proved the exact string value is preserved. A cancelled-worker regression separately rejected removal of the run-identity guard.
  • python -m build --no-isolation --outdir /tmp/pythonlings-continue.2mi7__50/auto-dist: source and wheel builds passed with installed Hatchling; isolated dependency installation had stalled earlier in this session.
  • python -m pip install --no-deps --force-reinstall /tmp/pythonlings-continue.2mi7__50/auto-dist/pythonlings-0.4.4-py3-none-any.whl: passed in a temporary environment. From /tmp, an installed-wheel Textual pilot exercised the real five-second timer, marker removal, progress persistence, loading a2, and Ctrl+Q. Imports came from site-packages; final wheel files match all five changed production files, including corrected onboarding copy.
  • Changed file headers, 80-column lint, Python 3.9 syntax parsing, and git diff --check: passed. Supported-version runtime verification remains the hosted CI matrix.

All nine hosted checks must pass before squash merge into dev.

Screenshots

Current captures from the installed-wheel pilot at 130 x 36. Rendered PNG copies were visually inspected.

Five-second countdown after a passing marked exercise:

Passing exercise starts a five-second advancement countdown

Next exercise after marker removal and saved progress:

Next exercise with completed progress after automatic advancement

Checklist

  • Updated onboarding and result instructions
  • Added and proved regression tests
  • Verified full suite and passing curriculum
  • Added current TUI captures

CI run 41993658239: all nine checks passed at d9b1a3c5f6ff43498c804429e7da94ae27316f3b, including Python 3.9-3.13, macOS, Windows, packaging, installed CLI, and required Ruff gates. No unresolved review feedback.

Complete #129 on current dev while preserving autosave and revert handling.
Remove only standalone marker comment tokens, retain the submitted text and
run identity through worker callbacks, and ignore stale results. Cancel the
countdown when editing resumes. Keep core completion-marker semantics intact.

Add regression coverage for multiline strings, malformed text, in-flight
edits, cancelled workers, and marker text that cannot be removed. Record
current countdown and completion captures from the installed wheel.

Co-authored-by: Radha Prajapath <radha.prajapath@everestfleet.com>
@coderabbitai

coderabbitai Bot commented Nov 5, 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: 322198a8-2fdb-4f50-8892-6cc976e4b49e

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

@abhiksark
abhiksark marked this pull request as draft November 5, 2026 08:19
Use the tokenizer newline boundaries when mapping comment tokens to source lines. Prove that marker text inside a multiline string with Unicode line separators is preserved exactly.
@abhiksark
abhiksark marked this pull request as ready for review November 5, 2026 08:20
@abhiksark
abhiksark merged commit e673a0f into dev Nov 5, 2026
10 checks passed
@abhiksark abhiksark mentioned this pull request Nov 5, 2026
3 of 6 tasks
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.

1 participant