Summary
diff_opts.layout = "unified" appears to skip the ClaudeCodeDiffOpened and ClaudeCodeDiffClosed User autocmds that are documented for proposed-edit diffs.
Evidence
lua/claudecode/diff.lua dispatches layout == "unified" to claudecode.diff_inline.setup_inline_diff(...) before the native diff path reaches the common ClaudeCodeDiffOpened event emission.
lua/claudecode/diff_inline.lua opens the unified diff split, renders the scratch buffer, and registers diff state, but does not emit ClaudeCodeDiffOpened.
lua/claudecode/diff.lua also returns early from _cleanup_diff_state for diff_data.layout == "unified" after calling inline.cleanup_inline_diff(...), before the common ClaudeCodeDiffClosed event emission.
lua/claudecode/diff_inline.lua cleanup does not emit ClaudeCodeDiffClosed either.
Expected behavior
All diff layouts that open a proposed-edit review UI should fire the same lifecycle events, matching the README's Diff Lifecycle Events section:
ClaudeCodeDiffOpened when the unified diff opens
ClaudeCodeDiffClosed when the unified diff is accepted/rejected/cleaned up
Impact
User configs that rely on these events for terminal resizing, statusline updates, or other review-lifecycle behavior work for native vertical/horizontal diffs but not for the unified layout.
Validation performed
Found while triaging #294.
Summary
diff_opts.layout = "unified"appears to skip theClaudeCodeDiffOpenedandClaudeCodeDiffClosedUserautocmds that are documented for proposed-edit diffs.Evidence
lua/claudecode/diff.luadispatcheslayout == "unified"toclaudecode.diff_inline.setup_inline_diff(...)before the native diff path reaches the commonClaudeCodeDiffOpenedevent emission.lua/claudecode/diff_inline.luaopens the unified diff split, renders the scratch buffer, and registers diff state, but does not emitClaudeCodeDiffOpened.lua/claudecode/diff.luaalso returns early from_cleanup_diff_statefordiff_data.layout == "unified"after callinginline.cleanup_inline_diff(...), before the commonClaudeCodeDiffClosedevent emission.lua/claudecode/diff_inline.luacleanup does not emitClaudeCodeDiffClosedeither.Expected behavior
All diff layouts that open a proposed-edit review UI should fire the same lifecycle events, matching the README's
Diff Lifecycle Eventssection:ClaudeCodeDiffOpenedwhen the unified diff opensClaudeCodeDiffClosedwhen the unified diff is accepted/rejected/cleaned upImpact
User configs that rely on these events for terminal resizing, statusline updates, or other review-lifecycle behavior work for native vertical/horizontal diffs but not for the unified layout.
Validation performed
ClaudeCodeDiffOpened,ClaudeCodeDiffClosed,unified, andautocmd; only diff: reconsiderlayout = "inline"naming before v0.4.0 (reserve "inline" for a true in-place overlay) #293/diff: add a true in-place "inline" overlay (virtual text) as the future layout = "inline" #294 mention this gap, and neither is a dedicated bug tracker for the current unified layout behavior.mise exec -- busted -v tests/unit/diff_inline_spec.lua tests/unit/diff_auto_resize_events_spec.lua— 39 successes / 0 failures.mise run check— 0 warnings / 0 errors.Found while triaging #294.