Repository navigation
QA pass for v1.0.0: normalize modes, observe command identities, add done-enough checklist - #15
Merged
Merged
Conversation
Observed mode names from the Neovim adapter ("normal", "visual",
"select", "operator_pending") never matched inventory short modes
("n", "v", "s", "o"), so existing-mapping detection never fired
and candidate conflict checks silently passed in real use. Normalize each
observation's mode once at the start of processing and keep the overlap
check conservative. Ref: #10
Key/mouse capture never observed commands, so two of the four V1 recommendation types were unreachable in live use. Record the command name (never arguments) on CmdlineLeave for non-aborted colon commands in non-terminal buffers, using the exact-mode context captured when the user pressed ':' (the live mode at CmdlineLeave is "c", which would otherwise drop the identity). Ref: #10
Sharpens the fog on the wayfinder map into a release gate: automated gates, a spec-derived verification matrix, release steps, and known limitations. Ref: #10
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 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. Comment |
Covers the review notes on command name matching: Ex ranges and substitutions starting with punctuation (:%s, :'<,'>d, :1,5d, :.d) are ignored because they are not bindable, while :w! and :e# reduce to their canonical command identities. Also proves that a couple of mistyped commands below the 10-in-3-sessions evidence thresholds stay silent. Ref: #10
A consistently mistyped command (e.g. :Telescoop) could aggregate into a
bindable command identity and drive a candidate for a nonexistent command.
Skip commands that do not exist at execution time via exists(":name"), so
E492 typos never enter the evidence pool. Existing-mapping detection now
uses directional mode coverage so an "x" (visual+select) mapping is
recognized for visual and select observations, while a select-only mapping
is not reported as existing for a visual one. Ref: #10
exists(":name") returns 1 for abbreviated builtins but 2 for full
builtins and user-defined commands, so the == 1 filter dropped
:Telescope/:Example/:KeyCoach identities in real use; treat any nonzero
as existing. command_name now skips leading command modifiers (silent,
tab, vertical, keepjumps, ...) so :silent w records command:w instead of
command:silent, and ignores global/filter forms (:g/pat/d, :v/pat/d)
like the excluded range forms. Ref: #10
…-family coverage Replace the hand-rolled name extraction with Neovim's own command parser. nvim_parse_cmd resolves canonical full names (:w!/:write/:sil w all record command:write), strips every modifier including abbreviations, rejects unknown commands exactly when execution would fail with E492, and sees through any filter delimiter, so the g//v// guard no longer misses :g?pat?d. Ranged invocations are skipped via the parsed range. mode_covers now matches Vim map semantics: a "v" mapping covers select observations (vmap = Visual+Select) while an "x" mapping covers visual only (xmap), so existing mappings are neither missed nor fabricated across families. Ref: #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
QA pass against the product spec for the v1.0.0 tag (issue #10). Fixes two real spec bugs found during manual verification and adds the sharpened done-enough QA checklist the map asked for.
Changes
lua/keycoach/engine.lua): normalize canonical adapter modes ("normal"/"visual"/"select"/"operator_pending") to inventory short modes (n/v/s/o) before comparison. Previously the mismatch meant existing-mapping detection never fired and candidate conflict checks silently passed in real use.lua/keycoach/nvim/collector.lua): record privacy-safe command identities onCmdlineLeave(colon cmdtype only, not aborted, non-terminal/prompt buffers, command name only — never arguments). Command identity is captured with the exact-mode context from the:keypress, because the live mode atCmdlineLeaveis"c"(verified empirically), which would otherwise drop the identity. Two of the four V1 recommendation types were unreachable without it.docs/qa-checklist.md+ README link): sharpens the map's "QA checklist is fog" item into automated gates, a spec-derived verification matrix, release steps, and known limitations.Tests
tests/engine_spec.lua: canonical-mode regression tests (Existing Mapping, Mapping Candidate conflict).tests/collector_spec.lua: command-identity recording, invoking-mode preservation, ignore cases (aborted/non-colon/terminal/prompt), stop behavior.tests/smoke_spec.lua(new): fully wired plugin via publickeycoachAPI — install → onboard → real CmdlineLeave record; recommend → apply → retire a Mapping Candidate; Existing Mapping from a real inventory mapping.make check: 76 passing (was 67). StyLua clean.Review notes
"c"-mode-at-CmdlineLeave bug; fixed by tracking the invoking exact-mode context.:map x :Xdouble-count) are documented in the checklist.Closes #10