Repository navigation
feat(ui): expand child sessions in sidebar - #108838
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d41b3e6f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .filter((row) => { | ||
| const parentKey = row.spawnedBy ?? row.parentSessionKey; | ||
| return !parentKey || !rootKeys.has(parentKey); | ||
| }) |
There was a problem hiding this comment.
Keep off-page children out of root rows
When sessions.list returns a child row whose parent is not in the current page/window (for example a newer child with an older parent), this keeps the row and then builds it as a root session. That gives a non-active child root grouping, pinning, dragging, multi-select, and pagination controls even though the new Control UI docs say child rows stay outside those surfaces; only the active routed child should be promoted or have its parent lineage loaded.
Useful? React with 👍 / 👎.
| } | ||
| } | ||
| for (const row of rowsByKey.values()) { | ||
| const parentKey = row.spawnedBy ?? row.parentSessionKey; |
There was a problem hiding this comment.
Prefer explicit parentSessionKey for tree parents
This chooses legacy spawnedBy before explicit parentSessionKey, but existing lineage code treats parentSessionKey as the best parent when both are present (see packages/acp-core/src/session-lineage-meta.ts). For moved/dashboard child rows that retain a stale spawnedBy but have a current parentSessionKey, the sidebar maps the child under the old parent and the directly-opened active path can expand the wrong ancestor.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 146a479707
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| !adopted.has(lineageRoot.key) && | ||
| !scopedRootRows.some((row) => row.key === lineageRoot.key) | ||
| ) { | ||
| scopedRootRows.push(lineageRoot); |
There was a problem hiding this comment.
Keep direct child ancestry ahead of root pagination
When a user opens a child session whose parent is outside the current root page and the sidebar already has visibleSessionLimit root rows, this appends the recovered parent after those rows. renderSessionListBody then immediately applies limitSidebarSessionRows, and because the recovered parent is neither active nor pinned (the active row is the child), it is treated as overflow and dropped, so the child and ancestor path stay hidden until the user loads more sessions. Promote this lineage root before pagination or make it a required row.
Useful? React with 👍 / 👎.
|
Merged via squash.
|
* feat(ui): expand child sessions in sidebar * test(ui): type child session list options * refactor(ui): split child session data helpers * fix(ui): preserve session link semantics * fix(ui): retry incomplete child session loads * chore: keep release changelog owner-only
* feat(ui): expand child sessions in sidebar * test(ui): type child session list options * refactor(ui): split child session data helpers * fix(ui): preserve session link semantics * fix(ui): retry incomplete child session loads * chore: keep release changelog owner-only
Related: #52803
AI-assisted: built and reviewed with Codex.
What Problem This Solves
Spawned child sessions are hidden from the normal Control UI sidebar, so operators cannot see parent-child structure, follow nested work, or open a child transcript without leaving the chat workflow.
Why This Change Was Made
The sidebar now progressively discloses child sessions beneath their parent. Expanding a row loads its children through the existing
sessions.list({ spawnedBy })contract, renders nested status and runtime, and opens a child in chat without giving child rows root-only pin, grouping, drag, selection, or menu behavior.Direct child routes reconstruct their visible ancestry through
sessions.describe, including parents outside the current root page. Existing root grouping, pagination, and session scope remain authoritative. No protocol, config, persistence, or migration surface changes.The interaction takes the useful part of ymichael/bb—compact progressive disclosure of worker activity—while preserving OpenClaw's existing session ownership and navigation contracts.
User Impact
Operators can expand any session with children, monitor running/completed/failed descendants with elapsed runtime, and open a child transcript directly. The default sidebar stays compact; children load only after expansion, and newly spawned children do not force rows open.
Evidence
Visual proof
Collapsed
Expanded
The screenshots use synthetic labels only. The expanded state was also exercised against a real isolated OpenClaw Gateway session graph created through OpenAI: a parent spawned two child sessions, both completed, and the Control UI opened the exact child transcript. The API key came from a SecretRef and was never printed or stored in the repository.
Exact-head automated proof
Final PR head:
f58474682681ed3edc32cec3299a3150545c795fpnpm check:changedon Blacksmith Testbox at runtime head146a4797078300f39531e6b13264dd61d8b2da94: passed, including core/UI typechecks and all lint shards. The final head differs only by removing a release-owned root changelog edit.pnpm check:test-typeson the same runtime head Testbox: passed.pnpm buildon the same runtime head Testbox: passed, including Control UI asset and performance checks.expands child sessions inline and opens a child chat.Behavior covered