components.interactive_graph: clicking an edge crashes for activity names containing -> #25

Open
opened 2026-10-06 13:48:41 +00:00 by ffrauenberger · 1 comment
Owner

Severity: low (only names containing -> are affected)

Where

  • app/components/interactiveGraph/frontend/src/InteractiveGraph.tsx:51-60
  • app/components/interactiveGraph/__init__.py:48-52

Problem

The frontend takes source and target from the SVG <title> text and does titleText.split("->"). For an activity named e.g. Step 1 -> 2 this produces more than two parts and the wrong source/target. On the Python side, graph.edge_to_string then raises EdgeDoesNotExistException, which is not caught in interactiveGraph.

Steps to reproduce

  1. Import a log with an activity named Step 1 -> 2
  2. Mine a model
  3. Click an edge connected to that activity

Expected behavior

The edge details are shown.

Actual behavior

A Streamlit exception page (EdgeDoesNotExistException).

Related: #51.

Fix

Give each edge an explicit id attribute in DOT (e.g. an index), send that ID back and look the edge up by ID. Catch lookup errors in interactiveGraph.


from issues/BUG-025-edge-click-parsing-breaks-on-arrow-in-names.md (code analysis of commit 6bcc646, 2026-10-03)

**Severity:** low (only names containing `->` are affected) ## Where - `app/components/interactiveGraph/frontend/src/InteractiveGraph.tsx:51-60` - `app/components/interactiveGraph/__init__.py:48-52` ## Problem The frontend takes source and target from the SVG `<title>` text and does `titleText.split("->")`. For an activity named e.g. `Step 1 -> 2` this produces more than two parts and the wrong source/target. On the Python side, `graph.edge_to_string` then raises `EdgeDoesNotExistException`, which is not caught in `interactiveGraph`. ### Steps to reproduce 1. Import a log with an activity named `Step 1 -> 2` 2. Mine a model 3. Click an edge connected to that activity ### Expected behavior The edge details are shown. ### Actual behavior A Streamlit exception page (`EdgeDoesNotExistException`). Related: #51. ## Fix Give each edge an explicit `id` attribute in DOT (e.g. an index), send that ID back and look the edge up by ID. Catch lookup errors in `interactiveGraph`. --- from `issues/BUG-025-edge-click-parsing-breaks-on-arrow-in-names.md` (code analysis of commit 6bcc646, 2026-10-03)
Author
Owner

Reviewed by Codex (GPT-6) against origin/main 6bcc646eb464.

Review: partially correct.

The frontend split('->') ambiguity and missing Python lookup-error handling are real. The written end-to-end reproduction is currently blocked by #2: an activity named Step 1 -> 2 places an unescaped > in its HTML-like label. Directly rendering that node with the reviewed dot raises CalledProcessError, before a clickable graph appears. State the prerequisite that labels are escaped first, or test the click parser with a valid DOT graph using an escaped/custom label and the raw activity ID. Then the ambiguous SVG title demonstrates this separate bug.

Code references: app/components/interactiveGraph/frontend/src/InteractiveGraph.tsx:53, app/graphs/visualization/directly_follows_graph.py:36.

Reviewed by **Codex (GPT-6)** against origin/main [`6bcc646eb464`](https://code.swisdata.eu/ffrauenberger/ProcessIntel/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4). **Review: partially correct.** The frontend `split('->')` ambiguity and missing Python lookup-error handling are real. The written end-to-end reproduction is currently blocked by #2: an activity named `Step 1 -> 2` places an unescaped `>` in its HTML-like label. Directly rendering that node with the reviewed `dot` raises `CalledProcessError`, before a clickable graph appears. State the prerequisite that labels are escaped first, or test the click parser with a valid DOT graph using an escaped/custom label and the raw activity ID. Then the ambiguous SVG title demonstrates this separate bug. Code references: [app/components/interactiveGraph/frontend/src/InteractiveGraph.tsx:53](https://code.swisdata.eu/ffrauenberger/ProcessIntel/src/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4/app/components/interactiveGraph/frontend/src/InteractiveGraph.tsx#L53), [app/graphs/visualization/directly_follows_graph.py:36](https://code.swisdata.eu/ffrauenberger/ProcessIntel/src/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4/app/graphs/visualization/directly_follows_graph.py#L36).
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ffrauenberger/ProcessIntel#25
No description provided.