Skip to content

(feat-redraw)Group node handling and cleanup#658

Open
delthazor wants to merge 8 commits into
mainfrom
rework-dynamic-graph-drawing3
Open

(feat-redraw)Group node handling and cleanup#658
delthazor wants to merge 8 commits into
mainfrom
rework-dynamic-graph-drawing3

Conversation

@delthazor

@delthazor delthazor commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Description

Hides group nodes (like logistics group) from the dynamically rendered graph view, as they were not part of the original layout.
Group nodes are required for the topology structure, so correct parent and child ids and references can be used, and animations can identify the root node, but they do not need to be displayed. Therefore they are set to hidden, and corresponding utility and helper functions are cleaned up, so they do not try to format the hidden node unnecessarily.

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 correct group node display so it is in pair with the original static layout, but this heavily depends on dynamic graph rendering being already in-place.

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

The previous PR, this one immediately depends on:
#657

The follow-up PR is here:
#659

Other corresponding PRs:
#656
#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

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 quick glance, get @misi-bp 's approval.

misi-bp
misi-bp previously approved these changes Jun 29, 2026
Base automatically changed from rework-dynamic-graph-drawing2 to main July 1, 2026 10:06
@delthazor delthazor dismissed stale reviews from misi-bp and pregnor July 1, 2026 10:06

The base branch was changed.

delthazor and others added 7 commits July 2, 2026 11:39
The group container only ever served as a faint background box. Hide it
(hidden: true) so it is never rendered, while keeping it in the topology
so children still resolve parentId/extent. Dimensions move from style to
top-level width/height because extent clamping reads node.width when a
node is hidden (never measured), otherwise children collapse to origin.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: pdobrei <pdobrei@cisco.com>
Since the logistics group became a hidden layout anchor, the code that
only existed to draw/size a visible group box is now dead:

- delete the unused topologyGroupLayout.ts module (stale duplicate of
  layoutCompactGroup)
- write the fitted group size to the node's top-level width/height (what
  extent clamping reads) instead of the moot style write
- drop the dead "logistics-group" branch in nodeSlugKey (the group has no
  edges and is never an author alias)
- shrink the group node data to {} in both renderers (never displayed)

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: pdobrei <pdobrei@cisco.com>
…pology

recruit_agents emits a STATE_PROGRESS_UPDATE that creates one node per
discovered agent (carrying the OASF record and CID inline) plus an anchor
node sharing the seeded "Agentic Recruiter" label, so the frontend collapses
it onto the real node and re-points the discovered-agent edges there.

The recruiter-service A2A hop drops the topology middleware so only the
seeded recruiter and the discovered agents appear; the delegation middleware
moves to dynamic_workflow_agent (its only remaining user).

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: pdobrei <pdobrei@cisco.com>
… renderer

Discovered agents now arrive through the normal workflow-instance topology
channel instead of a frontend overlay, so they anchor to the seeded
"Agentic Recruiter" node, render with full OASF/directory parity, and are
disposed of when the instance is torn down.

The recruiter stream sends workflow_instance_id; the dynamic renderer maps
inline oasf_record/agent_cid onto node data (OASF modal, directory link,
target handle). Removes the discovery overlay (useMainAreaDiscoveryGraph,
mergeDiscovery*, discoveryResponseEvent wiring), which mispositioned nodes,
used a fragile recruiter-label match, and prevented disposal.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: pdobrei <pdobrei@cisco.com>
…ance-id validator

- extract _forward_status_update so recruit_agents and evaluate_agent share one
  intermediate A2A status-forwarding path instead of duplicating it
- validate workflow instance ids via the public InstanceId schema model instead
  of importing the private _INSTANCE_ID_REGEX (recruiter_client + middleware)
- add merge round-trip tests locking the inline oasf_record/agent_cid extras
  through create and partial-update so discovered-agent data is never dropped

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: pdobrei <pdobrei@cisco.com>
Resolve discovered-agent anchoring authoritatively in the store's serial
merge worker instead of relying on frontend dedup. A new
reconcile_event_node_identities transform collapses an incoming create-node
whose stable_agent_id matches an existing node, drops the duplicate, and
repoints edge endpoints to the existing runtime id. The recruiter anchor now
carries the seeded recruiter's stable_agent_id so the graph stays a single
continuous entity, and the normalized event is what gets dispatched over SSE.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: pdobrei <pdobrei@cisco.com>
Readd accidentally dropped parts, and fix corresponding semantics, and properly integrate changes form main.

Signed-off-by: pdobrei <pdobrei@cisco.com>
@delthazor delthazor force-pushed the rework-dynamic-graph-drawing3 branch from bb87f3d to 26a831f Compare July 2, 2026 09:46
label1: "Brazil",
label2: "",
handles: "all",
} as unknown as CustomNodeData

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.

Suggested change
} as unknown as CustomNodeData
const baseData: CustomNodeData = {
icon: null,
label1: "Brazil",
label2: "",
handles: "all",
}

Much simpler, it's no point to make it unknown first here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Godd point, corrected

misi-bp
misi-bp previously approved these changes Jul 2, 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.

left a suggestion, otherwise lgtm

Custom node data can be defined much simpler, as it was commented.

Signed-off-by: pdobrei <pdobrei@cisco.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants