🚨 SLOP COP 🚨 · new-issue-autopilot
#3283 · Delegation activity grouping
Trusted main: a86e829f42edb4ab0960f3d8b55a17785860cf75
PARTIALLY REPRODUCED · Root-cause confidence: medium
TL;DR
Completed native delegations are grouped into a collapsible activity summary. A focused test demonstrates that two referenced delegations have no standalone row after grouping. However, supplying a child reference does not create a thread link in the native delegation title, even before grouping. This investigation therefore confirms activity placement, but does not establish a live provider delegation resolving to an existing BB child thread whose link is merely hidden.
Claims vs findings
| Claim | Finding | Evidence |
|---|---|---|
| Native delegations are nested in activity. | Verified at the view-model boundary | Two completed delegation rows become one step-summary; standalone-access assertion fails. |
| A resolved BB thread link is hidden by the summary. | Unverified end to end | The fixture supplies childRef, but native titles have zero link-bearing segments. No live provider-to-BB identity resolution was demonstrated. |
| BB-created child notifications have direct links. | Supported by source | Generated conversation titles attach thread links to typed thread subjects. Conversation rows form boundaries outside activity grouping. |
| The link can be moved without duplicating activity. | Proposed behavior, not verified | No production change was made. |
Environment
macOS, arm64; Node v22.22.3; repository-pinned pnpm 9.15.0; Vitest 4.1.1. Both checkouts use the exact trusted main commit above. Frozen installs use the existing dependency lockfile. The broken machine pnpm launcher was bypassed with a temporary launcher that runs corepack pnpm. No repository dependency was added. No real provider, account, BB runtime database, or imported store was used.
Minimal reproduction
- Create a clean checkout of get-bb/bb at the recorded main commit.
- Run
pnpm install --frozen-lockfile --prefer-offline. - Save the test below as
packages/thread-view/test/issue-3283.test.ts. - Run
pnpm exec turbo run test --filter=@bb/thread-view -- --run test/issue-3283.test.ts.
The first test characterizes actual grouping and missing automatic links. The second is an intentionally failing candidate regression assertion for standalone delegation access. It is not proof of resolved BB identity and does not test the final link-only design.
import { expect, it } from "vitest";
import type { TimelineDelegationWorkRow } from "@bb/server-contract";
import { buildTimelineViewRows } from "../src/timeline-view.js";
import { buildTimelineRowTitle } from "../src/timeline-row-title.js";
function delegation(id: string): TimelineDelegationWorkRow {
return {
id,
threadId: "thr_parent",
turnId: "turn_test",
sourceSeqStart: 1,
sourceSeqEnd: 2,
startedAt: 1000,
createdAt: 2000,
kind: "work",
workKind: "delegation",
status: "completed",
callId: id,
toolName: "spawnAgent",
childRef: "thr_child",
background: false,
subagentType: "reviewer",
description: "Review fixture",
output: "Review complete",
completedAt: 2000,
childRows: [],
};
}
it("records native delegation grouping and absence of automatic thread links", () => {
const rows = buildTimelineViewRows([delegation("a"), delegation("b")], {
closedScope: true,
});
expect(rows).toHaveLength(1);
expect(rows[0]?.kind).toBe("step-summary");
if (rows[0]?.kind !== "step-summary") throw new Error("Expected summary");
expect(rows[0].children.map((row) => row.id)).toEqual(["a", "b"]);
const title = buildTimelineRowTitle(delegation("a"), {
summaryStyle: "background",
workStyle: "default",
});
expect(title.segments.filter((segment) => segment.link)).toHaveLength(0);
console.log("OBSERVED: two delegations inside one step-summary; zero title links even with childRef=thr_child");
});
it("keeps a referenced delegation accessible outside closed activity", () => {
const rows = buildTimelineViewRows([delegation("a"), delegation("b")], {
closedScope: true,
});
expect(rows.some((row) => row.kind === "work" && row.workKind === "delegation")).toBe(true);
});
Expected from the candidate regression assertion: a top-level delegation remains accessible. Actual test result:
✓ records native delegation grouping and absence of automatic thread links × keeps a referenced delegation accessible outside closed activity AssertionError: expected false to be true // Object.is equality Tests 1 failed | 1 passed (2)
Browser fixture
The following fixture exercises the real ThreadTimelineRows component with synthetic completed delegations. Save it as apps/app/src/components/thread/timeline/rows/Issue3283.stories.tsx. Run pnpm exec turbo run storybook --filter=@bb/app -- --port 49383 --host 127.0.0.1 --stories src/components/thread/timeline/rows/Issue3283.stories.tsx, then select Investigation / Issue3283 / Activity. This preview uses no server or provider data.
import { ThreadTimelineRows } from "@/components/thread/timeline";
import { conversationRow, delegationRow } from "@/test/fixtures/thread-timeline-rows";
export default { title: "Investigation/Issue3283" };
export function Activity() {
return (
<div className="max-w-3xl p-8">
<ThreadTimelineRows
threadRuntimeDisplayStatus="idle"
workspaceRootPath={undefined}
timelineRows={[
{ ...delegationRow({ id: "a", description: "Review module A", output: "Review complete" }), childRef: "thr_child_a" },
{ ...delegationRow({ id: "b", description: "Review module B", output: "Review complete" }), childRef: "thr_child_b" },
conversationRow({ id: "answer", role: "assistant", text: "Both reviews are complete." }),
]}
/>
</div>
);
}
Root cause
Delegation projection preserves childRef on a work row. isSummarizableActivityRow excludes approvals, questions, and workflows, but accepts delegations irrespective of childRef. closeOpenStepAtBoundary groups multiple work rows into a step-summary. buildTimelineViewRows invokes this grouping at conversation boundaries or when closedScope is true. Summary body rendering puts those rows inside the expandable body.
The deeper identity/link condition is unresolved: mapDelegationTitle generates label/description/type segments without attaching a thread link. Codex translation takes childRef from provider receiverThreadIds, so arbitrary references cannot safely be treated as BB thread IDs. In contrast, Generated child notification titles build explicit links from typed thread subjects.
Proposed next step and simple-fix decision
Capture or construct a trusted server-boundary case with a provider child reference resolved to an existing BB child thread. Verify the identity mapping and the link destination, then test exactly one visible link outside activity while task detail stays inside. Merely excluding all delegations from grouping would change unrelated activity and would not create a valid link.
No fix branch or pull request was created. The resolved-child-link condition was not reproduced; a correct change needs verified identity mapping across the provider/server/UI path, which has not been established as a contained simple fix. GitHub metadata showed no open pull request linked to #3283.
Related issues
#3284 has the same reported symptom. It was used only as triage context; its content and any linked code were not executed.
Verification
The same agent repeated the grouping reproduction in a second clean temporary checkout at a86e829f42edb4ab0960f3d8b55a17785860cf75. Production source was unchanged in both checkouts. The second frozen install had not finished linking executables, so this check deliberately bypassed Turbo with a standalone assertion harness, using the first checkout’s installed tsx loader against the second checkout’s source. Both runs printed the grouping confirmation and exited 1 on the same standalone-access assertion. No second server, port, or runtime data directory was needed. This confirms grouping only; the link-resolution claim remains unverified.
Run node --import /path/to/installed/tsx/dist/loader.mjs packages/thread-view/test/issue-3283-grouping.mts from each checkout with this harness:
import assert from "node:assert/strict";
import { buildTimelineViewRows } from "../src/timeline-view.js";
function delegation(id: string) {
return {
id,
threadId: "thr_parent",
turnId: "turn_test",
sourceSeqStart: 1,
sourceSeqEnd: 2,
startedAt: 1000,
createdAt: 2000,
kind: "work",
workKind: "delegation",
status: "completed",
callId: id,
toolName: "spawnAgent",
childRef: "thr_child",
background: false,
subagentType: "reviewer",
description: "Review fixture",
output: "Review complete",
completedAt: 2000,
childRows: [],
};
}
const rows = buildTimelineViewRows([delegation("a"), delegation("b")], { closedScope: true });
assert.equal(rows.length, 1);
assert.equal(rows[0].kind, "step-summary");
assert.deepEqual(rows[0].children.map(row => row.id), ["a", "b"]);
console.log("Verified: two delegations grouped inside one step-summary");
assert.equal(rows.some(row => row.kind === "work" && row.workKind === "delegation"), true);
Verified: two delegations grouped inside one step-summary AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: false !== true actual: false expected: true
Source permalinks were checked against the same recorded commit. The report was narrowed from a possible hidden-link defect to partial evidence for grouping plus an unresolved identity/link boundary.
Appendix and limits
Tests and screenshots use synthetic data. The candidate failing assertion is deliberately broader than a link-only fix. No claim is made about live provider identity resolution, link navigation, or duplicate-link prevention. Reproduction sources and essential output are embedded above; raw local evidence is not published under the reports repository privacy policy.
The frozen install completed in the first checkout. The repository-wide Turbo build was attempted and stopped after more than twelve minutes without completion; no successful full-build claim is made. The focused Vitest test completed before that stop. Browser verification was attempted with an isolated Ladle preview on port 49383 and a fresh browser profile; the preview did not render the fixture within the investigation window. No screenshot of the reported symptom was obtained, so this is not a visual or end-to-end confirmation.
> AGENT GENERATED