Skip to content

Wire up workspace_integrate_upstream API for stack rebase and upstream integration#13678

Draft
mtsgrd wants to merge 1 commit into
masterfrom
add-rebase-stack-modal
Draft

Wire up workspace_integrate_upstream API for stack rebase and upstream integration#13678
mtsgrd wants to merge 1 commit into
masterfrom
add-rebase-stack-modal

Conversation

@mtsgrd
Copy link
Copy Markdown
Contributor

@mtsgrd mtsgrd commented May 6, 2026

Summary

  • Adopt the workspace_integrate_upstream API for upstream integration in the desktop app
  • Refactor IntegrateUpstreamModal from imperative fetching to reactive query subscriptions with ReduxResult
  • Expose bottom_selector on StackStatus so the frontend can construct BottomUpdate selectors
  • Add e2e tests for "leave as is" behavior and branch base assertions

Test plan

  • All 7 upstream integration e2e tests pass
  • "Leave as is" test verifies branch base is unchanged while rebased branches advance
  • Manual: open integrate modal, verify per-stack resolution picker works (rebase/merge/leave as is)

🤖 Generated with Claude Code

@mtsgrd mtsgrd force-pushed the add-rebase-stack-modal branch from 36effc6 to 7c228ad Compare May 7, 2026 14:57
@mtsgrd mtsgrd changed the title [wip] Add stack-level rebase context menu item Wire up workspace_integrate_upstream API for stack rebase and upstream integration May 8, 2026
@mtsgrd mtsgrd force-pushed the add-rebase-stack-modal branch from 7c228ad to 93001e3 Compare May 8, 2026 13:42
@github-actions github-actions Bot added the rust Pull requests that update Rust code label May 8, 2026
@mtsgrd mtsgrd force-pushed the add-rebase-stack-modal branch 2 times, most recently from 90da8d5 to 576b1a6 Compare May 8, 2026 14:12
@mtsgrd
Copy link
Copy Markdown
Contributor Author

mtsgrd commented May 8, 2026

@Caleb-T-Owens is the new API ready for the svelte app to migrate?

@mtsgrd mtsgrd force-pushed the add-rebase-stack-modal branch 7 times, most recently from 94ff5eb to 0915fca Compare May 12, 2026 16:55
@github-actions github-actions Bot added the CLI The command-line program `but` label May 12, 2026
@mtsgrd mtsgrd force-pushed the add-rebase-stack-modal branch 3 times, most recently from f21d42c to 2fe9438 Compare May 12, 2026 19:57
Move upstream integration status computation and types out of
gitbutler-branch-actions into but-api::workspace, using the but-graph
workspace projection instead of the legacy stack_details_v3 path.

Backend:
- Add upstream_integration module with SDK-registered types
  (StackStatuses, BranchStatus, StackStatus, ResolutionApproach, etc.)
- Add upstream_statuses module that computes per-stack statuses via
  but-graph projections, trial rebases, and forge review checks
- Extract upstream_integration_statuses_inner for Context-free testing
- Remove legacy upstream_integration module and integrate_upstream from
  gitbutler-branch-actions, tauri bindings, and but-server
- Update CLI pull/status commands to use new API

Frontend:
- Migrate IntegrateUpstreamModal from Resolution API to BottomUpdate[]
- Imperative status fetch → reactive useQuery subscription
- Merge UpstreamIntegrationService into stackService
- Remove StackStatusesWithBranchesV3 and dead upstream types

Tests:
- Add fixture-based tests using but-workspace pattern (no legacy APIs)
- Two fixture scripts for upstream integration scenarios
- Cover status computation and integrate_upstream with integrated branch

E2E:
- Add Playwright test for single-stack rebase via context menu
@mtsgrd mtsgrd force-pushed the add-rebase-stack-modal branch from 2fe9438 to 359a895 Compare May 13, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI The command-line program `but` @gitbutler/desktop rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant