Official

sidebar

Built-in sidebar UI (JavaScript UI plugin).

The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: dvg install divergence/sidebar@0.2.7

Permissions in 0.2.7

  • Control chats chats.controlHighCreates chats, sends prompts and cancels runs.Add and remove workspaces, and create, rename, check off and archive chats
  • Run other plugins' commands commands.runHighRuns commands of other plugins.Open the chat search from the search button, and close the tab on screen with Cmd+W when its chat is part of a task
  • Read chats chats.readMediumReads your transcripts and chat lists.List workspaces and chats, and follow them as agents work
  • Show panels ui.slotsAlways grantedShows views in the listed parts of the window.Draw the sidebar, and its top controls in the title strip after the sidebar toggleSlots: lefttitle

Files

chat-drag.test.ts4 KB
// Dragging chats between the sections of the list, against the fake host in
// testing.ts: what the rows, headings and dock say decides where the chat
// goes, and a release does what the list showed.
import assert from "node:assert/strict";
import { afterEach, mock, test } from "node:test";
import activate from "./main.ts";
import { fakeHost } from "./testing.ts";

afterEach(() => mock.timers.reset());

const day = (n: number) => `2026-10-0${n}T00:00:00.000Z`;
const CHAT = "divergence/chat";

type Target = { onOver: (e: unknown) => void; onDrop: (e: unknown) => void; zones?: string; reorder?: string };

// Two open chats and a checked-off one, and a task of two chats.
function setup() {
  const fake = fakeHost(
    [
      { id: "c1", title: "First", at: day(5) },
      { id: "c2", title: "Second", at: day(4) },
      { id: "d1", title: "Done", at: day(3), done: day(6) },
      { id: "t1", title: "Task one", at: day(2) },
      { id: "t2", title: "Task two", at: day(1) },
    ],
    [{ id: "task", chats: ["t1", "t2"], title: "Task" }],
  );
  const target = (id: string) => fake.node(id)?.drop as Target;
  const over = (id: string, chatId: string, zone: string | null) => target(id).onOver({ type: CHAT, data: { chatId }, zone });
  const drop = (id: string, chatId: string, zone: string) => target(id).onDrop({ type: CHAT, data: { chatId }, zone });
  const updates = () => fake.calls.filter((c) => c.method === "host/chats.update").map((c) => c.params);
  const places = () => fake.calls.filter((c) => c.method === "host/layouts.place").map((c) => c.params);
  return { fake, target, over, drop, updates, places };
}

test("a chat carried over a heading goes to the top of that section, and the drop checks it off there", async () => {
  const { fake, over, drop, updates } = setup();
  const dispose = activate(fake.api);
  try {
    await fake.settle();
    over("row-c2", "c2", "into");
    await fake.settle();
    // A heading has one zone; it still moves the chat.
    over("heading-settled", "c2", "into");
    await fake.settle();
    const list = fake.list();
    assert.ok(list.indexOf("row-c2") === list.indexOf("heading-settled") + 1, "c2 heads Complete");
    drop("heading-settled", "c2", "into");
    await fake.settle();
    assert.deepEqual(updates(), [{ chatId: "c2", completed: true }]);
  } finally {
    await dispose();
  }
});

test("a carried row moves by halves and never joins the row it passes", async () => {
  const { fake, target, over, drop, places } = setup();
  const dispose = activate(fake.api);
  try {
    await fake.settle();
    assert.equal(target("row-c1").zones, "bands", "at rest a row's middle takes a chat that joins");
    over("row-c2", "c2", "before");
    await fake.settle();
    assert.equal(target("row-c1").reorder, "vertical", "while a row is carried, rows have two halves");
    over("row-c1", "c2", "before");
    await fake.settle();
    assert.notEqual(fake.node("row-c1")?.background, "accent", "no row lights up to join");
    // Let go over the middle of its own gap, as an older kernel reports it: it lands where the list shows it.
    drop("row-c2", "c2", "into");
    await fake.settle();
    assert.deepEqual(places(), []);
    const list = fake.list();
    assert.ok(list.indexOf("row-c2") < list.indexOf("row-c1"), "c2 landed above c1");
  } finally {
    await dispose();
  }
});

test("a chat of a task of several joins the row whose middle it is let go on, and the mark follows the pointer", async () => {
  const { fake, over, drop, places } = setup();
  const dispose = activate(fake.api);
  try {
    await fake.settle();
    // Onto c1's middle, then off c2, which it never reached: c1 keeps its mark.
    over("row-c1", "t2", "into");
    over("row-c2", "t2", null);
    await fake.settle();
    assert.equal(fake.node("row-c1")?.background, "accent");
    drop("row-c1", "t2", "into");
    await fake.settle();
    assert.deepEqual(
      places().map((p) => (p as { target: unknown }).target),
      [{ kind: "join", taskId: "t-c1" }],
    );
  } finally {
    await dispose();
  }
});

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.2.7latestNov 21, 2026>=5 <6100.9 KB4 permissionsListed
0.2.6Nov 16, 2026>=5 <6100.6 KB4 permissionsListed
0.2.5Nov 11, 2026>=5 <665.1 KB4 permissionsListed
0.2.4Nov 9, 2026>=5 <660.4 KB4 permissionsListed
0.2.3Oct 27, 2026>=2 <426.1 KB3 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.