← reports

#6111 · Sidebar group reassignment

BugPriority: MediumEffort: Mediumui · no-reproissue2026-10-22 · base 9c3c56fa2

Verdict: NOT REPRODUCED · Root-cause confidence: low for the reported incident. Confidence is high only in the exercised decision, hook, and API behavior below.

1. TL;DR

The report does not identify the sidebar organization mode or the source and destination group types. On trusted main, existing drag-and-drop tests successfully move a thread that already belongs to custom section A into custom section B, and live API checks persist section reassignment in both directions. Project groups are different: the current implementation explicitly excludes another project's destinations and has tests preserving that restriction. That restriction is a possible explanation, not an established diagnosis of this report. Real macOS pointer behavior was not verified: the available host is Linux and the Browser Automation plugin could not open Chrome. No production fix or pull request is justified by this evidence.

2. Claims vs findings

Reported behaviorFindingEvidence and limit
An initial group assignment makes a thread impossible to correct.Not reproduced for custom sections.The section-A-to-B hook fixture passes in both clean checkouts; the public API persists A → B → A in two fresh stores.
A thread cannot be dragged into a different sidebar group.Group type matters; original interaction unverified.Custom-section decisions and hooks succeed. The existing project-mode tests reject foreign-project targets with no SDK write.
The changed group is not retained.Not reproduced at the persistence boundary.Separate GET requests after both PATCH requests return the new section. This is not a pointer-driven end-to-end test.
The problem occurs in bb 0.46.1 on macOS.Unverified platform claim.Main's bb-app package is 0.46.1, but these checks use Linux, not the released macOS app.

3. Environment

4. Minimal reproduction attempts

A. Repeat the trusted decision and hook checks

In a clean clone of get-bb/bb at the commit above, execute this exact script. The tests are the repository's existing tests, not issue-supplied code or a linked PR's code. --force prevents a second run from merely replaying Turbo's cached test output.

#!/bin/sh
set -eu
test "$(git rev-parse HEAD)" = 9c3c56fa2b864b45104080a3a89ed39fb3196f0a
test -z "$(git status --porcelain)"
pnpm install --frozen-lockfile --prefer-offline
pnpm exec turbo run build --filter=@get-bb/plugin-sdk
pnpm exec turbo run test --filter=bb-plugin-thread-list --force -- \
  app/dnd/useSectionThreadDnd.test.ts \
  app/dnd/useSectionThreadDnd.projection.test.tsx

Expected for the supported custom-section behavior: the existing tests pass, including A → B drag events and cleanup after the new row arrives. A regression in the supported path would make a relevant assertion fail. Actual first run:

Test Files  2 passed (2)
     Tests  64 passed (64)
  Duration  3.38s

Actual second clean run, with Turbo cache bypassed:

Test Files  2 passed (2)
     Tests  64 passed (64)
  Duration  3.54s
Cached:    0 cached, 7 total

The existing harness starts the dragged thread in section A. Its settled-drop tests exercise this sequence:

act(() => props().onDragStart?.(dragStart("dragged")));
act(() => props().onDragOver?.(dragOver("dragged", "section:b")));
act(() => props().onDragEnd?.(dragEnd("dragged", "section:b")));
await flushTasks();
expect(updateThreadDeferred).not.toBeNull();
view.rerender({ rootItems: movedToBRootItems });

This verifies hook behavior and a dispatched SDK call through the test runtime. The SDK transport is a test fake here; it does not prove a real mouse gesture, browser hit testing, or persistence. The separate live API check addresses only the latter boundary.

B. Repeat persisted reassignment in a fresh local instance

Start pnpm dev in an unused trusted checkout after creating a fresh nonempty checkout-specific dev directory, as described in the repository's QA guidance. Use only its printed loopback server URL; never point this fixture at an installed or existing user instance. Create a separate empty scratch Git repository. Save the following as section-persistence.mjs outside the source tree, then run node section-persistence.mjs SERVER_URL SCRATCH_GIT_PATH. The first instance used http://127.0.0.1:20430; the second used http://127.0.0.1:26342.

import assert from "node:assert/strict";

const [serverUrl, checkoutPath] = process.argv.slice(2);
assert(serverUrl && checkoutPath, "Usage: node section-persistence.mjs SERVER_URL SCRATCH_GIT_PATH");
assert(["127.0.0.1", "localhost"].includes(new URL(serverUrl).hostname));

async function request(route, method = "GET", body) {
  const response = await fetch(`${serverUrl}/api/v1${route}`, {
    method,
    headers: { "content-type": "application/json" },
    ...(body === undefined ? {} : { body: JSON.stringify(body) }),
  });
  assert(response.ok, `${method} ${route}: ${response.status} ${await response.clone().text()}`);
  return response.json();
}

