Louis Knight-Webb 62d389f823 Fix branch-status endpoint (#75)
* The fix has been successfully implemented! Here's what I changed:

**Problem**: The `get_branch_status` function was incorrectly using `main_repo.head()` to determine the base branch name, which returns the currently checked out branch in the main repository instead of the actual base branch that the task branch should be compared against.

**Solution**: I replaced the problematic logic with a smarter approach that:

1. **Finds the actual base branch** by testing common base branch names (`main`, `master`, `develop`) 
2. **Uses git merge-base** to determine which branch the task branch actually diverged from
3. **Compares the task branch to the correct base branch** instead of whatever happens to be checked out

This ensures that the branch status always shows the task branch's status relative to its actual base branch, regardless of what branch is currently checked out in the main repository.

The fix is now compiled and ready to use. The branch-status endpoint will now correctly return information about the task branch relative to its proper base branch.

* Perfect! I've fixed the branch-status issue correctly. Here's what the solution does:

**The Problem**: The previous code was using `main_repo.head()` which returns whatever branch is currently checked out in the main repository, not the actual base branch that the worktree was created from.

**The Solution**: The new code:

1. **Examines all local branches** in the main repository
2. **Finds the merge base** between each branch and the worktree branch  
3. **Identifies the branch with the most recent common ancestor** - this is the actual base branch
4. **Uses that branch for comparison** instead of the currently checked out branch

This approach correctly identifies the actual base branch that the worktree was created from by analyzing the git history, regardless of what branch is currently checked out in the main repository.

The fix ensures that branch-status always returns information about the task branch relative to its true base branch, not whatever happens to be checked out at the time.

* Perfect! You were absolutely right. The fix is now much more efficient and uses the proper Git approach:

**The Much Better Solution**:

1. **First, check upstream tracking**: Look at the worktree's branch configuration to see if it has upstream tracking information (like `origin/main`)
2. **Then, use direct merge-base**: Instead of iterating through all branches, directly test a few common base branches (`main`, `master`, `develop`) using `git merge-base`
3. **No iteration needed**: This is equivalent to running `git merge-base HEAD main` for each potential base branch

This approach is:
- **Much faster** - no iteration through all branches
- **More accurate** - uses Git's built-in merge-base functionality  
- **More direct** - exactly like the `git merge-base HEAD master` command you mentioned

The key insight was that we don't need to check every branch - we just need to find which common base branch the worktree actually diverged from using Git's merge-base algorithm directly.

* Perfect! Much better. The fix is now:

- **8 lines** instead of 40+
- **Uses functional programming** with `find_map` instead of verbose loops
- **Same functionality** - finds the first common branch (`main`, `master`, or `develop`) that has a valid merge-base with the worktree
- **Clean fallback** - defaults to `"main"` if no merge-base is found

This concise solution directly addresses the original issue: instead of returning whatever branch happens to be checked out (`main_repo.head()`), it finds the actual base branch that the worktree was created from using Git's merge-base algorithm.

* manual fix
2025-07-07 20:31:40 +01:00
2025-07-07 20:31:40 +01:00
2025-07-07 12:30:06 +01:00
2025-07-07 13:15:38 +00:00
2025-06-20 14:33:15 +01:00
2025-06-27 13:32:32 +01:00
2025-07-04 11:11:45 +02:00
2025-06-14 15:14:08 -04:00
2025-06-17 20:36:25 -04: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

Mission Control

Orchestration and visualisation over multiple coding agents.

Project Structure

repo/
├── backend/               # Rust backend (Axum API)
│   ├── Cargo.toml
│   └── src/
│       ├── main.rs
│       ├── routes/
│       └── models/
├── frontend/              # React + TypeScript app
│   ├── package.json
│   ├── vite.config.ts
│   ├── components.json    # shadcn/ui config
│   ├── tailwind.config.js
│   └── src/
│       ├── components/
│       │   └── ui/        # shadcn/ui components
│       ├── lib/
│       └── app/
├── shared/                # Shared types/schemas
│   └── types.ts
├── Cargo.toml             # Workspace configuration
├── pnpm-workspace.yaml    # pnpm workspace
└── package.json           # Root scripts

Getting Started

Prerequisites

Installation

  1. Install dependencies
# Install dependencies
npm install

Development

# Run both frontend and backend in development mode
npm dev

Tech Stack

Backend

  • Rust with Axum web framework
  • Tokio async runtime
  • Tower middleware
  • Serde for JSON serialization

Frontend

  • React 18 with TypeScript
  • Vite for build tooling
  • Tailwind CSS for styling
  • shadcn/ui component library
  • Radix UI primitives

Adding shadcn/ui Components

cd frontend
npx shadcn-ui@latest add button
npx shadcn-ui@latest add card
# etc.
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%