Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/server/src/guide/topics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ A goal (type /goal and what to reach in the message box) keeps the agent working

When Claude or Codex asks multiple-choice questions, a card takes the place of the message box. Besides answering, you can Skip a question, close the card with its X (the agent goes on without answers), or choose Reply in chat: the message box comes back, and the next message you send, text only, is your answer. The agent is told exactly which you did. Questions from other agents, such as a yes/no confirmation, still need an answer or Stop.

When a thread is done it wraps up and moves to the Wrapped shelf at the bottom of the sidebar; {place:threads.whenDone} says when that happens on its own. An agent coming back later (a check-back) doesn't keep a thread out of Wrapped: the thread returns to the list when the agent does. Old threads can be archived for you: {place:archived.cleanup}.
When a thread is done it wraps up and moves to the Wrapped shelf at the bottom of the sidebar; {place:threads.whenDone} says when that happens on its own. A thread waiting on threads its agent started can't be wrapped up until they report back. An agent coming back later (a check-back) doesn't keep a thread out of Wrapped: the thread returns to the list when the agent does. Old threads can be archived for you: {place:archived.cleanup}.

General Chats are chats with an agent that aren't tied to a project. By default they have their own page in the left bar, with a New chat button over the list. With {place:threads.generalChats} set to Section in Threads, that button leaves the left bar and the chats sit in a General chats section at the bottom of the thread list, under Wrapped: its header opens and closes it and has its own New chat button, and the Threads button counts what the chats need and are doing. Old General Chats links then open Threads with the section open. Each device keeps its own choice.

Expand Down
19 changes: 14 additions & 5 deletions apps/web/src/components/Sidebar.logic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2949,7 +2949,7 @@ describe("child thread status and wrap-up", () => {
).toBe(true);
});

it("marks a parent waiting on its threads without blocking its wrap-up", () => {
it("holds a parent waiting on its threads out of wrap-up", () => {
const seenParent = {
...base,
awaitedChildThreadCount: 3,
Expand All @@ -2959,10 +2959,19 @@ describe("child thread status and wrap-up", () => {
label: "Waiting",
childThreadCount: 3,
});
expect(canMarkThreadDone(seenParent, { now: NOW })).toBe(true);
// An unread completion under the wait still holds it, as it would alone.
expect(canMarkThreadDone({ ...seenParent, lastVisitedAt: undefined }, { now: NOW })).toBe(
false,
// Their answers start it up again, so it isn't finished: no Wrap up,
// and an earlier wrap doesn't hide it while it waits.
expect(canMarkThreadDone(seenParent, { now: NOW })).toBe(false);
expect(
isThreadDone(
{ ...seenParent, pinnedAt: null },
{ state: "done", at: "2026-10-04T12:00:00.000Z" },
{ now: NOW },
),
).toBe(false);
// Once they have all answered, it can be wrapped as before.
expect(canMarkThreadDone({ ...seenParent, awaitedChildThreadCount: 0 }, { now: NOW })).toBe(
true,
);
// Threads waiting for the user's yes block like any approval.
const asking = { ...seenParent, pendingChildApproval: true };
Expand Down
22 changes: 6 additions & 16 deletions apps/web/src/components/Sidebar.logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,6 @@ function awaitingInputPill(): ThreadStatusPill {

export function resolveThreadStatusPill(input: {
thread: ThreadStatusInput;
/**
* Look past waiting on the threads its agent started, to what the thread
* itself shows beneath it. Wrapping up reads it this way: those threads keep
* running wrapped or not.
*/
ignoreChildThreadWait?: boolean;
}): ThreadStatusPill | null {
const { thread } = input;

Expand Down Expand Up @@ -430,11 +424,7 @@ export function resolveThreadStatusPill(input: {
// Its own turn is over and the threads its agent started still owe it
// answers: each one that comes back starts it up again on its own.
const awaitedChildThreads = thread.awaitedChildThreadCount ?? 0;
if (
input.ignoreChildThreadWait !== true &&
awaitedChildThreads > 0 &&
isLatestTurnSettled(thread.latestTurn, thread.session)
) {
if (awaitedChildThreads > 0 && isLatestTurnSettled(thread.latestTurn, thread.session)) {
return {
label: "Waiting",
colorClass: WAITING_STATUS_TONE,
Expand Down Expand Up @@ -739,10 +729,10 @@ export function hasQueuedTurnStart(
* A failed thread CAN be marked done after it has been inspected -- that is
* "I saw it, I'm done with it" rather than an accidental dismissal.
*
* Waiting on the threads its agent started does not hold a thread open:
* wrapping it up never stops them, so the check reads what the thread shows
* beneath that wait. Nor does a check-back: the agent's turn is over, and
* wrapping never cancels it. When it fires, that new work outranks the old
* Waiting on the threads its agent started holds it like any other wait:
* their answers start it up again, so it isn't finished until they report
* back. A check-back does not: the agent's turn is over, and wrapping never
* cancels it. When it fires, that new work outranks the old
* word and brings the thread back by itself, like a snoozed email. (A usage
* reset still holds: that work was cut off, not finished.)
*/
Expand All @@ -759,7 +749,7 @@ export function canMarkThreadDone(
): boolean {
// The same status resolution the row uses, so "can't be marked done" and
// "shows a status that deserves attention" can never drift apart.
const status = resolveThreadStatusPill({ thread, ignoreChildThreadWait: true });
const status = resolveThreadStatusPill({ thread });
if (status !== null && status.label !== "Checking back") {
const handedBack = status.label === "Completed" && options.handedBackCompletionSeen === true;
if (!handedBack) {
Expand Down
2 changes: 1 addition & 1 deletion docs/design/child-threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ These rules override anything in the sections below that disagrees with them.
- **Parent status.** Three cases:
- Its own turn has settled and answers are still owed: cyan "Waiting" pill, word `N threads`, clock from the turn's completion.
- A batch is waiting for approval: amber `approval`, like any pending approval. It's blocking, so the parent can't be wrapped and it notifies.
- Waiting on child answers alone does not block wrapping.
- Waiting on child answers blocks wrapping too: the parent isn't finished until they report back, and each answer starts it up again. No Wrap up check, swipe or menu item, and the idle and pull request rules leave it alone.
- **Open family.** Child rows are sibling `li`s, one line each (~26px): status dot (grey check when wrapped), title, meta (state word + clock, or relative time), provider glyph. Same colours and words as live rows. Creation order, never re-sorted.
- **Collapsed family.** A child that needs the user, and the child open in the chat, still render under the summary line.
- **Fold and keyboard.** A family takes one seat in `windowInboxThreads`. It has attention if the parent or any attached child has a status pill. `orderedThreadKeys` equals the rendered rows, which keeps jump labels, prewarm, prev/next and shift-range selection correct.
Expand Down
Loading