-
Notifications
You must be signed in to change notification settings - Fork 1
Future enhancements: lower-priority improvements #15
Description
Summary
Nice-to-have improvements that are lower priority but would round out the tool as it matures.
Items
1. Auto-stash during sync
If the worktree is dirty, dgr sync requires a clean state. Auto-stashing before sync and restoring after (like git pull --autostash) would reduce friction.
2. Git worktree awareness
State lives in .git/.dagger/ which is shared across linked worktrees. Multiple worktrees operating on the same dagger state can conflict. Consider per-worktree state or worktree-aware locking.
3. Multi-trunk support
Config stores a single trunk_branch. Repos with multiple long-lived branches (e.g., main + develop, or release branches) cannot model stacks rooted on different trunks.
4. Cache PR metadata in state
TrackedPullRequest only stores { number }. Caching title, status, and check results would enable richer dgr tree and dgr status output without requiring network calls.
5. dgr log — event log viewer
events.ndjson is written but never read. Surfacing it via a CLI command would provide an audit trail and aid debugging.
6. Missing event types
Several state changes are not logged: BranchRestacked, BranchPushed, BranchMerged, PullRequestRetargeted, SyncCompleted. More complete event coverage would make the log useful for replay or reconstruction.
7. Property-based and fuzz testing
No proptest/quickcheck for data model invariants, no cargo fuzz targets for JSON parsing or git output parsing. Would improve confidence in edge case handling.
8. Benchmarks for large stacks
No cargo bench or criterion suite. As users build deeper stacks, understanding performance characteristics of graph traversal, restack planning, and sync would be valuable.
9. dgr repair command
No way to rebuild dagger state from the actual git branch topology. If state.json is corrupted or deleted, all tracking is lost. A repair command that infers relationships from branch structure and open PRs would be a powerful recovery tool.
10. Fork-based workflow support
No handling for fork-based workflows where head and base repos differ. dgr pr assumes same-repo branches.
11. dgr switch with dagger awareness
A dgr switch <branch> that validates the branch is tracked and shows its stack context would be more ergonomic than raw git switch.