Skip to content

feat(learn): complete the essentials track - #413

Merged
fcoury merged 1 commit into
mainfrom
fcoury/learn-red-revival
Oct 19, 2026
Merged

fcoury merged 1 commit into
mainfrom
fcoury/learn-red-revival

Conversation

@fcoury-oai

Copy link
Copy Markdown
Collaborator

The Learn hub lists four Essentials lessons, but only the first is currently executable. Complete the track so users can practice editing, command discovery, and saving without leaving the editor or touching their project files.

  • Add Edit with confidence, Find a command, and Save a practice file, with checkpoints based on real editor effects.
  • Remember completed lessons and continue at the first unfinished lesson. Add :learn essentials [1-4], :learn next, :learn restart, and :learn quit; preserve the existing Guided/Quick tours and explicit tutorial aliases.
  • Keep saves inside an owned disposable directory, reject outside paths and symlinks, and clean up on restart/exit. Restore the original workspace and wrap setting, and keep practice searches out of normal command-palette history.

This PR covers Essentials only. The remaining curriculum will follow separately.

How to Test

  1. Open a file, leave an unsaved edit, and create a split with :vsplit. Run :learn, select Essentials, and press Enter.
  2. In Find your footing, press i, type a few characters, press Esc, then u. The coach should reach 4/4 only after the original practice text is restored. Run :learn next.
  3. In Edit with confidence, press $, x, u, then Ctrl-r. The first line should end with one semicolon and the coach should reach 4/4. Run :learn next.
  4. In Find a command, run :commands, select Toggle line wrapping, press F1, then Esc. Wrapping should turn off without changing text or producing a practice-refusal warning. Run :learn next.
  5. In Save a practice file, edit and run :w twice, making another edit between saves. The dirty marker should clear after each save and the coach should report Essentials complete.
  6. Run :learn quit. The original unsaved text, split layout, and wrap setting should return. Reopen :learn; the hub should remember completion.
  7. Regression: jump to :learn essentials 4, attempt :w <a-new-path-outside-the-practice-directory> and :w! <that-path>. Neither should create or rename an outside file. :learn restart should provide a fresh practice file; quitting should remove its disposable directory.
  8. Confirm bare :tutorial and :tutorial quick still start the existing tours. During an unfinished Essentials lesson, :learn next should keep the current checkpoint.

Targeted coverage: the learn library tests and learn_red_ tests in tests/editing.rs cover progression, real picker/key handling, early exit, wrap restoration, save confinement/cleanup, and command-palette history isolation.

Validation

  • cargo fmt --all -- --check and git diff --check passed on the committed worktree.
  • On a source-identical validation snapshot, cargo clippy --all-targets --all-features -- -D warnings passed. The full all-targets/all-features run passed 3,880 tests (3 ignored) across 25 completed standard-harness targets; the RPC target also passed. The detach target aborted with a test-thread stack overflow; all 4 detach tests passed in a scoped rerun with RUST_MIN_STACK=16777216. The same overflow reproduces on unchanged main (494305c8) with identical validation dependencies.
  • All 17 Learn library tests and 3 Learn editing integration tests passed. The full library rerun also passed an Agent transcript test that failed intermittently in an earlier run.
  • Native terminal walkthrough covered all four lessons, actual saves, workspace restoration, and cleanup. The final palette-history fix was retested interactively; the visual result was approved.

The production lock could not be validated locally: the configured security registry lacks zip 9.0.4 and Wasmtime 48.0.6. The registry was not bypassed. Only the validation snapshot uses zip 9.0.2, Wasmtime/Pulley 48.0.5, Cranelift 0.135.5, and chacha20 0.10.1. This PR leaves Cargo.toml and Cargo.lock unchanged; CI must validate the production dependency set.

Known follow-ups

Existing Learn lifecycle behavior can leave breadcrumb headers absent after exit and show a practice-refusal notice during resize. Both trace to unchanged code on main. Compact hub outline truncation and the save lesson's long temporary path remain UI polish follow-ups.

@fcoury

fcoury commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T19:50:12.932170Z 95d5ad4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 95d5ad4bbd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fcoury
fcoury merged commit 133069a into main Oct 19, 2026
12 checks passed
@fcoury
fcoury deleted the fcoury/learn-red-revival branch October 19, 2026 20:01
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