Skip to content

feat(#375): add hover tooltip to connections - #376

Merged
MindFreeze merged 2 commits into
masterfrom
claude/nifty-euler-JFPI2
Jun 1, 2026
Merged

feat(#375): add hover tooltip to connections#376
MindFreeze merged 2 commits into
masterfrom
claude/nifty-euler-JFPI2

Conversation

@MindFreeze

@MindFreeze MindFreeze commented May 29, 2026

Copy link
Copy Markdown
Owner

Connection paths now render an SVG <title>, mirroring the box titles, so
hovering a flow shows " → : ". This lets you
read individual flows into/out of nodes that have multiple connections
without manually subtracting the other flows.

  • Connection now carries startName/endName, populated in getChildConnections
    (survives the state>0 filter, preserving the target association)
  • renderBranchConnectors renders the title as a single concatenated string
  • Add a DOM-level test asserting the tooltip text

Fixes #375

claude added 2 commits May 29, 2026 06:10
Connection paths now render an SVG <title>, mirroring the box titles, so
hovering a flow shows "<source> → <target>: <value><unit>". This lets you
read individual flows into/out of nodes that have multiple connections
without manually subtracting the other flows.

- Connection now carries startName/endName, populated in getChildConnections
  (survives the state>0 filter, preserving the target association)
- renderBranchConnectors renders the title as a single concatenated string
- Add a DOM-level test asserting the tooltip text

https://claude.ai/code/session_01VwVhfSVfk12Aj11HLKEW75
Address review findings on the connection tooltip:

- Under unit_prefix: 'auto', boxes are rescaled per-box at render while the
  connection state stays in base units, so the tooltip showed e.g. "1800W"
  while the box label showed "1.8kW". Re-apply normalizeStateValue to the
  flow value so it matches the box (no-op for explicit prefixes).
- Node names may contain intentional newlines for box labels; concatenating
  two of them produced an unreadable multi-line tooltip. Collapse whitespace
  so the flow reads on one line.

Add DOM-level tests for both cases (auto-prefix value matches the box label;
multi-line names collapse to a single line).

https://claude.ai/code/session_01VwVhfSVfk12Aj11HLKEW75
@MindFreeze
MindFreeze merged commit 9473af6 into master Jun 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Showing flow when there are multiple flows into/out of a node

2 participants