feat(tui): pick the commit's contents, then its place in the tree - #282
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe TUI now supports interactive commit placement. It validates working-tree selections, previews pending commits, supports integration or branch destinations, and confirms or cancels placement. Diff helpers and tests cover selected tracked and untracked changes. ChangesTUI commit placement
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant TUI
participant CommitTarget
participant DiffPreview
participant LoomCommit
TUI->>CommitTarget: validate selected working-tree files
CommitTarget->>DiffPreview: preview selected changes
TUI->>CommitTarget: choose integration or branch destination
TUI->>LoomCommit: confirm and pass -i or -b
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
`c` mixed two ways of saying what to commit: the selected rows, and whatever the index already held. Nothing in the TUI stages, so an index entry could only come from outside it, and the `[local changes]` header — which `d` and `f` read as `zz` — fell through to a bare `loom commit` that took the index alone. The rows are the only signal now. Working files and that header are always passed as file arguments, so a file staged elsewhere is committed whole or not at all, and every other row is a notice. Hunks picked with `git add -p` are overridden this way, which is the `-p` gap the TUI already has. The branch picker is gone too. The tree is rebuilt with the commit faked in at its destination — the integration line first, then every woven branch — and ↑/↓ move it there, the way `b` draws a branch before it exists. The preview goes through the same section builder, so a stack stays stacked and a branch that owns nothing forks from the base. Enter runs `loom commit -i` or `loom commit -b <branch>`, Esc puts the tree back. Creating a branch from the commit prompt is what this drops: press `b` first, then `c`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Change-Id: I05ebbfcde0cecb2417f3275783ac340f2465c0ac
cmixed two ways of saying what to commit: the selected rows, and whateverthe index already held. Nothing in the TUI stages, so an index entry could only
come from outside it, and the
[local changes]header — whichdandfreadas
zz— fell through to a bareloom committhat took the index alone.The rows are the only signal now. Working files and that header are always
passed as file arguments, so a file staged elsewhere is committed whole or not
at all, and every other row is a notice. Hunks picked with
git add -pareoverridden this way, which is the
-pgap the TUI already has.The branch picker is gone too. The tree is rebuilt with the commit faked in at
its destination — the integration line first, then every woven branch — and
↑/↓ move it there, the way
bdraws a branch before it exists. The previewgoes through the same section builder, so a stack stays stacked and a branch
that owns nothing forks from the base. Enter runs
loom commit -iorloom commit -b <branch>, Esc puts the tree back.Creating a branch from the commit prompt is what this drops: press
bfirst,then
c.Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Change-Id: I05ebbfcde0cecb2417f3275783ac340f2465c0ac
Summary by CodeRabbit
New Features
Bug Fixes