extend renderAgentTree to support multi-level agent subtree rendering (#557)#573
Merged
JeremyDev87 merged 1 commit intomasterfrom Feb 19, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…e rendering (#557) Introduce recursive renderSubtree helper that traverses the childrenOf map to arbitrary depth, respecting the height limit and guarding against cycles via a visited Set. - Replace flat depth-1 loop with recursive renderSubtree function - Cycle detection via visited Set prevents infinite loops - Indentation grows with depth (2 spaces per level via prefix accumulation) - Height limit respected at every recursion level - Skill leaf nodes remain at depth-1 after all agent subtrees fix(deps): bump minimatch from 10.1.1 to 10.2.1 (GHSA-3ppc-4f35-3m26)
8daaf8e to
ae08559
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
Closes #557
Extends
renderAgentTreeinactivity-visualizer.pure.tsto render agent delegation chains beyond depth 1. Previously, grandchild nodes (depth ≥ 2) were silently omitted; this PR introduces a recursiverenderSubtreehelper that traverses the full agent tree.Problem
Solution
Changes
activity-visualizer.pure.ts: Replace flat depth-1 loop with recursiverenderSubtreefunctionvisited Setprevents infinite loops in cyclic graphs' 'or'│ ') for correct tree connectorsAgentChild,SkillChild,TreeChildlocal typesactivity-visualizer.pure.spec.ts: Added test cases covering├/└/│) for mixed sibling+child structuresTest Plan
depth=2grandchild nodes appear with correct│continuation prefix