Skip to content

ui: port graph panel to new design#7

Open
Moriz82 wants to merge 1 commit into
mainfrom
worktree-agent-a4258d19
Open

ui: port graph panel to new design#7
Moriz82 wants to merge 1 commit into
mainfrom
worktree-agent-a4258d19

Conversation

@Moriz82

@Moriz82 Moriz82 commented Apr 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Port the BloodHound-inspired graph screen from /tmp/new_ui into the real TS panel, wrapping the existing cytoscape canvas in the new left sidebar + floating toolbar + right inspector chrome.
  • Pulls tokens.css + base.css + graph.css into frontend/src/styles/ so the branch builds standalone; imports them from main.tsx.
  • All data stays wired to the real backend: /api/graph for the viewport + kind counts + source chips, /api/findings filtered client-side for the inspector findings tab, in-memory cytoscape edges for the neighbors tab.

Test plan

  • cd frontend && npx tsc --noEmit (only pre-existing FindingsPanel / PresetInfo unused warnings in unrelated files)
  • cd frontend && npm run build
  • Claude Preview E2E: login -> Graph tab renders 146 nodes / 909 edges, cytoscape canvas visible
  • Click a node -> inspector opens with header, 4 tabs, prop rows, action buttons
  • Toggle Endpoint kind filter -> visible node count drops 146 -> 16 and kind row gets the .off style; re-toggle restores
  • Browser console: no errors
  • Full app review once other unit branches land (Unit 1 primitives can replace the inline icons)

Screenshot: verified interactively via Claude Preview; cannot attach binary here.

🤖 Generated with Claude Code

Port the BloodHound-inspired graph screen from the new_ui mockup into the
real TS panel while preserving the cytoscape canvas and all data wiring.

- Left collapsible sidebar: search, node-kind filters (with real /api/graph
  counts), discovered-by source chips, saved views, layout picker.
- Floating toolbar, zoom controls, edge legend, and nodes/edges/zoom badges.
- Right collapsible inspector with glyph/kind/severity header, four tabs
  (overview/properties/neighbors/findings), prop rows, and actions.
- Foundation tokens.css + base.css + graph.css copied in from new_ui so the
  branch builds standalone, imported once from main.tsx.
- Inspector "findings" tab filters the real /api/findings payload by
  endpoint/host id client-side; "neighbors" derives from the in-memory
  cytoscape graph.
- ResizeObserver on the canvas container keeps cytoscape sized correctly
  when the sidebars collapse or the grid column settles post-mount.
- UIPrefs contract preserved (graph_layout etc.) so App.tsx still compiles;
  onPersistUi fires on layout chip changes and the "Save view" button.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant