Skip to content

Undo, weekly report, setup validation; native-highlight styling - #18

Merged
ActualLearner merged 1 commit into
mainfrom
feat-undo-report-validation
Aug 22, 2026
Merged

ActualLearner merged 1 commit into
mainfrom
feat-undo-report-validation

Conversation

@ActualLearner

Copy link
Copy Markdown
Owner

What

Implements three roadmap items (user-approved):

  1. :KeyCoachUndo [lhs] — comments out the most recent KeyCoach-appended mapping in the mappings file. Provenance-safe: only lines carrying KeyCoach's own desc = "KeyCoach: ..." marker are ever touched; user-written vim.keymap.set lines are never modified even for the same lhs. Commented, not deleted — reviewable history.
  2. :KeyCoachReport — weekly digest float: observations across sessions, top actions ranked with deterministic tiebreaks, adopted-mapping counts, exclusions.
  3. Setup-time validation — a warning fires immediately when the configured mappings file cannot work (missing .lua extension, path is a directory, unwritable parent) instead of failing silently at first apply.

Styling follows the user's colorscheme: only builtin highlight groups (Title, Comment) are used — no custom highlights anywhere.

Test plan

  • appender_spec: undo comments out its own line, leaves user lines alone, never re-matches commented lines, returns not_found on nothing-to-undo.
  • keycoach_spec: command registration extended; warns for unusable mappings file; stays quiet for usable one.
  • report_spec: 7-day window filtering, deterministic ranking, adoption/exclusion summary, empty-state readability.
  • 96 passed, StyLua clean. Help doc updated (help_doc_spec enforces).

- :KeyCoachUndo [lhs] comments out the most recent KeyCoach-added
  mapping (or one matching lhs) in the mappings file. Only lines carrying
  KeyCoach's own desc marker are ever touched; user-written keymap.set
  lines are never modified. The line is commented rather than deleted so
  the change stays reviewable.
- :KeyCoachReport opens a weekly digest: observations across sessions,
  top actions, adopted-mapping counts, and exclusions. Rendered with
  builtin highlight groups only (Title/Comment) so every colorscheme
  styles it natively.
- setup() warns immediately when the configured mappings file cannot
  work (missing .lua extension, directory, unwritable parent) instead of
  failing silently at first apply.

Tests for all three surfaces; help doc and README updated.
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c43b9153-ab17-4dca-a7aa-e756d28761f8


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.

@ActualLearner
ActualLearner merged commit c5feec7 into main Aug 22, 2026
4 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.

1 participant