You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.9 KiB
1.9 KiB
| title | status | type | priority | created_at | updated_at |
|---|---|---|---|---|---|
| Fix graph orientation: show goals at root, prerequisites as leaves | completed | bug | high | 2026-03-10T23:30:30Z | 2026-03-10T23:30:30Z |
Problem
The dependency graph is inverted. Currently:
- Roots = tickets with no dependencies (foundation/leaf-level work)
- Children = dependents of the root (tickets blocked by it)
This means the graph reads bottom-up: you see "what blocks what" rather than "what needs what".
Desired behavior
If ticket A depends on B, C, and D:
nbd graphshould show A at the top with B, C, D indented as children (leaves)- Roots = tickets with no dependents (nobody depends on them — these are the top-level goals)
- Children = the dependencies of the current node (prerequisites)
This makes the graph read naturally: goals at the top, work to be done first at the bottom.
Files to change
src/graph.rs
roots(): change predicate fromnode.dependencies.is_empty()tonode.dependents.is_empty()subtree()+dfs_subtree(): currently traversesdependentsedges; should traversedependenciesedges so subtree(A) returns A + what A depends on (recursively)to_json_value()andto_subtree_json_value(): edge direction in JSON output should be{"from": dependent_id, "to": dependency_id}(A→B means A depends on B), or reconsider thefrom/tolabels in light of the new orientation- Update all doc comments to reflect the new semantics
src/display.rs
render_node(): iteratenode.dependenciesas children (notnode.dependents)- Update doc comments for
format_graph()andformat_subtree()
src/graph.rs module-level doc comment
The edge semantics paragraph should be updated: "A is a dependency of B" means A appears as a child in the tree of B.
Tests
Update any graph-related tests in src/tests.rs and tests/integration.rs that assert the current (inverted) traversal order.