Skip to content

fix(visualization): keep fillcolor on handoff nodes by merging style attributes#3744

Merged
seratch merged 1 commit into
openai:mainfrom
comp:fix/visualization-handoff-node-fill
Jul 7, 2026
Merged

fix(visualization): keep fillcolor on handoff nodes by merging style attributes#3744
seratch merged 1 commit into
openai:mainfrom
comp:fix/visualization-handoff-node-fill

Conversation

@comp

@comp comp commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Handoff and sub-agent nodes in the agent visualization are meant to render as filled lightyellow boxes (matching the root agent node), but they currently render as empty/unfilled boxes.

The node attribute list sets style twice: style=filled, style=rounded. In the DOT language a repeated attribute takes the last value, so style resolves to rounded only and filled is dropped. Because fillcolor only takes effect when filled is present in style, the fillcolor=lightyellow was silently ignored.

This merges the two into a single valid value, style="filled,rounded", so the nodes are both filled and rounded as intended. Applies to both the Handoff and Agent handoff branches in get_all_nodes.

Test plan

Verified against the actual Graphviz renderer (dot) by rendering a node both ways to SVG and inspecting the node polygon fill:

  • Before (style=filled, style=rounded) -> fill="none" (unfilled)
  • After (style="filled,rounded") -> fill="lightyellow" (filled, as intended)

Updated the existing tests/test_visualization.py expectations (which asserted the old DOT string) to match the corrected output. Ran the standard checks:

  • uv run ruff format --check — pass
  • uv run ruff check — pass
  • uv run mypy src/agents/extensions/visualization.py — pass
  • uv run pytest tests/test_visualization.py — 10 passed

Issue number

N/A

Checks

  • I've added new tests, if relevant (updated existing visualization assertions to cover the corrected output)
  • I've run .agents/skills/code-change-verification/scripts/run.sh (ran the equivalent stack manually: ruff format/check, mypy, pytest — see test plan)
  • I've confirmed all verification steps pass
  • If using Codex, I've run /review before submitting this PR — N/A

@seratch seratch added this to the 0.18.x milestone Jul 7, 2026

@seratch seratch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This is indeed a nice improvement 👍

@seratch seratch enabled auto-merge (squash) July 7, 2026 03:22
@seratch seratch merged commit b4606c8 into openai:main Jul 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants