Skip to content

(feat-redraw)Prepare Icon and other node data resolver for dynamic graphs#656

Merged
delthazor merged 4 commits into
mainfrom
rework-dynamic-graph-drawing
Jul 1, 2026
Merged

(feat-redraw)Prepare Icon and other node data resolver for dynamic graphs#656
delthazor merged 4 commits into
mainfrom
rework-dynamic-graph-drawing

Conversation

@delthazor

@delthazor delthazor commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a dynamic node icon, grouping, and label resolver that prepares for the dynamic drawing of graphs.

Topology graphs should be rendered dynamically based on backend provided data. This was partially done before, but was mostly reverted, due to stylistic and structural reasons, e.g.: specific icons were not rendered correctly, nodes not appearing as they should, etc.

This change aims to prepare necessary node data resolvers, so a future dynamic graph rendering can draw the proper node-specific graphical elements (like icons, labels, etc.) correctly.

This PR is not a standalone change, it is a part of a chain of smaller changes reviewed independently.

The follow-up PR is here:
#657

Other corresponding PRs:
#658
#659
#661
#663

Issue Link

No specific issue was opened for the change.

Type of Change

  • Bugfix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

delthazor and others added 3 commits June 23, 2026 09:47
Add a presentation-only icon resolver that derives a branded node icon from
a node's directory slug (preferred) or split label, mirroring the label rules
in getOasfSlugFromNodeData. Wire it into topologyWireToReactFlow in place of
the generic SmartToy/LocalShipping fallback so the dynamic renderer can match
the hand-authored graph icons. Inert until the dynamic path goes live.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: pdobrei <pdobrei@cisco.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Bring the topology renderer up to visual parity with the hand-authored graph:

- Render a single group node as a real container (type group + style) and
  parent its members (parentId/extent), marking the in-group transport compact
  so the existing compact-group layout applies.
- Label edges into MCP servers as "MCP:" (detected by target label) while
  keeping them branching.
- Attach the A2A directory/recruiter left/right extra handles and the
  "stdio -> grpc" edge label for the recruiter pattern.

Inert until the dynamic path goes live.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: pdobrei <pdobrei@cisco.com>
Extract isMcpServerLabel/isRecruiterLabel/isDirectoryLabel into
agenticTopologyIdentityUiMap and reuse them from the dynamic renderer and
icon resolver, removing the duplicated label heuristics. (The chat-stream
highlight adoption lands later, alongside the live-topology switch.)

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: pdobrei <pdobrei@cisco.com>
@delthazor delthazor self-assigned this Jun 23, 2026
@delthazor delthazor added the enhancement New feature or request label Jun 23, 2026
@delthazor delthazor changed the title Prepare Icon and other node data resolver for dynamic graphs (feat-redraw)Prepare Icon and other node data resolver for dynamic graphs Jun 23, 2026
@delthazor delthazor marked this pull request as ready for review June 23, 2026 12:16
@delthazor delthazor requested a review from a team as a code owner June 23, 2026 12:16
pregnor
pregnor previously approved these changes Jun 24, 2026

@pregnor pregnor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM at a very quick glance, but also get an approval from @misi-bp as it is frontend.

Comment thread coffeeAGNTCY/coffee_agents/lungo/frontend/src/utils/topologyNodeIcons.tsx Outdated
Comment thread coffeeAGNTCY/coffee_agents/lungo/frontend/src/utils/topologyNodeIcons.tsx Outdated
misi-bp
misi-bp previously approved these changes Jun 26, 2026

@misi-bp misi-bp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I requested a small nice-to-have change, I think using the same enum for type definition and value check at the same time is the safest solution.
Otherwise lgtm, nice work

Use enums instead of string literals for ikon kind

Signed-off-by: pdobrei <pdobrei@cisco.com>
@delthazor delthazor dismissed stale reviews from misi-bp and pregnor via 47fbfe6 June 26, 2026 11:50

@misi-bp misi-bp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, thank you for the changes :)

@delthazor delthazor merged commit 9ac9be7 into main Jul 1, 2026
20 checks passed
@delthazor delthazor deleted the rework-dynamic-graph-drawing branch July 1, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants