Repository navigation
Improve visualization UX: focus mode, zoom controls, and bug fixes - #3
Conversation
Bug fixes (both apps): - Fix double DPR scaling that rendered graphs 2x too large on retina displays (resize() left a persistent canvas scale that render() re-applied); empty-state text now draws in the correct position too - Fix click-after-drag clearing the selection (click fires after mouseup, so the old isDragging/isPanning guard never worked) - Fix reduced-motion media query listener leaking on destroy - Escape user-provided names/values before injecting into the details panel UX enhancements (both apps): - Preserve node positions and selection across re-parse so live edits no longer scatter the whole layout on every keystroke - Focus mode: selecting or hovering a node dims unrelated nodes/links - Minimap is now interactive: click or drag to navigate; viewport rectangle is clipped to the minimap frame - Tooltips clamp to canvas bounds and flip below the node near the top - Pinch zoom now zooms toward the pinch midpoint - Zoom label click and '0' key reset zoom to 100%; Escape deselects; 'f' no longer fires while typing in any input IaC Visualizer: - Fix hover tooltip showing Deployment docs for unknown resources - Add docs entries (NAT gateway, route table, Lambda, DynamoDB, RDS, StatefulSet, DaemonSet) and map aws_db_instance to storage Network Topology: - LLDP: capture full local device name from header comments, dedupe bidirectional neighbor entries, and infer link type (routed/access/ trunk) from capability codes; sample data now forms a coherent map - Hide port labels when zoomed out below 60% - Wireless detection no longer matches any name containing 'ap' Tests: - Add parser unit tests for both apps (26 tests) covering format detection, Terraform/K8s parsing, and LLDP/CDP/routing parsing Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PhTWYnY47DgEN3TtYgw93w
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 767a7ae4cf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const headerMatch = line.match(/^#\s*(?:.*?\s[-:]\s+)?(\S.*)$/); | ||
| if (headerMatch) { | ||
| currentLocalDevice = headerMatch[1].trim().replace(/\s+/g, '-').toUpperCase(); |
There was a problem hiding this comment.
Preserve colon-separated LLDP headers
For LLDP dumps grouped with the previously supported comment form # LLDP Neighbors: CORE-SW-01 or # Device: CORE-SW-01, this regex no longer strips the label because it only recognizes separators that have whitespace before :/-. In that case currentLocalDevice becomes a bogus ID like LLDP-NEIGHBORS:-CORE-SW-01, so the topology gets extra local devices and reverse-link deduplication no longer matches the real neighbor IDs; please keep accepting :/- immediately after the header label.
Useful? React with 👍 / 👎.
Summary
This PR enhances the network topology and IaC visualizers with improved interaction patterns, better zoom handling, and several bug fixes. The changes focus on making the visualizations more intuitive and responsive to user input.
Key Changes
Focus Mode & Visual Hierarchy
Zoom & Pan Improvements
0or click zoom display)ctx.scale(dpr, dpr)that was causing coordinate mismatches; now applied only in render() where neededKeyboard & Input Handling
Escapekey to deselect current selectionNetwork Topology Parsing
/(^|-)ap(\d|-|$)/to avoid false positives (e.g., "api-server" no longer classified as wireless)# LLDP Neighbors - CORE-SW-01IaC Visualizer Enhancements
Layout Persistence
HTML Escaping
escapeHtml()utility function to both visualizers to prevent XSS vulnerabilitiesMinimap Improvements
Bug Fixes
Testing
Notable Implementation Details
Set<string>to track which nodes should be highlighted, computed once per framehttps://claude.ai/code/session_01PhTWYnY47DgEN3TtYgw93w