fix: route forward skip-layer edges around intermediate boxes#9
Merged
cristipufu merged 1 commit intomainfrom Feb 9, 2026
Merged
fix: route forward skip-layer edges around intermediate boxes#9cristipufu merged 1 commit intomainfrom
cristipufu merged 1 commit intomainfrom
Conversation
Forward edges that skip layers (e.g. parse_agent_output → __end__) were drawing straight vertical lines through intermediate boxes, corrupting node text. Add right-side corridor routing for colliding forward edges, matching the existing backward edge corridor pattern. - Add _forward_skip_corridors() to detect collisions and assign corridors - Add _draw_forward_corridor() with direct array access for performance - Account for label width in corridor margin calculation - Add function-agent sample, screenshot, and benchmark entry - Add tests for skip-layer collision avoidance Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
parse_agent_output→__end__skippingcall_toolandaggregate_tool_results) were drawing straight vertical lines through intermediate boxes, corrupting node text and overlapping labelsBefore
Forward skip-layer edges cut straight through intermediate node boxes, overwriting their text.
After
Changes
src/graphtty/renderer.py— Add_forward_skip_corridors()detection +_draw_forward_corridor()drawing, merge into corridor map, passroute_x/all_boxesto forward edge dispatchtests/test_renderer.py— 3 new tests (skip edge collision, skip edge labels, function-agent sample)samples/function-agent/— New sample graph with skip-layer edgesscripts/generate_screenshots.py— Add function-agent screenshot generationscreenshots/function-agent.png— New screenshotREADME.md— Updated benchmark table (8 → 9 samples)Test plan
uv run pytest tests/ -v)uv run ty check)uv run ruff format . && uv run ruff check --fix .)🤖 Generated with Claude Code