Commit graph

4 commits

Author SHA1 Message Date
kev
dccfa20829 fix(graph): emit [] not null for empty links in HTML output (GH#3592)
Go nil slices marshal to JSON `null`, which breaks d3.forceLink() for
single-node components. Use make() to ensure empty arrays serialize as
`[]`.
2026-05-03 01:46:01 -04:00
David Ahmann
42a26b13a7 ci: fix baseline fmt/lint/windows+nix regressions
Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-12 09:17:14 -08:00
beads/crew/emma
8d38b8864a fix: address XSS vulnerabilities and code smells in graph export
- Escape HTML title with html.EscapeString() to prevent XSS via
  malicious issue titles in <title> tag
- Replace tooltip innerHTML concatenation with safe D3 .text() DOM
  construction to prevent XSS via issue titles/assignees
- Implement dotEscapeID to actually escape backslash and double-quote
  characters instead of being a no-op
- Handle json.Marshal errors instead of silently discarding them

Co-authored-by: paf0186 <paf0186@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-11 17:25:26 -08:00
Patrick Farrell
07eb8d1bbd feat: add DOT and interactive HTML export to bd graph (bd-9de)
Add two new output formats to the bd graph command:

--dot: Graphviz DOT format output. Enables SVG/PNG generation via
  graphviz pipeline (bd graph --dot <id> | dot -Tsvg > graph.svg).
  Nodes are color-coded by status, edges distinguish blocks (solid)
  from parent-child (dashed), and layers use subgraph clusters for
  proper rank alignment.

--html: Self-contained interactive HTML with D3.js force-directed
  graph. Drag nodes to rearrange, scroll to zoom, hover for details.
  Dark theme, status-colored nodes, legend, and tooltip with full
  issue metadata. Output to stdout for redirection to file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-11 17:23:56 -08:00