Commit Graph

8 Commits

Author SHA1 Message Date
Steve Yegge
3d8cf15418 fix(graph): pass subgraph to renderGraph to fix nil pointer crash
The renderGraph function was being called with nil instead of the
loaded subgraph, causing a nil pointer dereference in
computeDependencyCounts when iterating over subgraph.Dependencies.

Changes:
- Pass subgraph variable to renderGraph instead of nil
- Add defensive nil check in computeDependencyCounts
- Add test case for nil subgraph handling

Fixes GH#657

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 01:59:31 -08:00
Steve Yegge
a539a5bbbb fix(graph,npm): fix nil pointer crash and Windows installer lock
- graph.go: Pass subgraph to renderGraph() instead of nil (fixes #657)
  The nil subgraph was dereferenced in computeDependencyCounts()
  causing a panic when running `bd graph` on epics.

- postinstall.js: Wait for file.close() callback before resolving (fixes #652)
  On Windows, the file was still locked when extraction started
  because resolve() was called immediately after file.close()
  without waiting for the close to complete.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 22:57:45 -08:00
Charles P. Cross
77d8a995e8 feat(graph): use subgraph to display dependency counts
Restore the subgraph parameter in renderGraph (previously marked as
unused with _) and use it to display meaningful dependency information:

- Add computeDependencyCounts() to calculate blocks/blocked-by counts
- Add renderNodeBoxWithDeps() to render nodes with dependency info
- Show "blocks:N" when an issue blocks N other issues
- Show "needs:N" when an issue depends on N other issues
- Add dependency summary showing total blocking relationships

This makes the graph visualization more informative by showing how
issues relate to each other in the dependency chain.

Tests added:
- TestComputeDependencyCounts: verifies dependency counting logic
- TestRenderNodeBoxWithDeps: verifies box rendering with dep info

Co-authored-by: Charles P. Cross <cpdata@users.noreply.github.com>
2025-12-18 20:35:00 -08:00
Steve Yegge
1f4b55dacb Merge main into fix/ci-errors, resolve graph.go conflict 2025-12-18 18:30:47 -08:00
matt wilkie
fb16e504e6 Fix tests (bd-6ss and sub-issues) (#626)
Test coverage improvements for bd-6ss. Fixing failing test assumption in follow-up commit.
2025-12-18 18:23:30 -08:00
Charles P. Cross
2b0a8cecdb fix(lint): mark unused subgraph parameter in renderGraph
The subgraph parameter was passed to renderGraph but not used in the
function body, causing an unparam lint error. Replace with _ to
indicate intentional non-use.
2025-12-18 17:47:03 -05:00
Steve Yegge
7f9ee3d1c4 fix(graph): traverse all dependency types, not just parent-child
The graph command now shows issues connected via any dependency type
(blocks, parent-child, etc.), not just parent-child relationships.

This makes bd graph useful for epics where children are connected via
blocks dependencies rather than hierarchical parent-child.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 13:51:26 -08:00
Steve Yegge
a89de1ac8b feat(graph): add bd graph command for ASCII DAG visualization
New command to visualize issue dependency graphs:
- Layered layout (Sugiyama-style) shows execution order
- Status coloring (open/in_progress/blocked/closed)
- Works with epics to show full subgraph
- Layer 0 = ready tasks (no blockers)

Usage: bd graph <issue-id>

Part of bd-r6a workflow system redesign.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 13:47:45 -08:00