feat: multi-tab simultaneous diffs for multi-file edits#37
Merged
Conversation
Replace the single-diff-with-queue architecture with multi-tab simultaneous diffs. Each file edit now opens its own tab, solving OpenCode's multi-file workflow where all before-hooks fire before any after-hooks. Key changes: - diff.lua: active_diffs table keyed by file path replaces single diff_tab - diff.lua: per-buffer inline state (buf_inline_data) replaces module-level vars - diff.lua: close_for_file(path) closes specific file's diff tab - diff.lua: neo-tree refresh deferred to after tab close (fixes stale tabpage crash) - diff.lua: delayed second refresh so new files appear in neo-tree after write - core-post-tool.sh: uses close_for_file(path) instead of is_open() + close_diff() - core-pre-tool.sh: per-PID temp files prevent collision between concurrent hooks - core-pre-tool.sh: neo-tree indicator/reveal moved to Lua side (mark_change_and_reveal) - apply-edit.lua: fix empty old_string handling for new file creation - Remove dead auto_close config option (no longer applicable with multi-tab) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
claude-diff-original-$$).neo_tree.refresh()to after tab close viavim.schedule(), preventingInvalid tabpage iderrors.old_stringnow correctly prependsnew_string(handles new file creation via OpenCode).Test plan