Skip to content

Show busy spinner during move/squash operations#13320

Merged
mtsgrd merged 1 commit intomasterfrom
move-squash-spinners
Apr 15, 2026
Merged

Show busy spinner during move/squash operations#13320
mtsgrd merged 1 commit intomasterfrom
move-squash-spinners

Conversation

@mtsgrd
Copy link
Copy Markdown
Contributor

@mtsgrd mtsgrd commented Apr 15, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 15, 2026 11:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a project-level “busy” UI state for stack operations so the UI can block interactions and show a spinner while move/squash/reorder operations run.

Changes:

  • Introduces a new ExclusiveAction variant (stack-busy) to represent in-progress stack operations.
  • Wraps move/squash/reorder operations with a helper that sets/clears the new busy state.
  • Updates stack/commit UI to disable pointer interaction for involved stacks and show a spinner on the affected commit.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
apps/desktop/src/lib/state/uiState.svelte.ts Adds ExclusiveAction variant stack-busy for representing busy stack operations.
apps/desktop/src/lib/stacks/stackController.svelte.ts Exposes stackBusy and busyCommitId derived from ExclusiveAction for UI consumption.
apps/desktop/src/lib/dragging/stackingReorderDropzoneManager.ts Wraps reorder operation with busy-state helper and passes UiState into handlers/factory.
apps/desktop/src/lib/dragging/dropHandlers/commitDropHandler.ts Wraps move/squash/amend operations with busy-state helper and adds withStackBusy() helper.
apps/desktop/src/lib/bootstrap/deps.ts Wires uiState into ReorderDropzoneFactory construction.
apps/desktop/src/components/views/StackView.svelte Adds stack-busy class to block pointer events on the stack view while busy.
apps/desktop/src/components/views/BranchCommitList.svelte Passes busy flag down to commit list items based on controller state.
apps/desktop/src/components/commit/CommitListItem.svelte Adds busy prop and renders a spinner when busy instead of the actions menu.

Comment on lines +445 to +451
uiState
.project(projectId)
.exclusiveAction.set({ type: "stack-busy", commitId: opts.commitId, stackIds: opts.stackIds });
try {
await fn();
} finally {
uiState.project(projectId).exclusiveAction.set(undefined);
Comment on lines 64 to 89
export type ExclusiveAction =
| {
type: "commit";
stackId: string | undefined;
branchName: string | undefined;
parentCommitId?: string;
}
| {
type: "edit-commit-message";
stackId: string | undefined;
branchName: string;
commitId: string;
}
| {
type: "codegen";
}
| {
type: "create-pr";
stackId: string | undefined;
branchName: string;
}
| {
type: "stack-busy";
commitId?: string;
stackIds?: string[];
};
Comment on lines +161 to +162
if (this.exclusiveAction?.type === "stack-busy") {
return this.exclusiveAction.commitId;
@mtsgrd mtsgrd force-pushed the move-squash-spinners branch from f1e4a22 to 3fea1d5 Compare April 15, 2026 11:34
@mtsgrd mtsgrd merged commit 87348c4 into master Apr 15, 2026
35 checks passed
@mtsgrd mtsgrd deleted the move-squash-spinners branch April 15, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants