Skip to content

Add magit-style two-step rebase across all clients #73

Description

@jennings

Goal

Replace the current single-step badjuju.rebase (cursor picks source,
typed prompt picks destination) with a magit-style two-step chord flow:
the first chord picks a source revision and its scope flag (-s /
-r / -b); the second chord picks a destination and its insert
position (-d / --insert-after / --insert-before).

The rebase runs immediately. There is no interactive sequence buffer
(unlike git's interactive rebase) — jj makes mid-sequence conflicts and
undo trivial, so the magit "open a buffer, edit, commit" step is
unnecessary.

Hotkey table

Chord (magit) Chord (vim) Action
r s rr s Select source — jj rebase --source <cursor>
r r rr r Select source — jj rebase --revisions <cursor>
r b rr b Select source — jj rebase --branch <cursor>
r o rr o Apply — --destination <cursor>
r A rr A Apply — --insert-after <cursor>
r B rr B Apply — --insert-before <cursor>
x x Universal cancel — clears any pending operation

Helix (and other code-action-only clients) get the same six rebase
actions plus cancel via textDocument/codeAction.

While we're here, the squash S / SS cancel-branch goes away —
x becomes the universal cancel for any pending op. S / SS
reverts to unconditional "squash file at cursor".

Sub-tasks

  • Server: replace badjuju.rebase with badjuju.rebase.source / .commit + badjuju.cancel
  • Neovim: two-step rebase chord flow with universal cancel
  • VS Code: two-step rebase chord keybindings with universal cancel
  • Emacs: two-step rebase chord flow with universal cancel
  • Helix: expose rebase code actions for the pending-state cycle

The four client tickets depend on the server ticket landing first.

Out of scope (follow-ups)

  • Multi-revision source selection (visual range across log lines)
  • Conflict-resolution UX after a rebase produces conflicts
  • Showing a dry-run preview before the rebase runs

Plan: https://github.com/jennings/badjuju (local file
/Users/stephen/.claude/plans/let-s-plan-for-implementing-smooth-hedgehog.md).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2High priority

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions