Skip to content

Commit 4aed824

Browse files
committed
docs(forklog): record ordering, hiding and dragging sidebar sections
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
1 parent 994bfc3 commit 4aed824

4 files changed

Lines changed: 203 additions & 0 deletions

File tree

‎.vibeterm/forklog/README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,15 @@ carries every feature forward unchanged. That commit includes the full
4848
- [Pin the session title at the top of the sidebar](./features/2026-10-04-sidebar-pin-title.md)
4949
- [Compact sidebar Context display](./features/2026-10-04-sidebar-context-compact.md)
5050
- [Keep a scrolled-up reader's place in a long session](./features/2026-10-04-scroll-anchor.md)
51+
- [Order, hide and drag session sidebar sections](./features/2026-10-04-sidebar-section-order.md)
5152

5253
## Session records
5354

55+
- [2026-10-04 `ses_ef81ad30fffeo7m3HoZisuJdli`](./sessions/2026-10-04-sidebar-section-order.md)
56+
- Order and hide sidebar sections from `tui.json` (`sidebar.order`,
57+
`sidebar.hidden`) and reorder them by dragging headers; upstream issue
58+
#53198, PRs #53201 and #53217; build and install on both hosts.
59+
5460
- [2026-10-04 `ses_ef81ca107ffet5DwnFLaGWlUap`](./sessions/2026-10-04-scroll-anchor.md)
5561
- Stop new AI output from sliding a scrolled-up transcript in sessions past
5662
100 messages; upstream PR #53219 closing #41243; build and install on

‎.vibeterm/forklog/features/2026-10-04-sidebar-context-compact.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ quoting the user:
8484
- `f2fd2979ad`: introduce; open upstream issue #53200 and PR #53205;
8585
build and install on desktop (`vt-73`) and m4max (`vt-74`); `compact`
8686
set in both hosts' `tui.json`.
87+
- 2026-10-04
88+
[`ses_ef81ad30fffeo7m3HoZisuJdli`](../sessions/2026-10-04-sidebar-section-order.md)
89+
- `dc68262b8a`: the Context header toggles through `onHeaderClick` (press
90+
and release on the same cell) with non-selectable header text, so it
91+
can be dragged; click toggle re-verified in tmux.
8792

8893
## Current maintenance notes
8994

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Order, hide and drag session sidebar sections
2+
3+
## Identity
4+
5+
- Status: active
6+
- Integration branch: `dev-nowaker`
7+
- Development branch(es): `tui-sidebar-order` (config, off upstream `dev` `907b3bc518`), `tui-sidebar-drag` (drag-and-drop, stacked on it); both are upstream PR heads
8+
- First local commit: `bc5aa4ec1e`
9+
- Current local commit(s): `bc5aa4ec1e`, `dc68262b8a`
10+
- Upstream base when introduced: `907b3bc518` (upstream `dev`)
11+
- Last checked against upstream: `907b3bc518` (upstream `dev`)
12+
- Upstream: issue [#53198](https://github.com/anomalyco/opencode/issues/53198), PR [#53201](https://github.com/anomalyco/opencode/pull/53201) (config), PR [#53217](https://github.com/anomalyco/opencode/pull/53217) (drag-and-drop, builds on #53201)
13+
14+
## Original request
15+
16+
Relayed by coordinator `ses_ef8235798ffejGr4sa22eXmVNv` (effort item 4D),
17+
quoting the user:
18+
19+
> allow reordering and hiding of elements in that menu (except for title) via
20+
> tui config. and maybe also drag and drop? <- as a separate PR on top of the
21+
> first one, since this may be controversial.
22+
23+
## Goals
24+
25+
- `sidebar.order` lists sidebar sections in display order; unlisted sections
26+
follow in their default order, so a future section never vanishes.
27+
- `sidebar.hidden` hides sections. Names: `context`, `mcp`, `lsp`, `todo`,
28+
`files`, or a plugin's slot registration id, so plugin sections work too.
29+
- Dragging a section by its header onto another moves it there; the order is
30+
saved in kv `sidebar_order`, wins over `sidebar.order`, and is cleared by
31+
"Reset sidebar order" (`session.sidebar.reset_order`).
32+
33+
## Non-goals
34+
35+
- The session title (`sidebar_title` slot) and the footer are not sections.
36+
- No change without config or a drag.
37+
38+
## Rationale and constraints
39+
40+
- opentui slot order belongs to a whole registration, so the host splits a
41+
registration's `sidebar_content` into its own registration and leaves its
42+
other slots (e.g. `sidebar_footer`) in place.
43+
- Each section is wrapped in a host box that is `visible={false}` while the
44+
section renders nothing, so empty Todo/Files take no space.
45+
- opentui captures the renderable under the pointer at the first drag event,
46+
which can be a gap; the dragged section is the one pressed on mouse down and
47+
a drag is recognized from `over` events carrying a `source`.
48+
- Header text is `selectable={false}` so a press starts a drag, not a text
49+
selection; content text still selects and never reorders.
50+
- Collapsible headers (MCP, LSP, Todo, Files, and 4B's Context) toggle only
51+
when pressed and released on the same cell (`feature-plugins/sidebar/click.ts`),
52+
so a drag or a drop onto a header does not toggle it.
53+
- Shares the `sidebar` `tui.json` struct with 4A (`pin_title`) and 4B
54+
(`context`).
55+
56+
## Changes
57+
58+
| Commit | Workday | Change | Stable seam |
59+
|---|---|---|---|
60+
| `bc5aa4ec1e` | 2026-10-04 | `sidebar.order` / `sidebar.hidden`; `placeSidebarSection` applied in slot registration; config passed via `setupSlots(api, config.sidebar)` | `createSlots` in `packages/tui/src/plugin/slots.tsx`; `TuiConfig.Sidebar`; `load()` in `packages/opencode/src/plugin/tui/runtime.ts` |
61+
| `dc68262b8a` | 2026-10-04 | drag-and-drop wrapper, kv `sidebar_order`, live `registry.updateOrder`, reset command, non-selectable headers, `onHeaderClick` | `packages/tui/src/plugin/slots.tsx`; `packages/tui/src/feature-plugins/sidebar/*.tsx`; `routes/session/index.tsx` command list |
62+
63+
## Verification
64+
65+
- `bun typecheck` in `packages/tui` and `packages/opencode` - exit 0 on both
66+
upstream branches and on `dev-nowaker`; `packages/tui` `bun test` on
67+
`dev-nowaker` - 225 pass, 0 fail.
68+
- Pre-existing, unrelated: 4-5 failures in `packages/opencode`
69+
`test/config/tui.test.ts` + `test/cli/tui/plugin-loader.test.ts`, identical on
70+
vanilla `907b3bc518`.
71+
- Manual surface (throwaway tmux socket `oc-tui-sidebar-order`, isolated XDG,
72+
fake OpenAI-compatible provider, 3 failing MCP servers): vanilla ignores
73+
`{"sidebar":{"order":["mcp","context"],"hidden":["lsp"]}}`; this build shows
74+
MCP, Context, no LSP. Drag MCP onto Context and back, drag down, text-select
75+
drag (no reorder), restart persistence, reset, click collapse/expand, drop on
76+
a header without toggling it, 4B's compact Context toggle.
77+
- Installed desktop binary `1.18.34-vt-80-907b3bc518` with
78+
`{"order":["lsp"],"hidden":["context"]}`: LSP first, Context hidden, MCP next.
79+
80+
## Timeline
81+
82+
- 2026-10-04
83+
[`ses_ef81ad30fffeo7m3HoZisuJdli`](../sessions/2026-10-04-sidebar-section-order.md)
84+
- `bc5aa4ec1e`, `dc68262b8a`: introduce; issue #53198, PRs #53201 and
85+
#53217; build and install on desktop and m4max.
86+
87+
## Current maintenance notes
88+
89+
- Drop the fork commits once #53201 / #53217 (or equivalents) land upstream.
90+
- No host setting; the user has not asked for a specific order.
91+
92+
### Upstream integration checklist
93+
94+
- `placeSidebarSection` and the `register` wrapper in
95+
`packages/tui/src/plugin/slots.tsx` still see every `sidebar_content`
96+
registration; `setupSlots` still receives `config.sidebar`.
97+
- Run `bun typecheck` and `bun test test/plugin test/config.test.tsx` in
98+
`packages/tui`.
99+
- In a TUI: configured order applies, a header drag reorders, a click still
100+
collapses.
101+
- Link a new timeline row to the current session record.
102+
103+
## Supersession or removal
104+
105+
- Not applicable; status is active.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Order, hide and drag session sidebar sections
2+
3+
## Identity
4+
5+
- Workday: 2026-10-04
6+
- Session: `ses_ef81ad30fffeo7m3HoZisuJdli`
7+
- Agent/platform: `Sisyphus` (anthropic/claude-opus-5-5) / linux
8+
- Repository: `~/projekty/webapps/opencode`
9+
- Integration branch: `dev-nowaker`
10+
- Development branch(es): `tui-sidebar-order`, `tui-sidebar-drag`, landed via `land-sidebar-order`
11+
- Upstream base: `907b3bc518` (upstream `dev`, contains `v1.18.34`)
12+
- Source result commit(s): `0406a6a30e`, `24d4dd26f5` (upstream PR heads); `bc5aa4ec1e`, `dc68262b8a` (`dev-nowaker`)
13+
- Forklog commit: this file's introducing commit
14+
15+
## User requests
16+
17+
Relayed by coordinator `ses_ef8235798ffejGr4sa22eXmVNv` (effort item 4D):
18+
19+
> allow reordering and hiding of elements in that menu (except for title) via
20+
> tui config. and maybe also drag and drop? <- as a separate PR on top of the
21+
> first one, since this may be controversial.
22+
23+
## Goals
24+
25+
- PR 1: `tui.json` `sidebar.order` / `sidebar.hidden`, plugin sections
26+
included, unlisted sections kept in default order.
27+
- PR 2 (stacked): mouse drag-and-drop reorder persisted in kv, click to
28+
collapse preserved.
29+
30+
## Constraints and non-goals
31+
32+
- Siblings 4A, 4B and 4C edit the same sidebar; settings share the `sidebar`
33+
struct per 4A's request.
34+
- No restart of TUI tabs, the vibeterm tmux server or serve units.
35+
36+
## Branch and upstream movement
37+
38+
| Repository | Branch | Before | After | Action |
39+
|---|---|---|---|---|
40+
| `opencode` (GitHub fork + GitLab) | `tui-sidebar-order` | - | `0406a6a30e` | new branch off upstream `dev` `907b3bc518`; head of PR #53201 |
41+
| `opencode` (GitHub fork + GitLab) | `tui-sidebar-drag` | - | `24d4dd26f5` | stacked on `tui-sidebar-order`; head of PR #53217; force-pushed with lease from `ad25bdd00f` to fix header toggling on drop |
42+
| `opencode` | `dev-nowaker` | `6ff168d896` | `dc68262b8a` | cherry-pick both; conflicts with 4A/4B/4C resolved by keeping both sides (one `Sidebar` struct, both commands, 4C's LSP heading, 4B's Context header given the drag header treatment); fast-forward; pushed to `origin` and `nowaker-github` |
43+
44+
## Features touched
45+
46+
| Feature | Outcome | Evidence |
47+
|---|---|---|
48+
| [Order, hide and drag session sidebar sections](../features/2026-10-04-sidebar-section-order.md) | introduced | typecheck, tests, tmux captures |
49+
| [Compact sidebar Context display](../features/2026-10-04-sidebar-context-compact.md) | re-verified | its header toggles on click, not on drag or drop |
50+
51+
## Other delivered work
52+
53+
- Upstream issue [#53198](https://github.com/anomalyco/opencode/issues/53198),
54+
PRs [#53201](https://github.com/anomalyco/opencode/pull/53201) and
55+
[#53217](https://github.com/anomalyco/opencode/pull/53217); #53201 has a
56+
comment linking the follow-up.
57+
58+
## Verification
59+
60+
- See the feature record. `packages/tui` `bun test` on `dev-nowaker`:
61+
225 pass, 0 fail; typecheck exit 0 in `packages/tui` and `packages/opencode`.
62+
- `grep -c session.sidebar.reset_order` on both installed binaries - 1.
63+
64+
## Build and install
65+
66+
- Build command: `.vibeterm/build.sh` on each host, `TMPDIR` under the
67+
checkout's `tmp/` (desktop `/tmp` was near its quota).
68+
- Desktop: `1.18.34-vt-80-907b3bc518` built from `dc68262b8a`; installed at
69+
`~/projekty/webapps/opencode-build/bin/opencode` (inode `49955452`).
70+
- m4max: `1.18.34-vt-80-907b3bc518` built from `dc68262b8a`.
71+
- Running services: not restarted.
72+
73+
## Commit provenance
74+
75+
- `bc5aa4ec1e`, `dc68262b8a` - feature commits on `dev-nowaker`.
76+
- Required trailer: `AI-Session-ID: ses_ef81ad30fffeo7m3HoZisuJdli`
77+
78+
```sh
79+
git log --format='%H %(trailers:key=AI-Session-ID,valueonly)' -- \
80+
.vibeterm/forklog/sessions/2026-10-04-sidebar-section-order.md
81+
```
82+
83+
## Unknowns and blocked verification
84+
85+
- With the compiled binary, `opencode <dir> -c` in the isolated rig opened the
86+
home screen instead of resuming; the installed check used a new session.
87+
Not investigated; unrelated to this feature.

0 commit comments

Comments
 (0)