Skip to content

Sidebar: attach orchestration worker threads under their source thread - #11

Merged
currentbits merged 1 commit into
mainfrom
coder/when-we-are-running-a-project-using-orch-1c4972
Aug 14, 2026
Merged

currentbits merged 1 commit into
mainfrom
coder/when-we-are-running-a-project-using-orch-1c4972

Conversation

@currentbits

Copy link
Copy Markdown
Owner

What changed

Worker threads spawned by orchestration (thread_fork) were rendered as unrelated top-level rows in the sidebar, sorted purely by creation time. Since workers are created after the orchestrator, they appeared above the thread that started them, reading as separate forks — easy to confuse with independent work.

  • buildSidebarGroups (src/sidebarGroups.ts) now reorders each project group depth-first: any thread whose handoffFrom points at another thread in the same group renders directly below it. One rule covers both orchestration workers and manual forks. A fork whose source is absent (settled, archived elsewhere, deleted) keeps its normal flat position, and a corrupt-data guard re-emits stranded rows so a bad handoffFrom can never drop a thread from the list.
  • ThreadCard (src/components/Sidebar.tsx) gets a nested prop, set when the source row renders in the same sublist (attention vs archived), styled in Sidebar.module.css as a 14px indent with an elbow connector into the parent card.
  • New test in test/sidebarGroups.test.ts: workers follow their orchestrator; a fork with a missing source keeps sort order.

Why

When running a project with orchestration, workers should visibly belong to the thread that started them so the sidebar reflects the actual team structure instead of a flat list of look-alike forks.

Verification

sidebarGroups tests 13/13 pass, tsc --noEmit clean, renderer suite 707/708 — the one failure (appWiring memory-scoping slug-vs-path) also fails on the clean base tree and predates this change.

  • PR created by the Claude Code agent

buildSidebarGroups now reorders each project group depth-first so any
thread with handoffFrom sits directly below the thread that started it
(orchestration workers, manual forks). The child card indents with an
elbow connector when its source renders in the same sublist; forks whose
source is settled/missing keep their normal flat position.

Co-Authored-By: Claude Fable 5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits merged commit 6c67e80 into main Aug 14, 2026
@currentbits
currentbits deleted the coder/when-we-are-running-a-project-using-orch-1c4972 branch October 3, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant