Commit 0915fca
committed
Adopt
**`IntegrateUpstreamModal` refactor:**
- Migrated from old Resolution API to `BottomUpdate[]` API
- Imperative status fetch → reactive `useQuery` subscription
(auto-invalidates on background fetch)
- Wrapped statuses section in `<ReduxResult>` for loading/error handling
**Backend (`upstream_integration.rs`):**
- Exposed `bottom_selector` on `StackStatus` for building
`BottomUpdate`s
**E2E tests:**
- "Leave as is" preserves branch base while other branches advance
- Helpers: `openIntegrateModal()`, `integrationRow()`, `getBranchBase()`
**Cleanup:**
- Merged `UpstreamIntegrationService` into `stackService` — upstream
status queries and mutations now live alongside other stack operations
- Removed `StackStatusesWithBranchesV3` type and
`getBaseBranchResolution` (joining now happens in the modal)
- Deleted old `integrate_upstream` endpoint and dead code in
`branchEndpoints.ts`
Return stack status entries instead of full stack objects
The API already returns status entries keyed by stack ID, so adjust the
component to use those entries directly instead of trying to join with a
separate stacks list. This simplifies logic, avoids relying on
getStackName/getStack lookup, and fixes incorrect data assumptions
implied by combineWithStacks. Changes: parse status entries from the
API, sort by integration state and branch name, update resolution kind
handling, build BottomUpdate payloads from stack IDs, and update the
template to iterate over status entries.
Accept Option<StackId> throughout upstream status handling
Revert earlier change that propagated StackId instead of Option<StackId>
and instead update codepaths to continue accepting Optional stack IDs
while preserving the optimizations made. Many functions, data
structures, iterations and tests were adjusted to use StackStatus with
an optional stack_id field (or to pattern-match the existing Option
inside loops) so we can keep nullable stack identifiers at the
API/schema boundary while simplifying internal handling and avoiding
unwraps. Changes include: UI Svelte component iteration and resolution
handling, Rust CLI/status/pull modules iteration and lookups, the
StackStatus struct and serialization/schema updates, callers of
get_stack_status to pass stack_id through, and numerous tests updated to
reference status.stack_id instead of tuple-based (Option, Status)
indexing.
Use but-graph for workspace upstream statuses
Replace legacy upstream integration path with a new implementation that
uses the but-graph workspace projection to compute per-stack upstream
integration statuses and worktree conflicts. This moves logic out of
gitbutler-branch-actions into a new workspace/upstream_statuses module,
updates callers to invoke the new function, and makes
StackStatus::create public to support the new flow. The change avoids
the old stack_details_v3 path and performs trial rebases and three-way
merges against the graph-derived workspace to determine conflicts and
integration state.
Remove legacy upstream integration APIs and code
Remove all callers and implementations of the legacy integrate_upstream
and upstream statuses APIs. These endpoints and helper functions have
been deleted from the server, tauri bindings, tests, and the
gitbutler-branch-actions crate; upstream integration status computation
and workspace integration are now handled by the newer workspace APIs
(e.g. but_api::workspace::workspace_integrate_upstream and
but_api::workspace::upstream_statuses). This cleans up dead legacy code,
removes unused types and tests, and updates call sites to use the new
workspace-oriented APIs.
Move upstream integration types into but-api workspace
Move the upstream integration types into but-api::workspace and update
all callers to import them from the new location. This removes the
legacy re-export from gitbutler-branch-actions and converts the
workspace module to expose a dedicated upstream_integration submodule.
The change updates imports across but, but-api, and
gitbutler-branch-actions (including virtual_branches, status, and pull
command code) to reference
but_api::workspace::upstream_integration::{...} and wires
upstream_statuses to use the relocated types.workspace_integrate_upstream API in desktop app1 parent a853ec7 commit 0915fca
23 files changed
Lines changed: 964 additions & 1543 deletions
File tree
- apps/desktop/src
- components/upstream
- lib
- bootstrap
- branches
- stacks
- upstream
- crates
- but-api/src
- legacy
- workspace
- but-server/src
- but/src/command/legacy
- pull
- status
- gitbutler-branch-actions
- src
- tests/branch-actions/virtual_branches
- gitbutler-tauri/src
- e2e/playwright/tests
- packages/but-sdk/src/generated
Lines changed: 212 additions & 217 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | 63 | | |
68 | 64 | | |
69 | 65 | | |
| |||
261 | 257 | | |
262 | 258 | | |
263 | 259 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | 260 | | |
273 | 261 | | |
274 | 262 | | |
| |||
379 | 367 | | |
380 | 368 | | |
381 | 369 | | |
382 | | - | |
383 | 370 | | |
384 | 371 | | |
385 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
18 | | - | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
| |||
111 | 108 | | |
112 | 109 | | |
113 | 110 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | 111 | | |
134 | 112 | | |
135 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
931 | 933 | | |
932 | 934 | | |
933 | 935 | | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
934 | 952 | | |
935 | 953 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
581 | 596 | | |
582 | 597 | | |
583 | 598 | | |
| |||
This file was deleted.
Lines changed: 0 additions & 59 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 17 | | |
| 18 | + | |
| 19 | + | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
670 | 668 | | |
671 | 669 | | |
672 | 670 | | |
673 | | - | |
674 | | - | |
675 | 671 | | |
676 | 672 | | |
677 | 673 | | |
| |||
681 | 677 | | |
682 | 678 | | |
683 | 679 | | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
| 680 | + | |
725 | 681 | | |
726 | | - | |
| 682 | + | |
727 | 683 | | |
728 | | - | |
729 | | - | |
| 684 | + | |
730 | 685 | | |
731 | 686 | | |
732 | 687 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
0 commit comments