Skip to content

Feat/squash rebase#278

Open
quakj wants to merge 29 commits into
devfrom
feat/squash-rebase
Open

Feat/squash rebase#278
quakj wants to merge 29 commits into
devfrom
feat/squash-rebase

Conversation

@quakj

@quakj quakj commented Jul 9, 2026

Copy link
Copy Markdown
Member

No description provided.

quakj and others added 29 commits June 30, 2026 16:33
# Conflicts:
#	crates/gitcomet-state/src/store/reducer/actions_emit_effects.rs
#	crates/gitcomet-ui-gpui/src/view/command_palette.rs
#	crates/gitcomet-ui-gpui/src/view/panels/popover.rs
#	crates/gitcomet-ui-gpui/src/view/panels/popover/context_menu.rs
#	crates/gitcomet-ui-gpui/src/view/panels/popover/fingerprint.rs
#	crates/gitcomet-ui-gpui/src/view/panes/main.rs
#	crates/gitcomet-ui-gpui/src/view/panes/main/core_impl.rs
# Conflicts:
#	crates/gitcomet-ui-gpui/src/view/panes/main/interactive_rebase.rs
First step of porting the interactive rebase list to a variable-height
virtualized gpui::list (needed for autosquash's multi-line rows).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replaces the ScrollHandle scroll-list (which rendered every row) with a
variable-height virtualized gpui::list, so the autosquash multi-line rows
render correctly while only visible rows are built per frame.

- IRebaseViewState.scroll -> Option<ListState> (lazy init) + list_sig; the
  ListState is remeasured on same-count content changes and reset on count
  changes, keyed on a content hash of entry actions/order + folded groups.
- Extract per-row builder into render_irebase_row (list render callback),
  keeping the squash header, is_dropped dim, autosquash-eligible highlight,
  action dropdown, and up/down.
- Drag: cursor-following IRebaseDragPreview (replaces the empty drag image);
  hit-testing via ListState::bounds_for_item (variable heights); auto-scroll
  via scroll_by; an absolute per-row insertion line as the drop indicator
  (no height change -> no remeasure churn); source-dim + reorder fades.
- Strip the old gap-ghost drag machinery and measured_drag_row_height.
- Add ScrollbarDriver for ListState (earlier commit) drives the scrollbar.

Autosquash unit tests pass; full workspace builds clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Squashing commits that don't include HEAD runs an automated todo-list
rebase with no editor window, but it reused RepoCommandKind::InteractiveRebase
and so reported as 'Interactive rebase onto X: Completed'. Thread an
`interactive` flag (true only for the user-opened editor) through the
effect + command kind so the automated case reports as a plain 'Rebase'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pressing Continue after resolving a rebase conflict left the UI stuck on a
spinner: git rebase --continue applies a few commits, stops at the *next*
conflict, and exits non-zero, which run_git_with_output treated as a hard
error. On that Err path the reducer never resets the diff/conflict state, so
the already-open conflict resolver kept showing stale content and never
reloaded.

A rebase step (rebase -i / --continue) that leaves the rebase still in
progress has merely paused at the next conflict. Add run_rebase_step_output,
which returns Ok (with captured output) when the command exits non-zero but
the rebase is still in progress, and only Err for a genuine failure (no
rebase in progress). The reducer's Ok path then clears the stale resolver,
reloads status, and surfaces the new conflict.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rget

Matches SmartGit/git's autosquash convention: a commit whose subject is
`fixup! foo` (or squash!/amend!) now groups with `foo` instead of requiring
an exact subject match. The group key strips those prefixes, and the surviving
commit prefers an unprefixed sibling so the fixup's message doesn't become the
kept message (e.g. under To Top, which would otherwise keep the newest).

Closes the gap vs SmartGit's Auto-Squash button, which already treats
`foo` and `fixup! foo` as equally named.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant