Repository navigation
docs: say that the diff and send keys come from the example config - #546
Conversation
README.md said 'Accept: :w or <leader>aa' and 'Reject: :q or <leader>ad', and told the reader to use <leader>as to send a selection or a tree file. The plugin sets none of these keys. They are mappings in the Installation spec. The lines now name the commands (:ClaudeCodeDiffAccept, :ClaudeCodeDiffDeny, :ClaudeCodeSend, :ClaudeCodeTreeAdd) and say that the spec maps the keys. The issue-289 fixture README called its own <leader>as mapping a README default. It now says that the fixture sets it.
|
@codex review |
|
@codex security review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
… I/O citations (coder#549) ## Why The READMEs name the buffer that holds Claude's proposed text in two ways. `README.md:1144` and `:1148`, `ARCHITECTURE.md` and 8 of the 16 uses in `lua/claudecode/README.md` say "proposal buffer". `lua/claudecode/README.md` and the new paragraph in `README.md:254` (from coder#546) also say "proposed buffer". The advisor of coder#546 asked for one name for one thing. The advisor of coder#547 named two small items in `ARCHITECTURE.md`. This PR takes them too, after coder#546 and coder#547 landed. - The Resource Cleanup sketch calls `M.stop()` with no condition. The real `VimLeavePre` callback runs `stop` only when `M.state.server` is set, and otherwise clears the @-mention queue (`lua/claudecode/init.lua:514-525`). - The I/O bullet says the TCP server "writes with libuv's asynchronous `write`" and cites nothing for it. ## What changed **1. The rename.** Nine words in two files. Each "proposed buffer" becomes "proposal buffer", and nothing else changes (a word-level diff shows 9 changes of "proposed" to "proposal" and no other change). | File | Lines | Count | |---|---|---| | `README.md` | 254 | 1 | | `lua/claudecode/README.md` | 181, 182, 183 (twice), 184, 187 (twice), 208 | 8 | I read each changed sentence in its new form. All nine read correctly, for example "A write of the proposal buffer (`:w`, `:wq`, `:x`, `ZZ` ...)" and "Both layouts keep the proposal buffer's `'bufhidden'` at `hide`". The other phrases in these two files already use "proposal" (`proposal window`, `proposal lines`, `proposal buffers`). `proposed changes` in `README.md` is a different thing and stays. **2. Resource Cleanup sketch** (`ARCHITECTURE.md`). The sketch now shows the `if M.state.server then M.stop() else clear_mention_queue() end` of the real callback, with its `ClaudeCodeShutdown` group. Every code line comes from `init.lua:514-525`, except two: the label `-- init.lua, M.setup (shortened)` and the trailing comment on `M.stop()`, which the old sketch had and which describes `M.stop` correctly. The other comment line is the real comment at `init.lua:520`. The lead-in "Automatic cleanup on shutdown:" had the same unconditional wording, so it now says that the autocmd that `setup` creates runs `stop` only when the server runs, and otherwise only clears the queue, with citations. This agrees with the Performance bullet ("runs `stop` when the server runs"). **3. I/O citation** (`ARCHITECTURE.md`). The write clause now cites `[lua/claudecode/server/client.lua:write]`. `write` is `local function write(client, data, callback)` at `client.lua:81`, and it calls `client.tcp_handle:write` at `:84` and `:90`. ## Scope The two README files above and the two `ARCHITECTURE.md` items. Left unchanged on purpose: - **Other bullets and sketches of `ARCHITECTURE.md`.** Not audited again here. - **Code comments and strings under `lua/`** (9 uses of "proposed buffer" in lowercase, plus `Proposed buffer ID` at `diff.lua:1187`). They sit in `diff.lua` (8) and `init.lua` (1). Both files are recorded in `covered.lock`, so a comment edit needs a new record, which is too much for a wording fix. - **`fixtures/issue-218/README.md` (2) and `fixtures/issue-238/README.md` (7).** They describe repro scripts. The sample output in `fixtures/issue-238/README.md` (`proposed buffer bufhidden = "hide"`) is what `scripts/repro_issue_238.lua` prints (`:260` and `:279`). A rename of the prose alone leaves two names in one README, and a rename of the output changes a script string. They stay as they are, because the fixture READMEs record what those scripts print. ## Blast Radius Three Markdown files. Nothing loads them. A wrong sentence here misleads a reader and breaks no behavior. ## Verification - Word-level diff of the two READMEs against `main`: exactly 9 changes of "proposed" to "proposal", no other change. - `grep` for "proposed buffer" in `README.md`, `lua/claudecode/README.md` and `ARCHITECTURE.md` finds 0 after the change. - The merge of `main` (coder#547 and coder#538) was clean and added no "proposed buffer" to a README. - `mise run format-check`: exit 0 (358 files, 0 changed). - Citation check over the seven READMEs and `ARCHITECTURE.md`: 809 entries (733 citations, 26 relative links and 50 test paths), 1 flagged. The flagged one is `[plugin/claudecode.lua:pcall(require, "claudecode")]`, an expression that `main` already cites. A negative control with three wrong symbols in the new citations flagged all three (bad 4, then 1 after the restore). The validator matches a plain name such as `write` only as a whole word anywhere in the file, so I also confirmed the definitions of `write` (`client.lua:81`) and `clear_mention_queue` (`init.lua:150`) with `grep`. - I did not run `mise run all`. The change is documentation only, and no test, script or CI file reads these files. CI runs the full suite on the pushed head. - `git merge-tree --write-tree` of the head and `origin/main` is clean. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-sonnet-5-5` • Thinking: `xhigh`_
Why
README.mdsays "Accept::w(save) or<leader>aa" and "Reject::qor<leader>ad", and tells the reader to use<leader>asto send a selection or a tree file. A reader takes these as plugin behavior. The plugin sets none of the three keys. They are mappings in the lazy.nvim spec of the Installation section (README.md:58,:60-63,:66-67).What changed
Three places in
README.mdand one in a fixture README. The new text names the command and says where the key comes from.README.md:214<leader>asto send it to Claude":ClaudeCodeSend... (thekeysin the Installation spec map<leader>asto it)":ClaudeCodeSendis defined atlua/claudecode/init.lua:946. The spec maps it atREADME.md:58.README.md:215<leader>ason a file":ClaudeCodeTreeAddon a file ... (thekeys... map<leader>asto it in the file types that the spec lists)":ClaudeCodeTreeAddis defined atinit.lua:1049. The spec maps it forNvimTree,neo-tree,oil,minifiles,netrwandsnacks_picker_listatREADME.md:60-63.README.md:251-252:w(save) or<leader>aa" and "Reject::qor<leader>ad":w(save) or:ClaudeCodeDiffAccept" and "Reject::qor:ClaudeCodeDiffDeny", then a paragraph: run these in the proposed buffer, the plugin sets no keymaps for the diff, and the spec maps<leader>aaand<leader>adto the two commandsinit.lua:1209and:1216. The spec maps the keys atREADME.md:66-67.fixtures/issue-289/README.md:58<leader>as"<leader>asmapping from the README's Installation spec, which this fixture sets"fixtures/issue-289/init.lua:100).The commands and
:wand:qbehave as the new text says. I ran the real module in headless Neovim 0.12.3 (isolated home)::waccepts and:qin the proposal window rejects, in the vertical and the unified layout.:ClaudeCodeDiffAcceptand:ClaudeCodeDiffDenyact on the diff of the current buffer, so the new text says to run them in the proposed buffer (they only warn elsewhere).Scope
I grepped every tracked Markdown file for
<leader>, modifier keys and the words keymap, keybinding, shortcut, mapped and bound.<leader>key.grep -rn '<leader>' lua plugin --include=*.luafinds nothing. Its only keymap calls are<C-z>in terminal mode (lua/claudecode/utils.lua:28) and the Snacks instance keys (terminal/snacks.lua:626,:640). The diff modules set no keymap. The README statements about<C-z>and the Snacks keys are therefore correct and I did not touch them.README.md(<leader>ac,<C-,>,<M-,>,<C-h>and the rest) sits inside an explicit example config. They claim nothing about the plugin.<leader>mention in them against the fixture's own Lua. All 25 appear there. For the diff and send keys I also read the mapping:fixtures/repro/init.lua:78-79,fixtures/remote-diff/init.lua:96-97,fixtures/issue-238/init.lua:144-145andfixtures/issue-289/init.lua:100callvim.keymap.set, andfixtures/snacks-explorer/lua/plugins/dev-claudecode.lua:18-19uses a lazykeysentry. So these READMEs describe the fixture and are correct.ARCHITECTURE.md:111-113shows<leader>daand<leader>dqkeymaps that nothing sets. PR docs: rewrite the lock file and diff sketches of ARCHITECTURE.md to match the code #543 rewrites that section.fixtures/issue-289/init.lua:20has the code comment "the README-default<leader>askeymap". It is code, not a README.CHANGELOG.mdandscripts/fixtures/changelog-released.mdmention<leader>as. They are release notes of past versions.dev-config.lua(the local development spec, described in the Local Interface & Invariants section ofREADME.md) maps<leader>a*keys. It is documented as a spec and claims no default.Blast Radius
Two Markdown files. Nothing loads them. A wrong sentence here misleads a reader and breaks no behavior.
Verification
mise run format-check: exit 0 (358 files, 0 changed).ARCHITECTURE.md: 764 citations, 1 flagged. The flagged one is[plugin/claudecode.lua:pcall(require, "claudecode")], an expression thatmainalready cites. This change adds no citation.mise run all. The change is documentation only, and no test, script or CI file reads these files. CI runs the full suite on the pushed head.git merge-tree --write-treeof the head andorigin/mainis clean.Generated with
xum• Model:anthropic:claude-sonnet-5-5• Thinking:xhigh