Skip to content

Single shared neo-tree across diff tabs, with active-tab file highlight #84

Description

@Cannon07

Summary

When an agent proposes changes to multiple files, the plugin opens one diff per tab. Because neo-tree is tab-scoped in Neovim, switching between those diff tabs lands you in a tabpage where neo-tree is either absent or shows incomplete/stale markers. The change data is correct (the changes registry is global and the BEFORE_RENDER handler reads it), but the neo-tree window isn't consistent across tabs.

Surfaces frequently with OpenCode's multi-file / concurrent proposals.

Current behavior

  • Every preview opens in a new tab — both the side-by-side renderer and the inline renderer (show_inline_diff returns a new tab).
  • Neo-tree is per-tabpage, so each diff tab has its own (or no) neo-tree state.
  • Switching tabs → "incomplete marked neo-tree, or no neo-tree at all."

Desired behavior

  • A single neo-tree common to all diff tabs, showing all pending change markers consistently.
  • Optionally, highlight/reveal the file corresponding to the currently-focused diff tab as you switch tabs.

Possible approaches (design discussion)

  1. TabEnter autocmd that ensures neo-tree is present + refreshed and reveals the active tab's file.
  2. Don't open a new tab per file — reuse a single diff tab, or use vsplit/inline-in-current-tab — so there's one stable neo-tree.
  3. A global/shared neo-tree source rather than the per-tab filesystem source.

This touches the core "one preview = one tab" model and the reveal logic, so it needs design rather than a drop-in fix.

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions