feat: add parsec stack for stacked PR dependency tracking#45
Merged
feat: add parsec stack for stacked PR dependency tracking#45
Conversation
Add support for stacked/dependent PRs via `--on` flag and `parsec stack` command: - `parsec start <ticket> --on <parent>` creates a worktree branched from the parent ticket's branch instead of main/master - `parsec stack` displays the dependency graph as a tree - `parsec stack --sync` rebases the entire chain in topological order - `parsec ship` automatically uses the correct base branch for stacked PRs - Added `parent_ticket` field to Workspace struct (backward-compatible via serde default) Closes #29 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--on <parent-ticket>flag toparsec startfor creating dependent worktree chainsparsec stackcommand to display the dependency graph as a treeparsec stack --syncto rebase the entire stack in topological orderChanges
src/worktree/lifecycle.rs: Addedparent_ticket: Option<String>field toWorkspacestruct (backward-compatible via#[serde(default)])src/worktree/manager.rs: Modifiedcreate()to acceptparent_ticketparam; when--onis used, the parent's branch becomes the basesrc/cli/mod.rs: Added--onflag toStartvariant, addedStackcommand variant with--syncflag, updated routingsrc/cli/commands.rs: Modifiedstart()to passonparam, addedstack()andstack_sync()command handlerssrc/output/mod.rs: Addedprint_stack()dispatchersrc/output/human.rs: Addedprint_stack()with tree visualization (connectors, colors)src/output/json.rs: Addedprint_stack()JSON outputREADME.md: Addedparsec stackdocumentation section, updatedparsec startwith--onoption, added stacked PRs to features listdocs/index.html: Added Stacked PRs feature cardTest plan
cargo buildpasses with no errorscargo clippypasses with no warningscargo fmt --checkpassesparsec start T1,parsec start T2 --on T1,parsec start T3 --on T2parsec stackshows correct tree graphparsec stack --jsonoutputs structured JSONparsec stack --syncrebases children onto parents in orderparsec ship T2creates PR withfeature/T1as base branch (not main)parent_ticketdeserialize correctly (serde default)Closes #29
🤖 Generated with Claude Code