Show busy spinner during move/squash operations#13320
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
ExclusiveActionvariant (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; |
f1e4a22 to
3fea1d5
Compare
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.
No description provided.