You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dc68262
Browse filesBrowse the repository at this point in the historyBrowse files
feat(tui): reorder session sidebar sections by dragging their headers
Dragging a sidebar section by its header onto another section moves it
there. The resulting order is saved in kv (`sidebar_order`) and wins
over `sidebar.order` from tui.json until "Reset sidebar order" in the
command palette clears it. Reordering applies live through the slot
registry's `updateOrder`, for built-in and plugin sections alike.
Every `sidebar_content` contribution is now wrapped in a host box that
handles the drag. The box is hidden while the section renders nothing,
so empty sections still take no space. opentui captures the renderable
under the pointer at the first drag event, which may be a gap between
sections, so the dragged section is the one pressed on mouse down and a
drag is recognized from `over` events that carry a drag source.
Built-in section headers become non-selectable so pressing them starts a
drag instead of a text selection; dragging over section content still
selects text and never reorders. Collapsible headers toggle on release
only when pressed and released on the same cell, so a click still
collapses while a drag, or a drop onto a header, does not.
AI-Tool: opencode 1.18.33-vt-60-2fa3363c92
AI-Model: anthropic/claude-opus-5-5
AI-Variant: high
AI-Platform: linux
AI-Harness: Vibeterm e8a11eb
AI-Session-ID: ses_ef81ad30fffeo7m3HoZisuJdli
Copy file name to clipboardExpand all lines: packages/web/src/content/docs/tui.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -413,6 +413,8 @@ This is separate from `opencode.json`, which configures server/runtime behavior.
413
413
-`sidebar.order` - Session sidebar sections in display order, for example `["todo", "context"]`. Built-in sections are `context`, `mcp`, `lsp`, `todo`, and `files`; plugin sections use their plugin id. Sections you do not list follow in their default order. The session title always stays first.
414
414
-`sidebar.hidden` - Session sidebar sections to hide, using the same names as `sidebar.order`.
415
415
416
+
You can also drag a sidebar section by its header to a new place with the mouse. That order is saved and takes precedence over `sidebar.order` until you run **Reset sidebar order** from the command palette.
417
+
416
418
Use `OPENCODE_TUI_CONFIG` to load a custom TUI config path.
0 commit comments