Nested agent hierarchies: visual layer (#213, part 2 — WIP)#219
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds a visual depth layer for nested agent transcripts: ChangesNested-agent visual depth layer
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
90effa3 to
be4613c
Compare
#213 visual layer) _build_message_hierarchy now stores the chased agent-nesting depth on every TemplateMessage (agent_depth; 0 for trunk), and _cleanup_sidechain_duplicates flags a nested Task/Agent spawn whose sub-agent transcript deduped to nothing (answered directly, no tools). css_class_from_message turns agent_depth >= 1 into agent-depth-{d}, agent-ring-{1..5} (the 5-colour cycle bucket), and agent-deep (d >= 6), which the stylesheet keys off for the per-depth ramp and indent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…visual layer)
- Depth badge ('Depth N') on nested spawn cards via _agent_depth_badge,
showing the depth the spawn opens (agent_depth + 1); suppressed for
top-level spawns so shallow transcripts stay clean.
- title_ToolResultMessage tags a fully-collapsed nested spawn's result
'≡ full transcript' (the sub-agent answered directly; what's shown is
its whole transcript) — distinct from a spawn with no transcript.
- Group line cycles colour by depth (5-cycle, depth 1 = tool-green; 2
blue, 3 purple, 4 orange, 5 teal) via the inner card's agent-ring-N.
- Deep-chain indent compresses from 2em to 0.5em at depth 6+ so an
80-level chain stays on-screen (~1118px vs ~2560px); depth is carried
by the badge + colour.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Unit tests pin agent_depth per session line, the nested-only collapse flag, and the 'Depth N' badge HTML; the browser test pins the runtime CSS contract (per-depth ramp colours, comfortable vs compressed indent, badge pill colour, collapsed marker). Snapshots carry the new CSS. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@coderabbitai full review |
✅ Action performedFull review finished. |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The visual layer for nested agent hierarchies — part 2 of #213 (part 1, the structural support, landed in #218). Rebased onto main; builds straight on the
agent_depththe hierarchy pass now chases.Four pieces, all driven by the per-message agent-nesting depth:
dtranscript cycles every 5 levels (depth 1 = the existing tool-green; 2 blue, 3 purple, 4 orange, 5 teal), via anagent-ring-{1..5}bucket class.Verified on a real 80-level nested session (the ramp cycles correctly through all levels; deep compression keeps it on-screen) and an interactive look-review. As-built reference: dev-docs/agents.md §5.4. New unit + runtime-CSS browser tests pin the contract; `just ci` green.
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes