Skip to content

Act IV part 2: The Echo Rite (.) + Waypoints (marks) + The Registers#10

Merged
StrangeNoob merged 2 commits into
mainfrom
feature/act4-part2
Jul 3, 2026
Merged

Act IV part 2: The Echo Rite (.) + Waypoints (marks) + The Registers#10
StrangeNoob merged 2 commits into
mainfrom
feature/act4-part2

Conversation

@StrangeNoob

Copy link
Copy Markdown
Owner

Summary

Three medium engine features and their lessons — 27 of 29 lessons shipped. What remains is one final PR: Block Party (Ctrl-v) and The Macro Forge (q/@ + The Archivist boss), which also re-arms the game finale.

New lessons

Act Lesson Teaches
IV · 25 The Echo Rite . — repeats edits and whole insert sessions
IV · 26 Waypoints m ` ' marks
IV · 27 The Registers "a"z named registers

Engine

  • Dot-repeat: a Press-level recorder tapes the keys of the change in flight (fresh normal-mode key restarts the tape; pending-state and insert keys extend it; search/cmdline/visual clear it) and commits on an edit or on esc closing an insert. . replays through the real key path with a recursion guard. Not repeatable: u/Ctrl-r, :s, visual ops — like Vim
  • Marks: per-buffer map; ` exact jump, ' first-non-blank jump, rows clamp when edits shrink the buffer
  • Registers: "x arms a selection consumed by the next yank/paste; yanks always write the unnamed register too. Paste/yank paths refactored around setRegister/takeRegister
  • Mark/register name keys bypass allowedKeys like r/f targets; 20 new engine test cases, TDD throughout

Test-harness fix

The solvable-at-par test now skips esc when counting solution keys — the UI has never counted esc (and the test's own comment claimed it didn't). Surfaced by The Echo Rite's A ! esc j . j . solution.

Test plan

  • go test ./... green (27 lessons, all solvable at par)
  • go vet, gofmt -l clean
  • Binary builds; version smoke run

…ters

27 of 29 curriculum lessons shipped; only Block Party and The Macro
Forge (with The Archivist boss and the game finale) remain.

Engine:
- Dot-repeat: a Press-level recorder captures the last buffer-mutating
  command — including whole insert sessions through esc — and . replays
  it. Undo/redo, search, ex commands, and visual ops are not repeatable,
  matching Vim
- Marks: m{key} sets, `{key} jumps to the exact spot, '{key} to the
  line's first non-blank; positions clamp when the buffer shrinks
- Named registers: "x arms a register consumed by the next yank or
  paste; yanks write the unnamed register too (Vim semantics). Paste
  paths refactored around setRegister/takeRegister
- All pending-name keys (mark/register letters) bypass the allowedKeys
  gate like r/f targets

Content:
- The Echo Rite: dw+. down a list; A!+esc replayed by .
- Waypoints: mark, far errand, exact ` return; ' first-word return
- The Registers: named stash surviving an intervening yank+paste
- Solvable-at-par test now skips esc when counting keys, matching the
  UI's free-esc rule (its comment already claimed this)
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@StrangeNoob, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 30 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7aa79c5f-75ab-462e-95cc-e5cb1f23b3e7

📥 Commits

Reviewing files that changed from the base of the PR and between f6d808e and 3f04b1b.

⛔ Files ignored due to path filters (1)
  • docs/lessons.csv is excluded by !**/*.csv
📒 Files selected for processing (14)
  • README.md
  • assets/lessons/act4-25-the-echo-rite.json
  • assets/lessons/act4-26-waypoints.json
  • assets/lessons/act4-27-the-registers.json
  • docs/LESSON-GAP-ANALYSIS.md
  • docs/LESSONS.md
  • internal/content/loader_test.go
  • internal/content/solvable_test.go
  • internal/engine/dot_repeat_test.go
  • internal/engine/edit.go
  • internal/engine/engine.go
  • internal/engine/marks_registers_test.go
  • internal/engine/visual.go
  • internal/engine/visual_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/act4-part2

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

Comment @coderabbitai help to get the list of available commands.

- . respects allowedKeys like every other command (it replayed changes
  in lessons that never taught it); regression test added
- Pasting an empty charwise yank (v y p on an empty line) landed the
  cursor on col -1 and panicked on the next insert; clamped + test
- Pending() now reports armed m/`/'/" so the HUD shows them like r/f
- README: the still-to-come note names Block Party and The Macro Forge
  instead of dangling off The Registers
@StrangeNoob

Copy link
Copy Markdown
Owner Author

CodeRabbit CLI review disposition (4 findings — all valid, all fixed):

  • . bypassed allowedKeys (major): fixed with a failing test first — the repeat branch sits above the normal-mode gate, so lessons that never taught . still replayed changes. Now gated like every other command.
  • Empty charwise paste crash (minor, but actually a panic): fixed with a failing test firstv y p on an empty line stored an empty charwise yank and drove Cursor.Col to −1, panicking on the next insert. Clamped.
  • **Pending() missing m/\``/'/"(minor): fixed** — the HUD now shows all armed pending states, consistent withr/f`.
  • README wording (minor): fixed — the still-to-come note now names Block Party and The Macro Forge.

@StrangeNoob StrangeNoob merged commit e0bc9ba into main Jul 3, 2026
2 checks passed
@StrangeNoob StrangeNoob deleted the feature/act4-part2 branch July 3, 2026 17:50
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