Skip to content

chore(release): 0.4.0#279

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
release-please--branches--main
Open

chore(release): 0.4.0#279
github-actions[bot] wants to merge 1 commit into
mainfrom
release-please--branches--main

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

The next claudecode.nvim release. Merging this PR creates the release tag and GitHub Release, then starts Communique GitHub Release note generation.

[0.4.0] - 2026-06-25

Added

  • :checkhealth claudecode health check that verifies your Neovim version, setup(), the Claude CLI, terminal provider, WebSocket server, lock file, and live connection state, with actionable advice on each failure (#275).
  • :ClaudeCodeSendText {text} command (and require("claudecode.terminal").send_to_terminal(text, opts)) to send arbitrary text to the open Claude terminal as if typed at the prompt; :ClaudeCodeSendText! inserts without submitting. Multi-line text is sent via bracketed paste. Works with the in-editor native/snacks providers only (#272).
  • User ClaudeCodeSendComplete autocmd, fired once per file when a send is accepted while Claude is connected, with data = { file_path, start_line, end_line, context } (lines 0-indexed). Lets you run post-send logic such as focusing a Claude session running outside Neovim (provider = "none"/"external"), e.g. via tmux select-pane (#265).
  • User ClaudeCodeDiffOpened / ClaudeCodeDiffClosed autocmds carrying a data payload (tab/window/file info), so configs can react to diffs opening and closing — resize, relayout, statusline, etc. (#270, #297).
  • :ClaudeCodeCloseAllDiffs command to close pending Claude diffs at once; accepted-but-unwritten diffs are left intact so saved edits are never discarded (#261).
  • diff_opts.layout = "unified": a unified diff rendered in a single buffer with deleted (red/strikethrough) and added (green) lines interleaved, a compact alternative to the two-pane "vertical"/"horizontal" layouts. Requires Neovim >= 0.9.0; the ClaudeCodeInlineDiffAdd/Delete/AddSign/DeleteSign highlight groups are customizable (#195, #295).
  • terminal.auto_insert option (default true) controlling whether the Claude terminal auto-enters insert/terminal mode on focus; set auto_insert = false to stay in Normal mode and preserve your scroll position (#233).
  • terminal.diff_split_width_percentage (optional terminal width while a diff is open, falling back to split_width_percentage) and diff_opts.auto_resize_terminal (default true; set false to own the layout yourself) (#270).
  • :ClaudeCodeTreeAdd and :ClaudeCodeSend now support snacks.nvim pickers (snacks_picker_list), adding the selected/highlighted file(s) to Claude's context (#269).
  • netrw file selection: <leader>as in netrw buffers adds marked files or the file under cursor to Claude's context (#62).
  • Selection updates are now also sent on BufEnter, so switching buffers without moving the cursor still updates Claude's selection context (#159).
  • Model picker refreshed: evergreen, version-free labels (Claude Opus (Latest), Claude Sonnet (Latest), Claude Haiku (Latest)), the 1M-context opus[1m]/sonnet[1m] variants, and Default (account recommended) (#256).

Fixed

  • The WebSocket auth token is now generated from a cryptographically secure RNG, and the lock file is written atomically with 0600 permissions in a 0700 directory (previously world-readable 0644). Handshake auth comparison is constant-time (#259).
  • Malformed WebSocket frames now close the connection with the correct RFC 6455 status code instead of leaving the connection wedged with un-drainable bytes (#258).
  • A second Neovim instance no longer fails to start its server with EADDRINUSE; port binding retries across candidate ports and the per-process PRNG seed is restored (#284).
  • Disconnect callbacks now fire on every teardown path (EOF, read/protocol errors, CLOSE frames, keepalive timeouts), preventing phantom clients from accumulating (#176).
  • System sleep is detected (>1.5x ping interval elapsed) and client pong timestamps are reset on wake, preventing false keepalive disconnections after a laptop resumes (#141).
  • closeAllDiffTabs is now scoped to claudecode's own tracked diffs and no longer wipes out an open diffview.nvim, fugitive, or native :diffsplit; openFile/openDiff no longer reuse a window in diff mode (#290).
  • Rejecting a Claude diff with :q (or :close / <C-w>c / closing the tab) now resolves it as rejected via a new WinClosed autocmd (#266).
  • Diffs opened via openDiff are now auto-closed when the client that opened them disconnects or the integration stops, instead of lingering forever when resolved outside this Neovim (#261).
  • Diffs now open when the Claude terminal is the only window — a split is created to host the diff instead of failing with "No suitable editor window found" (#260).
  • A leftover diff split is no longer left behind after accepting a diff; plugin-created windows are tracked and cleaned up deterministically (#175).
  • open_in_new_tab diff setup errors no longer strand an empty tab; focus returns to the original tab (#264).
  • keep_terminal_focus now works for floating Snacks terminals instead of stealing focus to the hidden diff split (#178).
  • Fixed the Snacks "climbing cursor" on hide/show toggle: the panel is now parked rather than destroyed, preserving the cursor anchor Claude re-renders against (splits on all versions; floats require Neovim >= 0.10) (#271).
  • The Claude terminal now adds loopback hosts (localhost, 127.0.0.1, ::1) to no_proxy/NO_PROXY, so a configured proxy no longer tunnels Claude's ws://127.0.0.1 IDE connection and times out queued @ mentions (#268).
  • Worked around a Neovim core bug (< 0.12.2) that fragmented large bracketed pastes into the terminal, making Cmd+V appear to truncate content; controlled via terminal.fix_streamed_paste ("auto" default, no-op on >= 0.12.2) (#252).
  • Quickly-made visual selections are now pushed to Claude reliably; selections are flushed synchronously on visual-mode exit and persist until the cursor moves (#267).
  • IDE tool responses are now handled correctly: diagnostics return grouped URI-based payloads with editor-native ranges and severity names, an unsupported resources capability is no longer advertised, and background file opens preserve focus (#274).
  • getDiagnostics now accepts a bare file path (not just a file:// URI), since Claude often sends the path without a scheme (#163).
  • ClaudeCodeSend no longer misroutes ordinary files into tree-extraction when their path merely contains neo-tree/NvimTree; buffers are now classified by filetype only (#292).
  • File paths containing $ are now handled correctly in ClaudeCodeAdd and openFile (#286).
  • The legacy diff options vertical_split and open_in_current_tab are applied correctly again (they were silently ignored after a merge-order change) (#142).
  • Fixed a segfault when accepting a new-file diff with render-markdown.nvim installed, by turning off diff mode before the post-write redraw (#224).
  • The empty scratch buffer is now wiped when the terminal provider is none (#223).
  • snacks_picker_list buffers are excluded from main-editor-window detection, so diffs no longer target the picker (#165).
  • Selection-context fallback now matches the [Claude Code] terminal name via substring, so external (provider = "none") terminals correctly skip sending selection context (#160).
  • Selection debounce timers are now stopped and closed safely, fixing a libuv handle leak and stale callbacks firing after being superseded (#245).
  • A one-time warning is now emitted when focus_after_send = true with provider = "none"/"external", pointing at the new ClaudeCodeSendComplete event (#265).
  • Bumped the Haiku picker label to 4.5 (#146).

Changed

  • Floating diff terminals are no longer resized when restoring terminal widths (#178).

Maintained by the release-please workflow. CHANGELOG.md and the release PR body are regenerated by Communique on every push to main, so manual edits to this PR are overwritten.

@github-actions github-actions Bot force-pushed the release-please--branches--main branch 8 times, most recently from 9e9ac77 to 576d224 Compare June 22, 2026 14:46
@github-actions github-actions Bot force-pushed the release-please--branches--main branch 3 times, most recently from 52c0c6e to 1346f88 Compare June 23, 2026 09:57
@github-actions github-actions Bot force-pushed the release-please--branches--main branch from 1346f88 to 1319d40 Compare June 23, 2026 10:01
@github-actions github-actions Bot force-pushed the release-please--branches--main branch from 1319d40 to 7c1f13e Compare June 23, 2026 10:53
gogongxt pushed a commit to gogongxt/claudecode.nvim that referenced this pull request Jun 24, 2026
)

## Summary

Renames the `diff_opts.layout = "inline"` option (added in coder#195, queued
for v0.4.0 via release-please coder#279) to **`"unified"`**, before it ships
in a tagged release. Tracked in coder#293.

[@wookayin pointed
out](coder#195 (comment))
that the shipped `"inline"` mode isn't a true "inline" diff in the VS
Code sense — it renders a unified diff in a separate `rightbelow vsplit`
pane, not an in-place virtual-text overlay in the same window. Naming it
`"inline"` now would force a breaking rename later, once we add the real
in-place overlay (the mode that most deserves the name `"inline"`).
Renaming is free now (not yet released) and a breaking change after coder#279
merges.

## What changed

- **Config value** `"inline"` → `"unified"`: validation + error message
(`config.lua`), the `ClaudeCodeDiffLayout` type alias (`types.lua`), all
four dispatch sites (`diff.lua`), and the stored `layout` value
(`diff_inline.lua`).
- **User-facing buffer name**: `<file> (inline diff)` → `<file> (unified
diff)`.
- **Docs**: README layout enum + label; a `CHANGELOG.md` `[Unreleased]`
entry for `layout = "unified"`.
- **Tests**: the accept test now expects `"unified"`; a new test asserts
the former `"inline"` is rejected.

## Decisions

- **No deprecated alias.** `"inline"` was never in a tagged release, so
there's no backward-compat obligation, and rejecting it cleanly reserves
the name for the future in-place overlay (coder#294). The validation error
names `'unified'`, so anyone tracking `main` is pointed at the new
value.
- **Internal names kept.** The `diff_inline.lua` module, its functions,
the `claudecode_inline_diff` buffer variable, and the
`ClaudeCodeInlineDiff*` highlight groups are unchanged — they describe
the inline-*style* rendering, not the layout value (coder#293 noted the
buffer var can stay). This keeps the diff small and low-risk.
- **coder#279 changelog** regenerates from commits via Communique on the next
push to `main`, so the v0.4.0 entry reflects "unified" automatically; I
did not hand-edit the bot branch.

## Validation

- `mise run all`: treefmt clean, luacheck **0/0**, **703/703** tests
pass (baseline 702 + the new rejection test).
- Headless Neovim smoke test: `layout = "unified"` accepted, `"inline"`
rejected (error names `'unified'`), `"vertical"` still works.

The true in-place overlay (the future `"inline"`) is tracked in coder#294.

Refs coder#293, coder#195, coder#82

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Thomas Kosiewski <tk@coder.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot force-pushed the release-please--branches--main branch from 7c1f13e to f7efec6 Compare June 25, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants