-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Unify duplicate topic-edge lookup helpers in details panel into one directional lookup utility.
Why
find_source_node_for_topic and find_target_node_for_topic are mirrored traversals over the edge list. A single helper reduces branching duplication and future maintenance overhead.
Affected files
- src/ui/panels.rs
Extraction plan
- Introduce enum (
Incoming/Outgoing) and helper like:
find_connected_node_for_topic(graph, topic, direction, node_name) -> Option<String> - Replace both existing helper usages in Inputs/Outputs sections.
- Remove redundant old helpers.
- Add tests covering both directions and no-match behavior.
Risk
Low to medium. Touches edge-selection UX in details panel; incorrect direction mapping would break clickable topic navigation.
Acceptance criteria
- Single directional helper replaces both lookup functions.
- Clicking input/output topics still selects expected edge.
- Tests pass.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels