opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat(tui): [EXPERIMENTAL] Vim-style window system with extensible plugin views

Open vtemian opened this issue 2 weeks ago • 0 comments

⚠️ EXPERIMENTAL: Proof-of-concept for discussion. Not ready for merge.

Relates to #6032

To support NERDTree-like plugins (file browsers, symbol outlines, git panels) that render persistent side panels, we need this window system refactor. The current single-view design can't accommodate plugin views.


https://github.com/user-attachments/assets/7e2b5332-6452-4de8-a5af-0e6217c691f8

Vim-Style Window System

Vim-style splits with Ctrl+X + hjkl navigation. Independent sessions per pane. Extensible plugin views (Tree/List/Text/Form) enable NERDTree-style browsers and custom tool windows.

Why This Matters

Platform, Not Chat Client: Run a session in one pane, browse files in another, review diffs in a third.

Plugin-First Architecture: Plugins register views via ViewRegistry.register(id, view), users open them with layout.navigateFocusedWindow(id). Window system handles focus, borders, resizing.

Future-Proof: Layout tree supports floating windows, tabs, saved layouts without architectural changes.


Keybindings

Action Keybind
Split horizontal Ctrl+X -
Split vertical Ctrl+X |
Focus left/down/up/right Ctrl+X H/J/K/L
Close window Ctrl+X Q
Equalize Ctrl+X =
Resize Ctrl+X +/_/>/<

Known Limitations

  • Resize keybindings need more testing
  • Window state not persisted across restarts
  • Some SolidJS timing quirks (workarounds in place)

vtemian avatar Dec 30 '25 16:12 vtemian