Add interactive HTML viewer for overflow graphs#74
Merged
Conversation
Each call to Printer.display_geo now writes a sibling .html that embeds the dot-rendered SVG verbatim (so node positions and bezier-curved edges are preserved exactly) plus a small inline JS bundle for pan/zoom, hover tooltips, click-to-highlight neighbourhood, name search, and edge layer toggles derived from the existing color/style semantics. The PDF flow is untouched and HTML failures are non-fatal. https://claude.ai/code/session_01Naz2FDUJbv9LUdvQ2EB4qE
display_geo now also emits an .html alongside .pdf and .dot, so the Base graph folder contains 5 files instead of 4. https://claude.ai/code/session_01Naz2FDUJbv9LUdvQ2EB4qE
Raise the minimum rendered penwidth to max(1 MW × scaling_factor, 10 % × target max) instead of the flat 0.1. Reconnectable, non- reconnectable and null-flow edges were hair-thin and invisible without zoom. The floor applies at graph-build time so PDF and interactive HTML benefit equally. Existing penwidth assertions updated. https://claude.ai/code/session_01Naz2FDUJbv9LUdvQ2EB4qE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new interactive HTML viewer for visualizing overflow graphs. The viewer is self-contained (no external dependencies), embeds the Graphviz-rendered SVG directly, and provides client-side interactions including pan/zoom, node search, hover tooltips, click-to-highlight neighborhoods, and layer toggles by edge color/style.
Key Changes
New module
alphaDeesp/core/interactive_html.py: Implements the core functionality for building interactive HTML viewersdata-*attributes into SVG elements for JavaScript selectors and tooltipsNew test module
alphaDeesp/tests/test_interactive_html.py: Comprehensive unit tests coveringModified
alphaDeesp/core/printer.py: Integrates the interactive HTML viewer into the existing graph export workflow.htmlfile alongside the existing.pdfoutputdotorneato) for consistencyImplementation Details
https://claude.ai/code/session_01Naz2FDUJbv9LUdvQ2EB4qE