Louis Knight-Webb a71e243d70 Execute Plan: Rebase onto different branch update (vibe-kanban) (#300)
* ## Summary

I have successfully implemented the smart rebase feature to fix the "rebase onto different branch" issue. Here's what was accomplished:

###  **Key Changes Made:**

1. **Updated GitService::rebase_branch()** ([git_service.rs](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vibe-kanban/vk-7f2a-execute-pl/backend/src/services/git_service.rs#L333-L337)):
   - Added `old_base_branch` parameter to method signature
   - Implemented smart rebase logic that only cherry-picks commits unique to the task branch
   - Maintains backward compatibility with standard rebase when no old base branch is provided

2. **Added Helper Methods** ([git_service.rs](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vibe-kanban/vk-7f2a-execute-pl/backend/src/services/git_service.rs#L1190-L1310)):
   - `get_merge_base()`: Finds common ancestors between commits  
   - `find_unique_commits()`: Identifies commits unique to task branch (not in either base)
   - `cherry_pick_commits()`: Applies specific commits onto new base with conflict detection

3. **Updated TaskAttempt Model** ([task_attempt.rs](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vibe-kanban/vk-7f2a-execute-pl/backend/src/models/task_attempt.rs#L815-L826)):
   - Modified `rebase_attempt()` to pass current base branch as old base when rebasing to different branch
   - Updated `perform_rebase_operation()` to accept old base branch parameter

###  **Problem Solved:**

The issue where rebasing a task branch from `old_base` to `new_base` included unintended commits (when `old_base` was itself based on `new_base`) is now resolved. The smart rebase algorithm:

1. Calculates the merge-base between task branch and old base branch
2. Identifies commits that are unique to the task branch only  
3. Cherry-picks only those unique commits onto the new base branch
4. Excludes any commits that originated from the base branch lineage

###  **Backward Compatibility:**

The implementation maintains full backward compatibility. When no old base branch is provided, it falls back to the standard Git rebase behavior, ensuring existing functionality continues to work as expected.

###  **Testing:**

-  Code compiles successfully 
-  All existing tests pass (95/95)
-  Both backend and frontend build successfully
-  No regressions introduced

The implementation is now ready and will correctly handle rebasing task branches onto different base branches without including unintended commits from the base branch history.

* Cleanup script

* Remove case where old_branch is optional

* Fmt
2025-07-20 20:06:02 +01:00
2025-07-20 17:45:52 +01:00
2025-07-07 12:30:06 +01:00
2025-07-20 17:45:52 +01:00
2025-07-20 14:43:31 +00:00
2025-07-20 17:45:52 +01:00
2025-07-20 16:07:48 +01:00
2025-07-20 18:21:49 +01:00
2025-07-11 15:57:30 +01:00
2025-07-11 16:31:08 +01:00
2025-07-20 17:45:52 +01:00
2025-06-14 15:14:08 -04:00
2025-07-17 16:29:35 +01:00
2025-06-25 09:27:29 +01:00
2025-06-25 09:27:29 +01:00
2025-07-04 11:11:45 +02:00

Vibe Kanban Logo

Get 10X more out of Claude Code, Gemini CLI, Codex, Amp and other coding agents...

npm Build status

Overview

AI coding agents are increasingly writing the world's code and human engineers now spend the majority of their time planning, reviewing, and orchestrating tasks. Vibe Kanban streamlines this process, enabling you to:

  • Easily switch between different coding agents
  • Orchestrate the execution of multiple coding agents in parallel or in sequence
  • Quickly review work and start dev servers
  • Track the status of tasks that your coding agents are working on
  • Centralise configuration of coding agent MCP configs

You can watch a video overview here.

Installation

Make sure you have authenticated with your favourite coding agent. A full list of supported coding agents can be found in the docs. Then in your terminal run:

npx vibe-kanban

Documentation

Please head to the website for the latest documentation and user guides.

Support

Please open an issue on this repo if you find any bugs or have any feature requests.

Contributing

We would prefer that ideas and changes are raised with the core team via GitHub issues, where we can discuss implementation details and alignment with the existing roadmap. Please do not open PRs without first discussing your proposal with the team.

Development

Prerequisites

pnpm i

Running the dev server

pnpm run dev

This will start the frontend and backend with live reloading. A blank DB will be copied from the dev_assets_seed folder.

Build from source

  1. Run build-npm-package.sh
  2. In the npx-cli folder run npm pack
  3. You can run your build with npx [GENERATED FILE].tgz

Environment Variables

The following environment variables can be configured at build time or runtime:

Variable Type Default Description
GITHUB_CLIENT_ID Build-time Ov23li9bxz3kKfPOIsGm GitHub OAuth app client ID for authentication
POSTHOG_API_KEY Build-time Empty PostHog analytics API key (disables analytics if empty)
POSTHOG_API_ENDPOINT Build-time Empty PostHog analytics endpoint (disables analytics if empty)
BACKEND_PORT Runtime 0 (auto-assign) Backend server port
FRONTEND_PORT Runtime 3000 Frontend development server port
HOST Runtime 127.0.0.1 Backend server host
DISABLE_WORKTREE_ORPHAN_CLEANUP Runtime Not set Disable git worktree cleanup (for debugging)

Build-time variables must be set when running pnpm run build. Runtime variables are read when the application starts.

Custom GitHub OAuth App (Optional)

By default, Vibe Kanban uses Bloop AI's GitHub OAuth app for authentication. To use your own GitHub app for self-hosting or custom branding:

  1. Create a GitHub OAuth App at GitHub Developer Settings
  2. Enable "Device Flow" in the app settings
  3. Set scopes to include user:email,repo
  4. Build with your client ID:
    GITHUB_CLIENT_ID=your_client_id_here pnpm run build
    
Description
Get 10X more out of Claude Code, Codex or any coding agent
https://www.vibekanban.com/
Readme Apache-2.0 48 MiB
Languages
Rust 51.1%
TypeScript 46.6%
CSS 1.1%
JavaScript 0.7%
PLpgSQL 0.2%
Other 0.2%