sessions: feat: show independent sessions beneath their creators - #336447
Draft
Ulugbek Abdullaev (ulugbekna) wants to merge 1 commit into
Draft
Ulugbek Abdullaev (ulugbekna) wants to merge 1 commit into
Ulugbek Abdullaev (ulugbekna) wants to merge 1 commit into
Conversation
This was referenced Sep 16, 2026
Ulugbek Abdullaev (ulugbekna)
force-pushed
the
ulugbekna/nested-session-tree-state
branch
from
September 16, 2026 18:13
2c183c2 to
3765663
Compare
Nest independent sessions beneath their creator across repositories while preserving placement boundaries, lifecycle ownership, filtering, navigation, and peer-chat rows. Add hierarchy rendering, accessibility, component fixtures, and nested-session regressions. Keep drag-and-drop conservative: reorder roots only and offer membership-only placement for creator-linked group moves. Co-authored-by: Copilot App <[email protected]>
Ulugbek Abdullaev (ulugbekna)
force-pushed
the
ulugbekna/nested-session-hierarchy
branch
from
September 16, 2026 18:22
f08f0e2 to
203821a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Display independently managed, agent-created sessions recursively beneath their creator in the Agents Window, including children working in different repositories. Extend the existing WorkbenchObjectTree rather than introducing a second tree implementation.
This draft is part 3 of 4, based on #336446. The existing nested chat rows are conversations within one session; the new rows are full sessions with their own workspace, execution state, capabilities, and actions. The provider-neutral
createdBySessionreference already exists, so this PR does not add an AHP parent field or a new session-creation tool.Visual example
Earlier live Code OSS capture using disposable test repositories. It illustrates the actual hierarchy and each session's repository label, not a new live-UI run on this rebased commit. Unrelated window content was excluded from the crop.
Placement and ownership
Tree interaction and rendering
Compose existing peer chats before recursively composed full-session children. Apply presentation caps to root branches, map descendant reveal requests to those roots, and keep native expansion, selection, keyboard navigation, and tree levels aligned with the actual structure.
Render depth-aware guides in normal, compact, and phone layouts. Reuse the ancestor list for body indentation, reset recycled root rows to depth zero, and keep guide emphasis tied to hover/focus/selection. A child retains its own repository hint while running or awaiting input; accessible labels identify its creator and repository rather than implying it works in the section root's repository.
Observe semantic creator URI changes and other structural inputs, coalescing synchronous updates and replacing observer stores when the catalog refreshes.
Deliberate boundaries
This PR keeps drag-and-drop conservative: ordinary root reorder remains available, but nested-session reordering waits for the following draft. Creator-linked group moves use membership-only feedback instead of promising an unsupported before/after position.
There is no independent-child activity roll-up on a collapsed parent. A completed parent can still contain a hidden working or input-blocked child; users expand the branch, search, or navigate directly to that session. This is separate from existing status aggregation within a session's own chats. No cross-host scheduler, automatic cloning, reparenting API, or implicit agent coordination is added.
Coverage and review
Regression cases cover cross-repository descendants mixed with peer chats, root-date placement, pin/group boundaries, missing and late creators, cycles, collapse/reveal/search through multiple levels, root caps, row recycling, guide endings, independent actions, and compact repository hints. Normal and narrow themed fixtures render the real SessionsList.
After the review fix and restack, the complete stack's 228 focused tests and client typecheck pass on Electron 43.6.0. Earlier live Code OSS checks used local Copilot and disposable repositories to exercise independent status, questions/approvals, archive/restore, pin/group placement, reload, and search. Those live checks are not a new run on this rebased commit and do not claim remote/provider-wide coverage.
For manual review, use the existing agent-created-session flow to create a child in another repository on the same host, then inspect the expanded branch, the child's repository/status and actions, collapse/reload, search, and pin/group placement.
Stack
Part 3 of 4. Base: #336446. All PRs are drafts; review and merge bottom-up. Original commit labels are retained below; PR 1 also contains its test-only review follow-up.