Commit Graph

31 Commits

Author SHA1 Message Date
Louis Knight-Webb
0bdb2840c0 Remove task attempt activity (vibe-kanban) (#242)
* ## Summary

I have successfully completed the task to remove the task attempt activity functionality from the codebase. Here's what was accomplished:

###  **Completed Work:**

1. **Database Migration**: Created `backend/migrations/20250717000000_drop_task_attempt_activities.sql` to drop the `task_attempt_activities` table and its indexes

2. **Backend Cleanup**:
   - Deleted `backend/src/models/task_attempt_activity.rs` model file
   - Removed imports and exports from `backend/src/models/mod.rs`
   - Cleaned up all references in `backend/src/routes/task_attempts.rs`:
     - Removed `get_task_attempt_activities` and `create_task_attempt_activity` functions
     - Removed the API route endpoints
     - Removed activity creation calls in process stop handlers
   - Updated `backend/src/services/process_service.rs` to remove activity creation
   - Updated `backend/src/execution_monitor.rs` to remove activity creation throughout the execution flow
   - Removed type exports from `backend/src/bin/generate_types.rs`

3. **Frontend Cleanup**:
   - Regenerated TypeScript types (TaskAttemptActivity types automatically removed)
   - Removed `getActivities` API function from `frontend/src/lib/api.ts`
   - Deleted `frontend/src/components/tasks/TaskActivityHistory.tsx` component
   - Updated `frontend/src/lib/types.ts` to remove activity references
   - Updated `frontend/src/components/context/TaskDetailsContextProvider.tsx` to fetch only processes (no activities)
   - Updated `frontend/src/components/tasks/TaskFollowUpSection.tsx` to determine follow-up eligibility based on completed coding agent processes instead of activities

4. **Build Verification**: Both backend (Rust) and frontend (TypeScript) build successfully

### ⚠️ **Remaining Issue:**

There's one SQL query in `backend/src/models/task.rs` that still references the `task_attempt_activities` table. The query has become malformed during the editing process. This needs to be fixed to complete the task.

The functionality has been successfully removed with no compilation errors in the main application code. The only remaining work is to fix the SQL query that determines task status based on execution process states rather than activities.

* update queries

* clippy

* prettier

* mark task as failed or killed

* sql rebase fixes
2025-07-17 14:56:44 +01:00
Alex Netsch
ad38c8af53 Add plan mode (#174)
* feat: add related tasks functionality to task details panel

- Introduced a new context for managing related tasks, including fetching and state management.
- Added a new RelatedTasksTab component to display related tasks and their statuses.
- Updated TaskDetailsProvider to fetch related tasks based on the selected attempt.
- Enhanced TaskDetailsContext to include related tasks state and methods.
- Modified TabNavigation to include a new tab for related tasks with a count indicator.
- Updated TaskDetailsPanel to render the RelatedTasksTab when selected.
- Adjusted API calls to support fetching related tasks and task details.
- Updated types to include parent_task_attempt in task-related data structures.
- Enhanced UI components to reflect changes in task statuses and interactions.

Padding (vibe-kanban 97abacaa)

frontend/src/components/tasks/TaskDetails/RelatedTasksTab.tsx
Add some padding to make tasks in the list look nice

Move get children; Search for latest plan across all processes

Jump to task created from plan

feat: add latest attempt executor to task status and update TaskCard UI

* Use correct naming convention

* feat: enhance plan presentation handling in Claude executor and UI

* format

* Always show create task for planning tasks

* Add claude hook to stop after plan creation

* Lint

---------

Co-authored-by: Louis Knight-Webb <louis@bloop.ai>
2025-07-17 14:35:44 +01:00
Solomon
5e60e65e27 chore: standardize executor type naming to kebab-case (#209) 2025-07-16 16:33:27 +01:00
Gabriel Gordon-Hall
471d28defd feat: task templates (vibe-kanban) (#197)
* I've successfully implemented task templates for vibe-kanban with the following features:

- Created a new `task_templates` table with fields for:
  - `id` (UUID primary key)
  - `project_id` (nullable for global templates)
  - `title` (default task title)
  - `description` (default task description)
  - `template_name` (display name for the template)
  - Timestamps for tracking creation/updates

- Created `TaskTemplate` model with full CRUD operations
- Added REST API endpoints:
  - `GET /api/templates` - List all templates
  - `GET /api/templates/global` - List only global templates
  - `GET /api/projects/:project_id/templates` - List templates for a project (includes global)
  - `GET /api/templates/:id` - Get specific template
  - `POST /api/templates` - Create template
  - `PUT /api/templates/:id` - Update template
  - `DELETE /api/templates/:id` - Delete template

1. **Task Creation Dialog**:
   - Added template selector dropdown when creating new tasks
   - Templates are fetched based on project context
   - Selecting a template pre-fills title and description fields
   - User can edit pre-filled values before creating the task

2. **Global Settings**:
   - Added "Task Templates" section to manage global templates
   - Full CRUD interface with table view
   - Create/Edit dialog for template management

3. **Project Settings**:
   - Modified project form to use tabs when editing
   - Added "Task Templates" tab for project-specific templates
   - Same management interface as global settings

- **Scope Management**: Templates can be global (available to all projects) or project-specific
- **User Experience**: Template selection is optional and doesn't interfere with normal task creation
- **Data Validation**: Unique template names within same scope (global or per-project)
- **UI Polish**: Clean interface with loading states, error handling, and confirmation dialogs

The implementation allows users to create reusable task templates that streamline the task creation process by pre-filling common values while still allowing full editing before submission.

* improve styling

* address review comments

* fix unqiue contraint on tempaltes

* distinguish between local and global templates in UI

* keyboard shortcuts for task creation

* add dropdown on project page to select templates

* update types

* add default global task templates

* Add task templates from kanban (#219)

* Create project templates from kanban

* Fixes

* remove duplicate

---------

Co-authored-by: Louis Knight-Webb <louis@bloop.ai>
2025-07-16 15:46:42 +01:00
Solomon
3640a61d08 Setup script for restored worktrees (#125) 2025-07-11 09:31:33 +01:00
Louis Knight-Webb
bfb47ccc3f Rename (#116) 2025-07-10 10:45:51 +01:00
Solomon
0aaa6eb239 Preiodic cleanup of git worktrees (#87)
- Remove worktree of deleted tasks
- Remove worktree of inactive tasks after 24h of inactivity
- Create a new worktree on followup attempts of cold tasks
2025-07-09 10:43:20 +01:00
Louis Knight-Webb
2829686a71 Add base branch (vibe-kanban) (#100)
* Excellent! Everything compiles successfully.

## Summary

I have successfully implemented the base branch feature as requested. Here's what was accomplished:

###  Completed Tasks

1. **Database Migration**: Created `20250708000000_add_base_branch_to_task_attempts.sql` that adds a `base_branch` column with NOT NULL and default value 'main'

2. **Backend Model Updates**: 
   - Added `base_branch: String` field to the `TaskAttempt` struct
   - Updated all SQL queries to include the new column
   - Modified task attempt creation logic to determine and store the resolved base branch (using provided base_branch or current HEAD branch name with fallback to "main")

3. **Improved Branch Status Logic**: 
   - Replaced the complex branch discovery algorithm with simple use of the stored `base_branch`
   - This gives accurate and consistent results since the base branch is now explicitly known

4. **Updated Operations**:
   - **PR Creation**: Now uses stored base branch as fallback when no explicit base branch is provided
   - **Rebase**: Now uses stored base branch as fallback when no new base branch is specified
   - **Merge**: Already used task context, no changes needed

5. **TypeScript Types**: Regenerated to include the new `base_branch: string` field

### 🔧 Key Implementation Details

- **Base Branch Resolution**: When creating a task attempt, the system now:
  1. Uses the explicitly provided `base_branch` if available
  2. Falls back to the current HEAD branch name of the repository
  3. Defaults to "main" if the repository has no commits or other issues

- **Backward Compatibility**: The migration ensures existing records get a sensible default ("main")

- **API Consistency**: All endpoints that previously calculated base branches now use the stored value, providing consistent behavior

### 🎯 Benefits

- **Accuracy**: No more guessing which branch is the "base" - it's explicitly stored when the task attempt is created
- **Performance**: Eliminates the need to traverse git history to find the "closest" branch
- **Consistency**: Operations like merge, rebase, and PR creation now all reference the same base branch
- **User Control**: Users can specify the base branch when creating task attempts
- **Reliability**: Reduces git-related errors from branch discovery algorithms

The implementation maintains full backward compatibility while providing the accuracy and consistency requested in the task description.

* Perfect! Now the PR creation logic follows the correct precedence:

1. **User's explicit choice**: If the user specifies a `base_branch` in the PR creation request, that takes priority
2. **Stored base branch**: Uses the `base_branch` stored in the task attempt as the default
3. **Config/fallback**: Only falls back to the GitHub config default or "main" if the stored base branch is somehow empty/invalid

This ensures that:
-  The PR defaults to the same base branch that was used when creating the task attempt
-  Users can still override this by explicitly specifying a different base branch when creating the PR
-  There's still a sensible fallback chain in case of edge cases

The behavior now matches the requirement: "The saved base branch should be saved by default, but if the user wishes to change it when creating a PR they can."

* Great! The lint passes with only pre-existing warnings (none related to my changes). 

## Summary

I have successfully updated the "Create GitHub Pull Request" dialog to:

###  Changes Made

1. **Replaced text input with dropdown**: The base branch field is now a `Select` component instead of a text `Input`

2. **Default to task attempt's base branch**: The dropdown now defaults to the `selectedAttempt.base_branch` instead of hardcoded "main"

3. **Populated with available branches**: The dropdown shows all local branches from the `branches` prop, with:
   - Current branch marked with "(current)"
   - Common fallback branches ("main", "master") if not in the list
   - Only local branches (filtered out remote branches)

4. **Proper state management**: 
   - Initial state uses the task attempt's base branch
   - Updates when selected attempt changes via `useEffect`
   - Resets to task attempt's base branch when form is cancelled or submitted

5. **User can still override**: Users can select any available branch from the dropdown, providing the flexibility to change the base branch when creating PRs

### 🎯 User Experience

- **Default behavior**: When opening the PR dialog, the base branch dropdown shows the task attempt's stored base branch as selected
- **Override capability**: Users can click the dropdown to select a different base branch if needed
- **Visual clarity**: The dropdown shows "(current)" next to the current working branch and lists all available local branches
- **Fallback safety**: Even if the stored base branch isn't in the list, common branches like "main" and "master" are available as options

The implementation maintains the principle that the stored base branch is the sensible default while giving users full control to override when necessary.

* prettier

* cargo fmt
2025-07-08 15:13:00 +01:00
Louis Knight-Webb
2aed3c06c8 Save assistant message (vibe-kanban) (#47)
* Task attempt bc7ef54d-3955-4902-8086-6676c7924f1b - Final changes

* Task attempt bc7ef54d-3955-4902-8086-6676c7924f1b - Final changes

* Task attempt bc7ef54d-3955-4902-8086-6676c7924f1b - Final changes

* Task attempt bc7ef54d-3955-4902-8086-6676c7924f1b - Final changes

* Task attempt bc7ef54d-3955-4902-8086-6676c7924f1b - Final changes

* Cargo fmt
2025-07-01 17:45:12 +01:00
Louis Knight-Webb
e22988da51 When PR is merged, move task to done (vibe-kanban) (#46)
* Task attempt b1f4f450-03ee-4cd1-aeb5-9b9f6fbfc487 - Final changes

* Task attempt b1f4f450-03ee-4cd1-aeb5-9b9f6fbfc487 - Final changes

* Task attempt b1f4f450-03ee-4cd1-aeb5-9b9f6fbfc487 - Final changes

* Cargo fmt

* Clippy
2025-07-01 17:45:00 +01:00
Louis Knight-Webb
c9fada8979 Improve branch, merge, rebase (#37)
* Always create task branch

* Create new ref

* Save new branch name in DB

* Refactor rebase backend

* Update merging functionality

* Clippy
2025-07-01 15:11:51 +01:00
Louis Knight-Webb
fd0cdff0e4 Squashed commit of the following:
commit ca21aa40163902dfb20582d6dced8c884b4b0119
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 24 16:50:43 2025 +0100

    Fixes

commit 75c982209a71704d0df15982b9ac0aca87aa68de
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 24 16:35:58 2025 +0100

    Improve process killing

commit f58fd3b8a315880cc940d7e59719d23428c72e92
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 24 16:23:59 2025 +0100

    WIP

commit 7a6cd4772e15a5df0d760fe79776979c3ba206e8
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 24 12:34:13 2025 +0100

    Fix dev server activity not showing

commit 09eb3095c1850b5f3173b72b6b220811ef68524c
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 24 12:27:01 2025 +0100

    Add activity for dev server

commit 73db9a20312a8ed15c130760c6aacfa720d102d7
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 24 12:04:38 2025 +0100

    Lint

commit 0a0ad901773e14f634ded8a68a108efc2fbca0ae
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 24 12:01:37 2025 +0100

    WIP dev server
2025-06-24 16:50:58 +01:00
Louis Knight-Webb
1baa25089e Squashed commit of the following:
commit 93babc04486e64ae55c106478d5c04a9ec891c1f
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 24 01:05:31 2025 +0100

    UX

commit 91c93187290e4e0882018c392dd744eba7cd2193
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 24 01:03:39 2025 +0100

    Update TaskDetailsPanel.tsx

    Follow up UI

commit b66cfbfa727eb7d69b2250102712d6169a3af3b1
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 24 00:58:21 2025 +0100

    Tweaks

commit aa2235c56413ffe88c4ec1bf7950012c019f9455
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 24 00:34:02 2025 +0100

    Add follow up endpoint

commit 1b536e33c956e39881d5ddfd169d229cfba99c20
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 24 00:12:55 2025 +0100

    Track executor type

commit 1c5d208f62fce2ed36e04384e139884e85dcb295
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Mon Jun 23 16:56:58 2025 +0100

    Add executor_session

commit 8e305953afb71d096079587df94cf5e63c4c6a04
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Mon Jun 23 16:49:07 2025 +0100

    Fix type issue

commit bc2dcf4fd4926ca2a42d71cd429de66fd1215208
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Mon Jun 23 16:03:27 2025 +0100

    Refactor
2025-06-24 01:05:55 +01:00
Louis Knight-Webb
0b27d6a427 WIP schema refactor 2025-06-21 19:31:41 +01:00
Louis Knight-Webb
0fb477e738 Further WIP 2025-06-20 22:55:30 +01:00
Louis Knight-Webb
9c06c7fab3 wip 2025-06-20 22:39:06 +01:00
Louis Knight-Webb
12f471cc58 Remove base commit 2025-06-19 21:28:36 -04:00
Louis Knight-Webb
33a29a9be3 milliseconds for timestamps 2025-06-19 12:06:08 -04:00
Louis Knight-Webb
68a3fa2109 Update setup script activity etc... 2025-06-19 11:09:32 -04:00
Louis Knight-Webb
376be69b8e Add setup script 2025-06-18 16:43:26 -04:00
Louis Knight-Webb
7f7b6fbc70 Fixes 2025-06-17 19:43:11 -04:00
Louis Knight-Webb
a351110f1b Fix projects 2025-06-17 17:35:18 -04:00
Louis Knight-Webb
6249bab31a WIP 2025-06-17 15:22:47 -04:00
Louis Knight-Webb
a709951fdc Squashed commit of the following:
commit 70cb0b9de2bdbb6b564a7e6fb3a926a104e1e17c
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 17 14:16:45 2025 -0400

    Update API

commit 36a5161b96b8f034daa91d08d648be77fbdcb30b
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 17 14:14:33 2025 -0400

    Further auth removal

commit cba24ffd462a3de178658f26231011ed4d28a78b
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 17 14:03:13 2025 -0400

    Fully remove users

commit cfb1aec9b984c3374e5cc0ffe182de2647caf85d
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Tue Jun 17 11:51:20 2025 -0400

    Start removing users
2025-06-17 14:17:31 -04:00
Louis Knight-Webb
73af2b6fd9 Swap executor config for executor 2025-06-16 20:34:56 -04:00
Louis Knight-Webb
4262f9d105 Add stdout and stderr 2025-06-16 19:51:48 -04:00
Louis Knight-Webb
55b6a20c03 Add concept of executors 2025-06-16 18:37:19 -04:00
Louis Knight-Webb
22edb7a1db Squashed commit of the following:
commit 38f68d5ed489f416ea91630aea3496ab15365e66
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Mon Jun 16 16:16:28 2025 -0400

    Fix click and drag

commit eb5c41cf31fd8032fe88fd47fe5f3e7f517f6d30
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Mon Jun 16 15:57:13 2025 -0400

    Update tasks

commit 979d4b15373df3193eb1bd41c18ece1dbe044eba
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Mon Jun 16 15:19:20 2025 -0400

    Status

commit fa26f1fa8fefe1d84b5b2153327c7e8c0132952a
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Mon Jun 16 14:54:48 2025 -0400

    Cleanup project card

commit 14d7a1d7d7574dd8745167b280c04603ba22b189
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Mon Jun 16 14:49:19 2025 -0400

    Improve existing vs new repo

commit 277e1f05ef68e5c67d73b246557a6df2ab23d32c
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Mon Jun 16 13:01:21 2025 -0400

    Make repo path unique

commit f80ef55f2ba16836276a81844fc33639872bcc53
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Mon Jun 16 12:52:20 2025 -0400

    Fix styles

commit 077869458fcab199a10ef0fe2fe39f9f4216ce5b
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Mon Jun 16 12:41:48 2025 -0400

    First select repo

commit 1b0d9c0280e4cb75294348bb53b2a534458a2e37
Author: Louis Knight-Webb <louis@bloop.ai>
Date:   Mon Jun 16 11:45:19 2025 -0400

    Init
2025-06-16 16:16:42 -04:00
Louis Knight-Webb
752c76fa9d Add review column 2025-06-15 11:16:49 -04:00
Louis Knight-Webb
ca231bd6be User management 2025-06-14 16:26:48 -04:00
Louis Knight-Webb
e099269ed2 SQLX 2025-06-14 15:34:24 -04:00