Repository navigation
Conversation
Add `sidebar.order` and `sidebar.hidden` to tui.json. Sections are named `context`, `mcp`, `lsp`, `todo`, `files`, or by the slot id a plugin's registration received, so plugin-contributed sidebar sections can be ordered and hidden the same way as built-in ones. Listed sections render first, in the given order; every unlisted section keeps its default order after them, so a section added later is never silently dropped. The session title is a separate slot and always stays first. Without the option nothing changes. Slot order belongs to a whole registration, so the host moves a registration's `sidebar_content` into its own registration and leaves its other slots (e.g. `sidebar_footer`) where they were.
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
3 of 6 tasks
Author
|
Follow-up with mouse drag-and-drop reordering, stacked on this PR: #53217 |
Nowaker
added a commit
to Nowaker/opencode
that referenced
this pull request
Oct 4, 2026
Feature and session records for `sidebar.order` / `sidebar.hidden` and drag-and-drop reordering (bc5aa4e, dc68262), upstream issue anomalyco#53198 and PRs anomalyco#53201 / anomalyco#53217, and the 1.18.34-vt-80-907b3bc518 build on desktop and m4max. The compact Context feature gets a timeline row for its header now toggling through the shared drag-aware click handler. 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 3ae7f02 AI-Session-ID: ses_ef81ad30fffeo7m3HoZisuJdli
Nowaker
force-pushed
the
tui-sidebar-order
branch
from
October 7, 2026 11:13
0406a6a to
9804e2c
Compare
1 task done
Member
|
This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2. — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊 |
Nowaker
added a commit
to Nowaker/opencode
that referenced
this pull request
Oct 11, 2026
Feature and session records for `sidebar.order` / `sidebar.hidden` and drag-and-drop reordering (bc5aa4e, dc68262), upstream issue anomalyco#53198 and PRs anomalyco#53201 / anomalyco#53217, and the 1.18.34-vt-80-907b3bc518 build on desktop and m4max. The compact Context feature gets a timeline row for its header now toggling through the shared drag-aware click handler. 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 3ae7f02 AI-Session-ID: ses_ef81ad30fffeo7m3HoZisuJdli
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.
Note: I'm aware v1 is now the maintenance branch and new features go to v2 only. This PR is here for others who want to use it on v1. I will submit a v2 version once I've migrated my plugin setup to v2.
Issue for this PR
Closes #53198
Type of change
What does this PR do?
Adds
sidebar.orderandsidebar.hiddentotui.jsonso session sidebar sections can be reordered and hidden.context,mcp,lsp,todo,files(the built-ininternal:sidebar-*ids without the prefix), or by a plugin's slot registration id, so plugin sections work too.sidebar_title) is untouched and stays first.How: slot order in the opentui registry belongs to a whole registration, not to one slot. When the option is set,
createSlots().register(packages/tui/src/plugin/slots.tsx) splits a registration'ssidebar_contentinto its own registration with the configured order, or drops it when hidden, and leaves the registration's other slots (e.g.sidebar_footer) where they were. The config reaches the host throughsetupSlots(api, config.sidebar).How did you verify your code works?
packages/tui/test/plugin/slots.test.tsxrender a real slot registry: default order unchanged,orderwith unlisted sections falling through,hiddenby built-in name and plugin id while the plugin's footer slot stays. Config decode test inpackages/tui/test/config.test.tsx.bun typecheckinpackages/tuiandpackages/opencode.tui.json:{"sidebar": {"order": ["mcp", "context"], "hidden": ["lsp"]}}) againstdevand this branch.Screenshots / recordings
Sidebar text captured from tmux with the config above.
dev(option ignored):This branch:
Checklist
This PR is AI generated, but under direct supervision and on request of @Nowaker.