const hosts = await request("/hosts");
assert.equal(hosts.length, 1, "Use a fresh isolated instance with one host");
const project = await request("/projects", "POST", {
  name: "Reassignment probe",
  source: { type: "local_path", path: checkoutPath, hostId: hosts[0].id },
});
const sections = await request("/thread-sections");
const source = sections.find((section) => section.name === "Repro Source") ??
  await request("/thread-sections", "POST", { name: "Repro Source" });
const target = sections.find((section) => section.name === "Repro Target") ??
  await request("/thread-sections", "POST", { name: "Repro Target" });
const created = await request("/threads", "POST", {
  projectId: project.id,
  providerId: "codex",
  origin: "sdk",
  title: "Reassignment probe",
  input: [{ type: "text", text: "Isolated section reassignment probe" }],
  sendAt: Date.now() + 86_400_000,
  sectionId: source.id,
  environment: {
    type: "host",
    hostId: hosts[0].id,
    workspace: { type: "unmanaged", path: checkoutPath },
  },
});
const thread = created.thread ?? created;
assert.equal(thread.sectionId, source.id);
console.log("Initial assignment: Repro Source");
await request(`/threads/${thread.id}`, "PATCH", { sectionId: target.id });
const moved = await request(`/threads/${thread.id}`);
assert.equal(moved.sectionId, target.id);
console.log("PATCH + fresh GET: Repro Target");
await request(`/threads/${thread.id}`, "PATCH", { sectionId: source.id });
const movedBack = await request(`/threads/${thread.id}`);
assert.equal(movedBack.sectionId, source.id);
console.log("Second PATCH + fresh GET: Repro Source");
console.log("PASS: initial section assignment does not prevent reassignment through the public API");

Expected: fresh GETs return the destination section after each PATCH. Actual output was identical in both isolated instances:

Initial assignment: Repro Source
PATCH + fresh GET: Repro Target
Second PATCH + fresh GET: Repro Source
PASS: initial section assignment does not prevent reassignment through the public API

These are queued-thread metadata checks, not a reproduction of the reporter's precise thread lifecycle or UI interaction. Stop the disposable dev processes afterward so the queued input cannot dispatch later.

5. Root cause analysis

No root cause of the reported incident is established. The tested implementation separates custom sections from project and machine-derived groups. A thread's original section is not an immutable assignment.

  1. Foreign-project destination guard: a drop onto another project's group returns no decision when dragged threads do not belong to that project.
  2. Collision filtering also removes those foreign-project destinations before an affordance is offered. Existing tests explicitly require no SDK call for those drops. This restriction could match the report if its groups were projects; their type is unknown.
  3. Custom-section moves instead generate an update whenever the destination section differs:
    if (sectionId !== undefined && (detach || thread.sectionId !== sectionId)) {
      return [
        detach
          ? { threadId: thread.id, parentThreadId: null, sectionId }
          : { threadId: thread.id, sectionId },
      ];
    }
  4. The hook commits updates through sdk.threads.update. The public update route validates the destination and puts its section ID into the metadata update. The live persistence checks confirm this is not an accepted-but-ignored field.

6. Proposed next step

Do not remove the project guard or change persisted ownership based on this report. First establish the organization mode, whether the target is a custom section, project, machine, or worktree group, and whether the gesture lands on a header or a thread row. A macOS screen recording plus those group types would distinguish an unsupported cross-project move from a custom-section pointer bug. For custom sections, the next experiment is a real pointer drag on a fresh macOS instance while recording the outgoing update and reloaded sidebar. Only a failing supported-path reproduction should drive a regression test and fix.

No pull request was opened: there is no failing reproduction on trusted main, and changing project ownership would require a product/contract decision rather than a simple local fix.

7. Verification

The same agent repeated the checks, not an independent reviewer. A second clean temporary checkout was created at 9c3c56fa2b864b45104080a3a89ed39fb3196f0a. Frozen install and SDK preparation completed there. The exact Turbo test command from section 4A was run with --force: 64 tests passed, with zero cached tasks. A second fresh dev store, different app/server/daemon ports, and a new scratch Git repository were used for the exact section 4B API script: both reassignments again persisted. Both source checkouts remained clean. No production patch or proposed failing regression was tested because no supported-path failure was obtained.

The second run supports the qualified NOT REPRODUCED verdict; it does not remove the macOS/browser limitation. No correction to those narrow findings was necessary.

8. Related issues and history

9. Appendix and limits