Commit Graph

518 Commits

Author SHA1 Message Date
Louis Knight-Webb
2e4eb6d403 Delete tasks in the background (vibe-kanban) (#621)
* ##  **Implementation Complete!**

I have successfully implemented the asynchronous task deletion feature. Here's a summary of what was implemented:

### **Changes Made:**

1. **Added new ContainerService methods** ([`services/container.rs`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-83cd-delete-tas/crates/services/src/services/container.rs)):
   - `has_running_processes()` - validates no running execution processes
   - `stop_task_processes()` - stops execution processes quickly
   - `cleanup_worktrees()` - handles slow worktree cleanup

2. **Modified delete_task endpoint** ([`routes/tasks.rs`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-83cd-delete-tas/crates/server/src/routes/tasks.rs)):
   - **Fast phase:** Validates → Stops processes → Deletes from DB → Emits SSE → Returns `202 Accepted`
   - **Background phase:** Spawns tokio task for worktree cleanup with proper logging

3. **Added ApiError::Conflict** ([`error.rs`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-83cd-delete-tas/crates/server/src/error.rs)):
   - Returns `409 Conflict` when attempting to delete tasks with running processes

### **Key Benefits:**
- **Fast UI response** - Task deletion returns immediately (`202 Accepted`)
- **Background cleanup** - Slow worktree operations happen asynchronously
- **Proper validation** - Prevents deletion of tasks with running processes
- **Safe implementation** - Uses existing FK CASCADE constraints
- **Observability** - Background tasks have proper tracing and error logging

### **Safety Features Implemented:**
-  Running process validation before deletion
-  DB constraints verified (FK CASCADE)
-  Background task error handling and logging
-  Proper tracing spans for debugging
-  Graceful error handling for failed cleanup

The implementation follows the Oracle's recommendations and maintains backward compatibility while making task deletion much faster for users.

* Cleanup script changes for task attempt 83cd80cd-6627-4e47-95bd-b1e899fe66e0

* ##  **Background Worktree Cleanup Fix Successfully Reapplied!**

I have successfully reapplied all the changes to fix the background worktree cleanup issue. Here's what was implemented:

### **Changes Applied:**

1. **Added `WorktreeCleanupData` struct and `cleanup_worktrees_direct()` function** ([`services/container.rs`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-83cd-delete-tas/crates/services/src/services/container.rs))
   - Stores all data needed for cleanup without requiring database access
   - Standalone async function that calls `WorktreeManager::cleanup_worktree()` directly

2. **Added validation methods to ContainerService trait:**
   - `has_running_processes()` - checks if task has running execution processes
   - `stop_task_processes()` - stops execution processes without cleanup

3. **Modified `delete_task()` endpoint** ([`routes/tasks.rs`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-83cd-delete-tas/crates/server/src/routes/tasks.rs))
   - **Validates** no running processes exist before deletion
   - **Gathers cleanup data** before database deletion (includes project git repo path)
   - **Fast phase:** Stops processes → Deletes from DB → Emits SSE → Returns `202 Accepted`
   - **Background phase:** Spawns tokio task with self-contained cleanup data

4. **Added `ApiError::Conflict` variant** ([`error.rs`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-83cd-delete-tas/crates/server/src/error.rs))
   - Returns `409 Conflict` when trying to delete tasks with running processes
   - Proper error handling in HTTP responses

### **Key Improvements:**
-  **Eliminates database race condition** - No more "no rows returned" errors
-  **Maintains fast API response** - Returns `202 Accepted` immediately
-  **Proper validation** - Prevents deletion of tasks with running processes
-  **Better logging** - Background tasks show worktree count and proper tracing
-  **Robust error handling** - Failed cleanups are logged but don't crash the system
-  **All tests pass** - No breaking changes to existing functionality

The fix addresses the core issue where background cleanup was trying to access database records that had already been deleted due to FK CASCADE constraints. Now the cleanup operates with self-contained data gathered before deletion.

* Improvements to UI during deletion (vibe-kanban 0c14eb91)

Issues:
- If user deletes task while sidebar is open with task details, the task details remain shown
- If task deletion fails all project tasks are hidden and the message "Failed to delete task" is shown, the user has to refresh the page to resolve

* cleanup

* fmt

* fmt
2025-09-04 13:08:29 +01:00
Louis Knight-Webb
122a0c02fd Stream bug fix (new references to stream objects) (#623)
* new container refs

* fmt

* generic
2025-09-04 12:58:13 +01:00
Alex Netsch
0fba097927 Make project settings easier to find (vibe-kanban) (#617)
* Perfect! I've successfully added a gear (Settings) icon next to the create task (Plus) icon in the navbar. Here's what I implemented:

## Changes Made

**In `frontend/src/components/layout/navbar.tsx`:**

1. **Added imports**: ProjectForm component and useState hook
2. **Added state management**: `isProjectSettingsOpen` state to control the dialog
3. **Added settings button**: A gear icon button positioned between the "Open in IDE" and "Create Task" buttons
4. **Added dialog**: ProjectForm dialog that opens when the settings button is clicked
5. **Added handlers**: `handleProjectSettingsSuccess` to close the dialog after successful changes

## Key Features

- **Consistent styling**: Uses the same `variant="ghost" size="icon"` styling as other navbar buttons
- **Proper positioning**: Placed logically between IDE and Create Task buttons
- **Conditional rendering**: Only shows when `projectId` is present (same as other project-specific buttons)
- **Accessibility**: Includes proper `aria-label="Project settings"`
- **Full functionality**: Opens the complete ProjectForm with both General settings (setup/dev scripts) and Task Templates tabs

The gear icon now provides immediate access to project settings from any project page, making it much easier to find and modify setup scripts and other project configuration options!

* Perfect! The code has been formatted successfully. Prettier made a small adjustment to the import ordering - it moved the `useState` import to be with the other React imports, which follows the standard convention. The formatting is now clean and follows the project's style guidelines.

The gear icon feature is complete and properly formatted!
2025-09-03 18:54:47 +01:00
Gabriel Gordon-Hall
80058d0fb6 improve logs text wrapping; remove tooltips (#606) 2025-09-03 18:50:01 +01:00
Alex Netsch
4535149405 Find installed executors (vibe-kanban) (#610)
* feat: add availability check for coding agents and set smart defaults for new users

* Add executor discovery (vibe-kanban d65d61aa)

Plan: Add executor discovery with appropriate checks
Understanding
You're absolutely right! Checking if npx is available is useless for Opencode/Qwen since it doesn't tell us if those specific agents have been set up. We should follow the pattern used by other executors:

Binary-based executors (like Cursor): Check if the binary exists
NPX-based executors (like Claude, Gemini, Opencode, Qwen): Check for their settings files
Implementation Plan
1. Cursor executor (cursor.rs, after line 407)
Since Cursor uses a standalone binary:

async fn check_availability(&self) -> bool {
    utils::shell::resolve_executable_path("cursor-agent").is_some()
}
Import needed: Add shell::resolve_executable_path to the utils import
2. Opencode executor (opencode.rs, after line 188)
Follow the pattern of other NPX-based executors - check for settings file:

async fn check_availability(&self) -> bool {
    self.default_mcp_config_path()
        .map(|path| path.exists())
        .unwrap_or(false)
}
This will check for the opencode.json file in the appropriate location (XDG on Unix, config_dir on Windows).

3. QwenCode executor (qwen.rs, after line 140)
Same approach as other NPX-based executors:

async fn check_availability(&self) -> bool {
    self.default_mcp_config_path()
        .map(|path| path.exists())
        .unwrap_or(false)
}
This will check for ~/.qwen/settings.json.

Why this approach is correct:
Cursor: Has a specific binary that must be installed → check for binary
Opencode/Qwen: Are NPX-based like Claude/Gemini → check for settings files
Consistency: Follows the existing pattern where NPX-based executors check for settings files
Meaningful detection: Settings files indicate the agent has been configured/used before, which is what we want for "availability"
This gives us meaningful availability detection that matches the existing patterns in the codebase.

* Remove duplicated config paths (vibe-kanban 207e0410)

In  some executors, like crates/executors/src/executors/amp.rs , Paths for checking availability and mcp server are identical but not reused. We should not duplicate code. Consider changing the default availability check to just check for the mcp config

* feat: implement recommended executor profile retrieval for new users

* fmt
2025-09-03 18:14:50 +01:00
Louis Knight-Webb
5af7fc16a8 fix lightmode color (#613)
* fix lightmode color

* fmt
2025-09-03 10:56:54 +01:00
Gabriel Gordon-Hall
9908b4c2b7 fix: remove secondary variant modifier from "Create Task" button (#605)
* remove secondary variant modifier from 'Create Task' button

* follow up box buttons same size
2025-09-03 09:38:11 +01:00
Alex Netsch
5453d70b2e Easier project creation (#600)
* Easier project creation (vibe-kanban 71f2ce0b)

The current project creation screen is complicated and without any good defaults. We need to make it easier to create projects, offering existing git repos as base.

Easier project creation (vibe-kanban 71f2ce0b)

The current project creation screen is complicated and without any good defaults. We need to make it easier to create projects, offering existing git repos as base.

Easier project creation (vibe-kanban 71f2ce0b)

The current project creation screen is complicated and without any good defaults. We need to make it easier to create projects, offering existing git repos as base.

Better project creation menu (vibe-kanban 0f35d0be)

WHen creating a project from an existing repo, maybe instead of the show more with arrow in the middle we could move that to the right and have a "+ Find" sort of button to the left of it? that would then open the other thing?

Better project creation menu (vibe-kanban 0f35d0be)

WHen creating a project from an existing repo, maybe instead of the show more with arrow in the middle we could move that to the right and have a "+ Find" sort of button to the left of it? that would then open the other thing?

Better project creation menu (vibe-kanban 0f35d0be)

WHen creating a project from an existing repo, maybe instead of the show more with arrow in the middle we could move that to the right and have a "+ Find" sort of button to the left of it? that would then open the other thing?

Fix branch icon (vibe-kanban 59e0ee6e)

We added some stuff to make project creation easier in the last few commits, but now the branch icon for the selected branch goes invisible when selecting one. ![Screenshot 2025-09-01 at 15.55.57.png](.vibe-images/94bc9ba5-b6a8-4ea3-bfb1-60adeed966d7.png)

Fix branch icon (vibe-kanban 59e0ee6e)

We added some stuff to make project creation easier in the last few commits, but now the branch icon for the selected branch goes invisible when selecting one. ![Screenshot 2025-09-01 at 15.55.57.png](.vibe-images/94bc9ba5-b6a8-4ea3-bfb1-60adeed966d7.png)

Fix branch icon (vibe-kanban 59e0ee6e)

We added some stuff to make project creation easier in the last few commits, but now the branch icon for the selected branch goes invisible when selecting one. ![Screenshot 2025-09-01 at 15.55.57.png](.vibe-images/94bc9ba5-b6a8-4ea3-bfb1-60adeed966d7.png)

Fix branch icon (vibe-kanban 59e0ee6e)

We added some stuff to make project creation easier in the last few commits, but now the branch icon for the selected branch goes invisible when selecting one. ![Screenshot 2025-09-01 at 15.55.57.png](.vibe-images/94bc9ba5-b6a8-4ea3-bfb1-60adeed966d7.png)

Project creation layout (vibe-kanban 4fbf61c8)

atch the \"New Repository\" structure:\n```tsx\n{/* Display selected repository fields */}\n{selectedPath && selectedRepo && (\n  <div className=\"space-y-4\">\n    <div className=\"space-y-2\">\n      <Label htmlFor=\"base-dir\">Base Directory</Label>\n      <div className=\"flex space-x-2\">\n        <Input\n          id=\"base-dir\"\n          type=\"text\"\n          value={selectedRepo.path.substring(0, selectedRepo.path.lastIndexOf('/'))}\n          disabled\n          readOnly\n          className=\"flex-1\"\n        />\n        <Button\n          type=\"button\"\n          variant=\"ghost\"\n          size=\"icon\"\n          disabled\n          className=\"opacity-50\"\n        >\n          <Folder className=\"h-4 w-4\" />\n        </Button>\n      </div>\n    </div>\n\n    <div className=\"space-y-2\">\n      <Label htmlFor=\"repo-name\">Repository Folder Name</Label>\n      <Input\n        id=\"repo-name\"\n        type=\"text\"\n        value={selectedRepo.name}\n        disabled\n        readOnly\n      />\n    </div>\n  </div>\n)}\n```\n\n### Visual Result\n\n**Existing Repository Mode:**\n```\n[Repository Dropdown ▼] [🔍]\n\nBase Directory\n[/path/to/parent] [📁] (disabled)\n\nRepository Folder Name\n[repo-name] (disabled)\n```\n\n**New Repository Mode:**\n```\nParent Directory\n[/path/to/parent] [📁] (editable)\n\nRepository Folder Name\n[repo-name] (editable)\n```\n\n### Benefits\n\n1. **Visual Consistency**: Both modes show the same fields in the same layout\n2. **Clear Distinction**: Disabled/readonly fields for existing repos vs editable for new\n3. **Better Information**: Users can see the base directory and folder name clearly\n4. **Cleaner Design**: No need for special card styling, uses standard form fields\n5. **Intuitive**: The disabled state clearly indicates these are display-only for existing repos\n\n### Technical Notes\n\n- Use `disabled` and `readOnly` props on Input components for existing repos\n- Extract base directory using `substring` and `lastIndexOf('/')`\n- Keep the folder button disabled with `opacity-50` for visual consistency\n- Remove the help text for existing repos since fields are self-explanatory when read-only

Change tabs to align with edit (vibe-kanban 7b589225)

For project creation, the tabs for From git and blank project should have the same appearance as the tabs in edit project

Cleanup changes (vibe-kanban e498187d)

Cleanup the changes made in the last four commits. The changes are good, but there may be unsused things that didnt get cleaned up

Review changes (vibe-kanban 9a859f73)

Make sure the stuff add in the last 6 commits reuses components instead of duplicating, among others look at the tabs/collapsible stuff

Cleanup changes (vibe-kanban e498187d)

Cleanup the changes made in the last commit. The changes are good, but there may be unsused things that didnt get cleaned up, there may be things we remove that shouldve stayed, like the tabnavigation

Project creation submission (vibe-kanban e8fcfd73)

When collapsing things while creating a project, it submits the form instead of collapsing the section

fmt, cleanup

Default parent path (vibe-kanban 9be78842)

For project creation, when creating a blank vk project, we should have a deafault parent path or make it more lear the user has to select one

Default parent path (vibe-kanban 9be78842)

For project creation, when creating a blank vk project, we should have a deafault parent path or make it more lear the user has to select one

Default parent path (vibe-kanban 9be78842)

For project creation, when creating a blank vk project, we should have a deafault parent path or make it more lear the user has to select one

Default parent path (vibe-kanban 9be78842)

For project creation, when creating a blank vk project, we should have a deafault parent path or make it more lear the user has to select one

Default parent path (vibe-kanban 9be78842)

For project creation, when creating a blank vk project, we should have a deafault parent path or make it more lear the user has to select one

Default parent path (vibe-kanban 9be78842)

For project creation, when creating a blank vk project, we should have a deafault parent path or make it more lear the user has to select one

* Update Rust edition to 2024 and refactor project routes for improved clarity

fmt

* Project creation layout (vibe-kanban f726d2e6)

When creating a new project, users should see only the repo selection at first, after selecting one the rest of the options appears.

Remove script options from project creation screen (vibe-kanban 049226af)

Project creation does not need to show script options, these should only be available via edit project.

Better add project (vibe-kanban 79e936bc)

When no projects are available, we should display project creation options right away

Project creation style (vibe-kanban 91bce79b)

The styling of the project creation dialog should be unified with the rest of the project

Review (vibe-kanban 4f8f8068)

Review this PR: https://github.com/BloopAI/vibe-kanban/pull/600
The github cli should work.

Just review, no changes!

fmt

Fix changes lost in rebase

fmt

remove unused collapsible section, remove duplicate default repo path

Re-add detailed script descriptions
2025-09-03 09:27:50 +01:00
Louis Knight-Webb
af63563e17 Implement streaming for project tasks (#608)
* Stream tasks and execution processes (vibe-kanban cd4106c5)

Building on the unused /events endpoint, can we please add a /stream variant to the following endpoints:
/tasks?project_id=...
/execution_processes?task_attempt_id=...

The endpoint should return an initial document containing all the entities given the filter, and then subsequent patches to keep the document up to date.

Refactor the codebase however you see fit to give us the most maintainable code going forwards.

crates/server/src/routes/tasks.rs
crates/server/src/routes/execution_processes.rs
crates/server/src/routes/events.rs

* Issues with streaming tasks (vibe-kanban e1779942)

crates/services/src/services/events.rs
crates/server/src/routes/tasks.rs

We should modify the stream of tasks (filtered by project) to be an object where each task is a key. This will make it much easier to produce stream diffs

* Issues with streaming tasks (vibe-kanban e1779942)

crates/services/src/services/events.rs
crates/server/src/routes/tasks.rs

We should modify the stream of tasks (filtered by project) to be an object where each task is a key. This will make it much easier to produce stream diffs

* Refactor project tasks (vibe-kanban 20b19eb8)

Project tasks needs to be refactored:
- Doesn't follow new pattern of separating network logic into hooks
- Has legacy fixed time poll for refetching tasks, but there is now a tasks/stream endpoint

* revert changes to execution processes
2025-09-02 22:00:41 +01:00
Louis Knight-Webb
5ca32b50de Profile cleanup (#611)
* remove redundant boilerplate

* migrate

* clippy

* frontend fixes

* fmt

* fix

* update shared types

* fmt
2025-09-02 21:25:37 +01:00
Gabriel Gordon-Hall
f83dbd4f30 fix: resize project script text (#604)
* resize project script text and ensure consistent placeholder text styling

* remove placeholder styling from Input component
2025-09-02 12:19:16 +01:00
Louis Knight-Webb
ae17c34678 background from IDE (#603)
* background from IDE

* github link and dialog style
2025-09-02 12:18:21 +01:00
Louis Knight-Webb
6a7818e057 Profile changes (#596)
* Make variants an object rather than array (vibe-kanban 63213864)

Profile variants should be an object, with key used instead of the current label.

The code should be refactored leaving no legacy trace.

crates/server/src/routes/config.rs
crates/executors/src/profile.rs

* Make variants an object rather than array (vibe-kanban 63213864)

Profile variants should be an object, with key used instead of the current label.

The code should be refactored leaving no legacy trace.

crates/server/src/routes/config.rs
crates/executors/src/profile.rs

* Remove the command builder from profiles (vibe-kanban d30abc92)

It should no longer be possible to customise the command builder in profiles.json.

Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct.

crates/executors/src/profile.rs
crates/executors/src/executors/claude.rs

* fmt

* Refactor Qwen log normalization (vibe-kanban 076fdb3f)

Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable.

A similar example exists in Amp, where we use Claude's log normalization.

crates/executors/src/executors/amp.rs
crates/executors/src/executors/qwen.rs
crates/executors/src/executors/claude.rs

* Add field overrides to executors (vibe-kanban cc3323a4)

We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder

* Update profiles (vibe-kanban e7545ab6)

Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality.

* Yolo mode becomes a field (vibe-kanban d8dd02f0)

Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field

* Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f)

Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console)

crates/executors/src/executors/claude.rs

* Remove mcp_config_path from profile config (vibe-kanban 6c1e5947)

crates/executors/src/profile.rs

* One profile per executor (vibe-kanban b0adc27e)

Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor.

The new format should be something like:

```json
{
  "profiles": {
    "CLAUDE_CODE": {
      "default": {
        "plan": false,
        "dangerously_skip_permissions": true,
        "append_prompt": null
      },
      "plan": {
        "plan": true,
        "dangerously_skip_permissions": false,
        "append_prompt": null
      }
    }
  }
}
```

Each profile's defaults should be defined as code instead of in default_profiles.json

profile.json will now contain:
- Overrides for default configurations
- Additional user defined configurations, for executors

It is not possible to remove a default configuration entirely, just override the configuration.

The user profile.json should still be a minimal set of overrides, to make upgrading easy.

Don't worry about migration, this will be done manually.

crates/executors/default_profiles.json
crates/executors/src/profile.rs

* SCREAMING_SNAKE_CASE

* update profile.rs

* config migration

* fmt

* delete binding

* config keys

* fmt

* shared types

* Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c)

crates/executors/src/profile.rs save_overrides

* rename default profiles

* remove defaulted executor fields

* backwards compatability

* fix legacy variants
2025-09-01 23:33:15 +01:00
Louis Knight-Webb
a10d3f0854 Louis/hooks (#599)
* Update useDevServer to use tanstack (vibe-kanban a5e7cb20)

We are migrating the frontend to use Tanstack query. We should make radical changes in order to improve readability and performance.

See an example in frontend/src/hooks/useRebase.ts

Please plan how to modernise the frontend/src/hooks/useDevServer.ts hook

* Deprecate useExecutionProcesses → Replace with useAttemptExecution (vibe-kanban 5123ff1e)
2025-09-01 17:17:48 +01:00
Louis Knight-Webb
13fceaf77e Add a big banner above the navbar if the frontend is running in dev mode (vibe-kanban) (#595)
* Perfect! I've successfully added a big banner above the navbar that appears when the frontend is running in dev mode. Here's what I implemented:
## Changes Made:
1. **Created a new `DevBanner` component** (`frontend/src/components/DevBanner.tsx`):
   - Only renders when `import.meta.env.MODE === 'development'`
   - Features an orange background with white text and an alert triangle icon
   - Displays "Development Mode - This is a development build"
2. **Updated `App.tsx`** to include the banner:
   - Added the import for the DevBanner component
   - Positioned the banner above the navbar with the same conditional rendering logic
## Key Features:
- **Conditional Rendering**: The banner only appears in development mode using Vite's `import.meta.env.MODE`
- **Prominent Styling**: Orange background with white text and an alert icon for high visibility
- **Proper Positioning**: Appears above the navbar but below other UI elements
- **Consistent with Existing Code**: Uses the same dev mode detection pattern already used in the codebase
The banner will now be clearly visible to developers whenever they run the frontend in development mode, helping them distinguish between development and production builds. The implementation passed TypeScript type checking and follows the existing code patterns in the project.

* Cleanup script changes for task attempt 5ec194cd-4a78-4b25-a7b7-66ad1b366431
2025-08-29 17:56:47 +01:00
Louis Knight-Webb
5505a387bc Add duplicate task button (vibe-kanban) (#593)
* ##  Implementation Complete!

I've successfully implemented the duplicate task feature. Here's what was accomplished:

### **Changes Made:**

1. **TaskDialogContext (`frontend/src/contexts/task-dialog-context.tsx`)**
   - Added `initialTask: Task | null` to dialog state
   - Created `openDuplicate(task, options)` method that opens create dialog with initial data
   - Updated all existing methods to include initialTask field

2. **TaskFormDialog (`frontend/src/components/tasks/TaskFormDialog.tsx`)**
   - Added `initialTask?: Task | null` prop
   - Enhanced prefill logic with priority: Edit → Duplicate → Template → Empty
   - Duplicated tasks reset status to 'todo' and start with no images

3. **TaskCard (`frontend/src/components/tasks/TaskCard.tsx`)**
   - Added Copy icon import
   - Added `onDuplicate?: (task: Task) => void` prop
   - Added "Duplicate" menu item with Copy icon between Edit and Delete

4. **TaskKanbanBoard (`frontend/src/components/tasks/TaskKanbanBoard.tsx`)**
   - Added `onDuplicateTask?: (task: Task) => void` prop
   - Passed duplicate handler through to TaskCard components

5. **ProjectTasks (`frontend/src/pages/project-tasks.tsx`)**
   - Added `openDuplicate` to useTaskDialog destructuring
   - Created `handleDuplicateTask` function
   - Passed duplicate handler to TaskKanbanBoard

6. **TaskFormDialogContainer (`frontend/src/components/tasks/TaskFormDialogContainer.tsx`)**
   - Added `initialTask={dialogState.initialTask}` prop to TaskFormDialog

### **How It Works:**

1. **User clicks** the "⋯" menu on any task card
2. **Sees "Duplicate"** option with copy icon between Edit and Delete
3. **Clicks Duplicate** → opens create task dialog with:
   - Title and description pre-filled from original task
   - Status reset to 'todo'
   - No images (clean slate)
   - User can modify and create as normal

### **Key Design Decisions:**
- **Treated as create mode** (not edit) - follows Oracle's recommendation
- **Status always resets to 'todo'** for duplicated tasks
- **No images copied** - simple and safe approach
- **Clean integration** with existing template system

The implementation passes all TypeScript checks and follows the existing codebase patterns. The feature is ready to use!

* Cleanup script changes for task attempt 16b21999-278c-414d-aaab-ae5767d42d77
2025-08-29 15:18:42 +01:00
Louis Knight-Webb
33c2c4ff9f style fixes (#592) 2025-08-29 13:42:46 +01:00
Louis Knight-Webb
58a29c1cc2 Onboarding tweaks (#589)
* onboarding improvements

* fmt

* css
2025-08-29 11:53:18 +01:00
Louis Knight-Webb
faa52e8002 Input style (#588)
* input style

* button styling

* fmt
2025-08-29 00:31:29 +01:00
Louis Knight-Webb
b42986a55f Amp now supports parsing logs in the same way as Claude (vibe-kanban) (#564)
* Perfect! All tests are now passing. Let me create a summary of what was accomplished:

##  Implementation Complete

**Successfully migrated Amp to use Claude's log normalization while maintaining the Amp executor:**

### Changes Made:

1. **Profile Update** ([`default_profiles.json`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-4b7b-amp-now-su/crates/executors/default_profiles.json#L55-L67))
   -  Updated to `@sourcegraph/amp@latest`  
   -  Replaced `--format=jsonl` with `--stream-json`

2. **Shared Log Processor** ([`claude.rs`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-4b7b-amp-now-su/crates/executors/src/executors/claude.rs#L154-L168))
   -  Made `ClaudeLogProcessor` struct and `process_logs` method `pub`
   -  Removed unused executor parameter from `process_logs`
   -  Updated Claude executor call site

3. **Amp Executor Simplification** ([`amp.rs`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-4b7b-amp-now-su/crates/executors/src/executors/amp.rs#L101-L109))
   -  Replaced entire `normalize_logs` implementation with shared `ClaudeLogProcessor`
   -  Deleted 400+ lines of Amp-specific JSON parsing code
   -  Kept spawn/follow-up logic intact (preserving `threads continue` functionality)

4. **Test Updates** ([`profile.rs`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-4b7b-amp-now-su/crates/executors/src/profile.rs#L210-L211))
   -  Updated test assertions for new Amp profile configuration

### Benefits Achieved:

- ** No Code Duplication**: Single source of truth for stream JSON log normalization
- ** 100% Claude Compatibility**: Amp now uses identical log parsing as Claude  
- ** Preserved Functionality**: All spawn/follow-up logic maintained
- ** No Breaking Changes**: Existing Amp executor structure preserved
- ** Passing Tests**: All 48 tests pass successfully
- ** Clean Build**: No compilation errors, only benign warnings

**Amp now supports parsing logs in the same way as Claude with shared log normalization! 🎉**

* Cleanup script changes for task attempt 4b7b3780-24e9-40e5-b52b-5bd86c37257e

* ## Corrected Plan

You're absolutely right - I overcomplicated this! The Oracle confirmed my analysis:

### **Root Cause**
The error `--stream-json flag requires --execute mode` was simply because the Amp profile was missing the `--execute` flag, not because of how we pass prompts.

### **Correct Fix**
1. ** Keep the profile change**: Already added `--execute` flag to [`default_profiles.json`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-4b7b-amp-now-su/crates/executors/default_profiles.json#L60)

2. **🔄 Revert executor changes**: Restore the original stdin-based approach in [`amp.rs`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-4b7b-amp-now-su/crates/executors/src/executors/amp.rs#L25-47) since both methods work with `--execute`

3. ** Keep shared log normalization**: All the Claude log processor sharing remains unchanged

### **Why This Works**
According to Amp docs, `--execute` supports both:
- `echo "prompt" | amp --execute --stream-json` (current approach)
- `amp --execute "prompt" --stream-json` (what I tried to implement)

Since our current stdin approach works fine with `--execute`, I just need to:
- Revert the spawn method to use stdin (like it was originally)
- Keep the `--execute` flag in the profile
- Keep all the log normalization improvements

**Ready to proceed with this minimal fix?**

* Cleanup script changes for task attempt 4b7b3780-24e9-40e5-b52b-5bd86c37257e

* ##  Fix Complete

**Successfully resolved the `--stream-json flag requires --execute mode` error with a minimal fix:**

### **Changes Made:**

1. ** Profile Fix** ([`default_profiles.json`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-4b7b-amp-now-su/crates/executors/default_profiles.json#L60))
   - Added `--execute` flag to Amp profile parameters

2. ** Restored Stdin Approach** ([`amp.rs`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-4b7b-amp-now-su/crates/executors/src/executors/amp.rs#L25-53))
   - Reverted to original stdin-based prompt feeding
   - Removed unnecessary command-line argument approach

3. ** Updated Tests** ([`profile.rs`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-4b7b-amp-now-su/crates/executors/src/profile.rs#L210-212))
   - Added assertion for `--execute` flag in profile tests

### **Final Configuration:**
```json
"AMP": {
  "command": {
    "base": "npx -y @sourcegraph/amp@latest",
    "params": [
      "--execute",
      "--stream-json", 
      "--dangerously-allow-all"
    ]
  }
}
```

### **Result:**
- ** Error Resolved**: The `--stream-json flag requires --execute mode` error should now be fixed
- ** Shared Log Normalization**: Amp still uses Claude's log processor (no code duplication)
- ** All Tests Pass**: 48/48 tests passing
- ** Clean Build**: No compilation errors

**Amp now properly supports `--stream-json` with shared Claude-compatible log normalization! 🎉**

* pin working version

* Parse AMP tools

* Merge main

* Restore AMP threads message deduplication

* rollback DiffChangeKind

* lint

---------

Co-authored-by: Solomon <abcpro11051@disroot.org>
2025-08-28 23:17:37 +01:00
Louis Knight-Webb
88d538eeca **Task completed successfully!** (#587)
**Changes made:**
- Added `ExternalLink` import to [DiffCard.tsx](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-0f32-replace-th/frontend/src/components/DiffCard.tsx#L17)
- Replaced the custom SVG (14 lines) with `<ExternalLink className="h-3 w-3" aria-hidden />`

**Verification:**
- TypeScript compilation passes 
- Rust compilation passes 
- No breaking changes to existing functionality

The custom SVG has been successfully replaced with lucide's `ExternalLink` icon, maintaining the same semantic meaning while using a standard icon library component.
2025-08-28 22:06:00 +01:00
Louis Knight-Webb
a6abcadf2d Display notes after the version has changed (vibe-kanban) (#585)
* Perfect! The implementation is complete and working. Here's a summary of what was implemented:

##  Implementation Complete

**Automatic NPX Version Upgrade Detection with Release Notes Display**

### Backend Changes:
- **Version Constant**: Created [`utils::version::APP_VERSION`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-349d-display-no/crates/utils/src/version.rs) using `env!("CARGO_PKG_VERSION")`
- **Config Schema v5**: Added `last_app_version: Option<String>` and `show_release_notes: bool` fields
- **Version Detection**: Added logic in [`LocalDeployment::new()`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-349d-display-no/crates/local-deployment/src/lib.rs#L44-L67) to detect version changes on every startup
- **Smart Upgrade Logic**: Only shows release notes for upgrades (not first installations)

### Frontend Changes:
- **ReleaseNotesDialog**: Created maximized dialog with sandboxed iframe showing https://vibekanban.com/release-notes
- **Security**: Added `sandbox="allow-same-origin allow-popups"` and `referrerPolicy="no-referrer"`
- **Onboarding Integration**: Shows after privacy opt-in and GitHub login, only for users who have completed onboarding
- **Dismiss Handler**: Saves `show_release_notes: false` to prevent re-display

### Key Features:
 **One-time display** per version upgrade
 **Persists through reinstalls** and config migrations
 **Skips first-time users** (only shows for upgrades)
 **Secure iframe** with proper sandboxing
 **Perfect viewport fit** with always-visible CTA button
 **Integrated onboarding flow** after GitHub login and privacy opt-in

The feature is now ready and will automatically show release notes exactly once when users upgrade to a new version via NPX!

* ##  Short-term Fix Complete!

**Successfully implemented the iframe security fix with enhanced error handling:**

### **Security Improvements**
- **Updated sandbox**: Changed from `"allow-same-origin allow-popups"` to `"allow-scripts allow-popups"`
- **Removed `allow-same-origin`**: Creates "opaque origin" isolation, preventing XSS from escaping the iframe
- **Kept `referrerPolicy="no-referrer"`**: Maintains privacy by not leaking app origin

### **Enhanced User Experience**
- **Error handling**: Added `onError` and `onLoad` handlers to detect iframe loading failures
- **Fallback UI**: Shows helpful error message with "Open in Browser" option when iframe fails
- **Dual CTA buttons**:
  - "Open in Browser" for external viewing
  - "Continue to Vibe Kanban" to dismiss and proceed
- **Loading timeout**: 5-second timeout to detect content loading issues

### **Technical Implementation**
- **Security-conscious**: Scripts can execute but are isolated from parent window
- **Robust fallbacks**: Multiple failure modes handled gracefully
- **User-friendly**: Clear messaging and alternative access methods
- **Type-safe**: Full TypeScript implementation with proper event handling

The release notes dialog will now:
1. **First attempt**: Load the SPA with scripts enabled in isolated iframe
2. **If that fails**: Show fallback UI with browser redirect option
3. **Always provide**: Easy access to view in external browser

This fix resolves the "Blocked script execution" error while maintaining strong security boundaries! 🛡️

* ##  localStorage Fix Complete!

**Successfully resolved the SecurityError by restoring `allow-same-origin` to the iframe sandbox.**

### **Final Security Configuration:**
```html
<iframe
  sandbox="allow-scripts allow-same-origin allow-popups"
  referrerPolicy="no-referrer"
  src="https://vibekanban.com/release-notes"
/>
```

### **Security Analysis:**
 **Balanced approach**: Allows SPA functionality while maintaining reasonable security
 **Still sandboxed**: No top navigation, forms, or plugins allowed
 **XSS containment**: Any XSS limited to iframe origin (vibekanban.com)
 **Desktop isolation**: Cannot access parent window due to cross-origin boundaries
 **Privacy protected**: `referrerPolicy="no-referrer"` prevents origin leaking

### **What Works Now:**
-  Release notes SPA loads and functions properly
-  localStorage access works for React state management
-  Error handling and fallback UI still intact
-  "Open in Browser" option available
-  All builds and type checks pass

### **Risk Assessment:**
**Acceptable** because:
- First-party content (vibekanban.com - same project)
- Shown only once per version upgrade
- Desktop app has hardened Electron/Tauri settings
- Robust fallback mechanisms in place

The release notes dialog is now fully functional and will display properly when users upgrade to new versions! 🎉

* ##  Dialog Layout Improvements Complete!

**Successfully enhanced the release notes dialog with better size and cleaner UX:**

### **Size Improvements:**
- **More vertical space**: Changed from `max-h-[calc(100dvh-2rem)]` to `max-h-[calc(100dvh-1rem)]` (50% more margin removed)
- **Wider dialog**: Changed from `w-full` to `w-[95vw] max-w-7xl` (slightly wider, responsive on all screens)
- **Better content area**: Changed from `min-h-0 px-6` to `overflow-hidden p-4` for optimal iframe display

### **Button Cleanup:**
- **Removed duplicate**: Eliminated "Continue to Vibe Kanban" button
- **Single close action**: Only X button in header (universally recognized)
- **Clear secondary action**: "Open in Browser" stays as optional functionality
- **No confusion**: One way to dismiss, one way to open externally

### **Visual Polish:**
- **Professional borders**: Added `border-b` and `border-t` for clean section separation
- **Consistent padding**: Reduced from `p-6` to `p-4` for better content/chrome ratio
- **Desktop rounded corners**: Added `sm:rounded-lg` for polished desktop appearance
- **Accessibility**: Added `aria-label="Close"` to X button

### **Technical Improvements:**
-  All TypeScript checks pass
-  Frontend builds successfully
-  Maintains responsive design
-  Preserves error handling and fallback UI
-  Grid layout optimized for maximum content visibility

**Result**: The release notes dialog now provides maximum reading space while maintaining clean, intuitive UX with no duplicate functionality! 🎯

* ##  Dialog Layout Fix Complete!

**Successfully fixed the iframe spillage by following proper shadcn/ui Dialog patterns:**

### **Root Issue Resolved:**
- **Problem**: Applied sizing constraints to `DialogContent` when they should go on the container
- **Cause**: shadcn/ui Dialog has a container layer that owns size limits
- **Solution**: Restructured layout using proper flex patterns from existing codebase

### **Key Changes Made:**
1. **Proper flex layout**: Changed from `grid grid-rows-[auto_1fr_auto]` to `flex flex-col`
2. **Correct sizing scope**: Applied `max-w-7xl max-h-[calc(100dvh-1rem)]` to `DialogContent` (container level)
3. **Iframe flex sizing**: Changed from `w-full h-full` to `flex-1 w-full` to properly fill available space
4. **Header/Footer**: Used `flex-shrink-0` to prevent compression
5. **Error state**: Applied `flex-1` to error display for proper centering

### **Layout Structure Now:**
```jsx
<DialogContent className="flex flex-col w-full h-full max-w-7xl max-h-[calc(100dvh-1rem)] p-0">
  <DialogHeader className="flex-shrink-0">     {/* Fixed header */}
  <iframe className="flex-1 w-full">          {/* Growing content */}
  <DialogFooter className="flex-shrink-0">    {/* Fixed footer */}
```

### **Benefits:**
-  **No spillage**: Iframe stays properly contained within dialog boundaries
-  **Maximized space**: Uses calc(100dvh-1rem) for nearly full-height viewing
-  **Responsive**: Works on all screen sizes with proper flex behavior
-  **Clean layout**: Header and footer fixed, content area flexible
-  **Proper patterns**: Follows established codebase conventions

The release notes dialog now displays properly with the iframe contained within the dialog boundaries! 🎯

* ##  Duplicate X Button Fixed!

**Successfully removed the duplicate close button:**

### **Changes Made:**
1. **Removed manual X button**: Eliminated the custom Button with X icon I added to DialogHeader
2. **Simplified header**: DialogHeader now only contains the DialogTitle
3. **Enabled built-in close**: Changed `onOpenChange={() => {}}` to `onOpenChange={(open) => !open && onClose()}`
4. **Cleaned imports**: Removed unused `X` import from lucide-react

### **Result:**
-  **Single close button**: Only shadcn/ui's built-in X button in the top-right corner
-  **Proper close functionality**: ESC key and X button both work correctly
-  **Cleaner header**: Just the title, no cluttered layout
-  **Consistent with patterns**: Follows shadcn/ui conventions

### **Current Dialog Structure:**
```jsx
<Dialog open={open} onOpenChange={(open) => !open && onClose()}>
  <DialogContent>
    <DialogHeader>                    {/* Clean title only */}
    <iframe className="flex-1">      {/* Full content area */}
    <DialogFooter>                    {/* "Open in Browser" only */}
```

The dialog now has a single, intuitive close button and maintains clean UX! 🎯

* copy, height

* fmt

* ##  Code Simplification Complete!

**Successfully simplified the redundant config saving logic:**

### **Before (Redundant):**
```rust
if config_changed {
    save_config_to_file(&raw_config, &config_path()).await?;
} else {
    // Save immediately as it may have just been migrated
    save_config_to_file(&raw_config, &config_path()).await?;
}
```

### **After (Clean):**
```rust
// Always save config (may have been migrated or version updated)
save_config_to_file(&raw_config, &config_path()).await?;
```

### **Improvements Made:**
1. **Removed redundancy**: Eliminated identical `save_config_to_file` calls in both branches
2. **Simplified logic**: No need to track `config_changed` since we always save
3. **Cleaner code**: Single clear statement with descriptive comment
4. **Same functionality**: Config still gets saved for migrations and version updates

### **Why This Works:**
- **Migration case**: Config loaded from old version gets saved as v5
- **Version change case**: Config gets updated with new version info and saved
- **No change case**: Config still needs saving to ensure consistency
- **Result**: Always saving is the correct behavior, so the branching was unnecessary

The code is now cleaner and more maintainable while preserving the exact same functionality! 🧹
2025-08-28 21:35:04 +01:00
Louis Knight-Webb
1a1add7618 Louis/theme cleanup (#582)
* lightmode

* diagonal bg

* contrast

* diffs

* colors

* fix darkmode

* lint
2025-08-28 16:34:55 +01:00
Solomon
5538d4bbca Display tool call arguments and results for misc/mcp tools and bash commands (#563) 2025-08-28 09:43:59 +01:00
Louis Knight-Webb
9e286b61e5 Overhaul UI (#577)
* font

* flat ui

* burger menu

* button styles

* drag effects

* search

* Improve

* navbar

* task details header WIP

* task attempt window actions

* task details

* split out title description component

* follow up

* better board spacing

* Incrementally use tanstack (vibe-kanban 0c34261d)

Let's refactor the codebase to remove:
@frontend/src/components/context/TaskDetailsContextProvider.tsx
@frontend/src/components/context/TaskDetailsContextProvider.ts

Instead, we want to use @tanstack/react-query

* task attempt header info

* ui for dropdown

* optionally disable

* Create hook for attempt actions (vibe-kanban 651551d9)

- Start dev server
- Rebase
- Create PR
- Merge

These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts

Their usage in two places should be standardised:
- frontend/src/components/tasks/AttemptHeaderCard.tsx
- frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx

* dropdown positioning

* color

* soften colours

* add new task button

* editor dialog via hook

* project provider

* fmt

* lint

* follow up styling

* break words

* card styles

* Stop executions from follow up (vibe-kanban e2a2c75b)

The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt'

frontend/src/components/tasks/TaskFollowUpSection.tsx

You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx

Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts

What about making the hook more generic, to cover start/stop and status retrieval.

We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts

* Make sure the kanban columns are always at least full height (vibe-kanban 220cb780)

There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png)

frontend/src/pages/project-tasks.tsx

* Display diff summary (vibe-kanban f1736551)

If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab.

We should also add an icon button to open the task attempt in full screen and at the diff tab.

frontend/src/components/tasks/AttemptHeaderCard.tsx
frontend/src/components/tasks/TaskDetails/DiffTab.tsx

* styles

* projects

* full screen max width

* full screen actions

* remove log

* style improve

* create new attempt

* darkmode

* scroll diffs

* Refactor useCreatePR (vibe-kanban e6b76f10)

The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality.

We should then update TaskDetailsPanel to make the 'create pr' button real.

frontend/src/hooks/useOpenInEditor.ts
frontend/src/hooks/useCreatePR.ts
frontend/src/components/tasks/TaskDetailsPanel.tsx

* Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f)

Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx

* project name

* Change ?view=full to /full (vibe-kanban a25483a6)

* Hide TaskDetailsHeader (vibe-kanban b73697bd)

If the app is running inside of VS Code

* copy

* Add button to open repo (vibe-kanban e447df94)

Open repo in IDE button in the navbar, next to create task button

* style process cards

* Errors not displayed properly (vibe-kanban fb65eb03)

frontend/src/components/tasks/TaskDetailsToolbar.tsx

Errors are currently failing silently on actions like merge and rebase

* fmt

* fix

* fix border
2025-08-27 23:59:26 +01:00
Alex Netsch
5d8a209785 Fix/remote base branches (#557)
* fix remote branch detection and worktree interactions

Refactor GitService to improve remote handling and branch management

fix: update branch selection logic to include all branches and improve condition checks

* Clippy, fmt

* Fix branch upstream setting in GitService to handle non-remote branches

* Remove force push from refspec in GitService to prevent non-fast-forward updates

* Add error handling for diverged branches in GitService

* Fix base-branch normalization robust for PRs

---------

Co-authored-by: Solomon <abcpro11051@disroot.org>
2025-08-26 18:09:47 +01:00
Louis Knight-Webb
5bd55cb6e2 fix overflow (#571)
* fix overflow

* fmt
2025-08-23 10:50:45 -07:00
Gabriel Gordon-Hall
37e401fb0f feat: full screen task attempt view (#553)
* full screen task attempt view

* fix tsc errors

* remove padding

* Full screen view improvements (#568)

* delete FullscreenHeaderContext.tsx

* add fullscreen responsive layout

* full screen props

* cleanup fullscreen

* fmt

* task status

* task actions

* simplify toolbar

* reset CurrentAttempt

* buttons

* Truncate properly branch name

* fmt

* polish

* fmt

---------

Co-authored-by: Louis Knight-Webb <louis@bloop.ai>
2025-08-23 09:39:42 -07:00
Solomon
3d6013ba32 vscode: Fix a list of issues with copy/paste/undo/redo (#554)
- Pasted content wasn't treated as nomral input. It didn't activate the send button and wasn't sent in followup unse user typed other things.
- Copy on click of worktree path didn't work.
- Cmd/Ctrl-Z didn't undo/redo
- Added "Add to vibe-kanban" action which adds the vscode editor selection to vibe-kanbans input box.
2025-08-22 15:10:23 +01:00
Solomon
c0808a6d76 Improve diff display for New, Deleted, and renamed files in Diffs tab (#552) 2025-08-21 17:47:42 +01:00
Alex Netsch
ed594a3d80 Allow multiple merges (#510)
* Allow multiple merge for a single task attempt

Merge more than once (vibe-kanban 618829fc)

When creating a PR, new changes can be pushed after creation.
We need merge to work the same way, when changes have been made after the first merge, a second one should work.

Commit changes from coding agent for task attempt 548ff450-df77-47b2-a5ba-c88d0aa4a334

Merge more than once (vibe-kanban 618829fc)

When creating a PR, new changes can be pushed after creation.
We need merge to work the same way, when changes have been made after the first merge, a second one should work.

Remove pinned todo list (vibe-kanban cc66cda2)

Make a minimal change to remove the pinned todo list from the frontend

Remove pinned todo list (vibe-kanban cc66cda2)

Make a minimal change to remove the pinned todo list from the frontend

* Create merges table; remove task_attempt.merge_commit

Add merge model, replace ta.merge_commit with m.merge_commit

Fix frontend

* Move PR to merges table

* Refactor GitHub repository info retrieval to return structured data

* Fix frontend

* Reset task branch after PR merge

Add branch status handling to TaskDetailsProvider and related components

fmt

Add branch status handling to TaskDetailsProvider and related components

fmt

Test (vibe-kanban 1bf1a80f)

add test.txt

Show merged diff when no worktree present

Refresh branch status after PR creation

Test (vibe-kanban 1bf1a80f)

add test.txt

Test (vibe-kanban 1bf1a80f)

add test.txt

Show rebase when behind

Refactor container service to check if the container is clean before showing merged diff; remove unused BranchStatus import

Test (vibe-kanban a3c1b297)

add test.txt

Refactor branch status handling: rename BranchStatusResponse to BranchStatus and update related types and usages

Test (vibe-kanban) (#540)

* Remove test.txt

* Test (vibe-kanban aade357e)

add test.txt

* test.txt removed.

* Fix diff when merged and new commits have been made

* Remvoe logging (vibe-kanban) (#541)

* Test (vibe-kanban aade357e)

add test.txt

* Test (vibe-kanban aade357e)

add test.txt

* Perfect! I've successfully removed the "Fetching branch status" logging statement from the code. The logging has been removed from `crates/server/src/routes/task_attempts.rs:568-571`.

* Clear previous errors on successful PR creation, push, merge, and rebase actions

* Show branch in worktree dirty error message

* Add success indicators for push and merge actions in CurrentAttempt

* Refactor status display logic in CurrentAttempt for improved readability and maintainability

* Add target_branch_name to merge models and queries for direct and PR merges

* Enhance merge status display logic in CurrentAttempt for better clarity on direct merges

* Remove unnecessary condition check in attempt data fetching interval

* Clippy

* Add index for task_attempt_id in merges table to improve query performance

* Pass PR creation error

* Disable buttons (vibe-kanban 240346bf)

Instead of not showing the merge/pr buttons when theyre not available we should disable them. frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx
2025-08-21 16:00:35 +01:00
Solomon
061b461397 Remember exmpanded state of log entries idiomatically (#547) 2025-08-21 14:34:12 +01:00
Gabriel Gordon-Hall
b35073ae77 reload state on sign in (#539) 2025-08-20 16:27:52 +01:00
Louis Knight-Webb
6fb7b939d9 Don't let user close browser window if they have unsaved changes (vibe-kanban) (#538)
* Perfect! The implementation is complete and passes all checks. 

## Summary

Added browser window close protection to prevent data loss when users have unsaved changes in the task dialog:

- **Added `beforeunload` event listener** in [`TaskFormDialog.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-f59b-don-t-let/frontend/src/components/tasks/TaskFormDialog.tsx#L95-L111)
- **Integrates with existing `hasUnsavedChanges()` logic** - no duplication
- **Only active when dialog is open AND has unsaved content** 
- **Automatic cleanup** when dialog closes or changes are saved
- **Browser-standard confirmation dialog** appears when user tries to close tab/window

The feature now protects against data loss from both dialog close (existing) and browser window close (new) scenarios.

* Cleanup script changes for task attempt f59bea00-6158-4cdd-ad19-1f30e40c1324

* Perfect! Now the browser window close protection works for both scenarios:

## Updated Implementation

**Create mode:** Warns when user has entered title or description content
**Edit mode:** Warns when user has modified title, description, or status from original values

The `beforeunload` event will now trigger when:
- **Creating a task** and typing content, then trying to close browser
- **Editing a task** and changing any field, then trying to close browser

Both the existing dialog close warning and new browser window close warning now protect against data loss in all editing scenarios.

* Cleanup script changes for task attempt f59bea00-6158-4cdd-ad19-1f30e40c1324
2025-08-20 15:44:38 +01:00
Louis Knight-Webb
e99f9807fb Collapse files in diff view (vibe-kanban) (#531)
* Perfect! The collapse functionality has been successfully implemented. Here's what was added:

## Summary of Changes

**DiffCard.tsx:**
- Added `isCollapsed` and `onToggle` props
- Made the header clickable with hover effects
- Added a rotating chevron icon to indicate collapse state
- Only renders `DiffView` when not collapsed (performance optimization)
- Added accessibility attributes and keyboard support
- Prevented event bubbling on the "Open in IDE" button

**DiffTab.tsx:**
- Added `Set<string>` state to track collapsed files using stable file path identifiers
- Added toggle logic with proper React state management
- Added a sticky "Collapse All" / "Expand All" button with tri-state logic
- Connected collapse state to each DiffCard

The implementation follows all the Oracle's recommendations:
- Uses `Set<string>` with stable identifiers (file paths)
- Keeps state centralized in DiffTab
- Only renders DiffView when expanded for better performance
- Provides accessible clickable headers with proper ARIA attributes
- Includes keyboard support for toggling

The type checking and build process completed successfully with no errors related to our changes.

* Cleanup script changes for task attempt 9592ba9e-ff81-483b-b0f4-14bdf6461e24

* Done! The Collapse All button is now using the "xs" size.

* Perfect! The high-level stats display has been successfully implemented. Here's what was added:

## Summary of Changes

**Enhanced the sticky header to show:**
- **Files changed**: Shows count with proper singular/plural handling ("1 file" vs "3 files")
- **Total additions**: Green `+45` style matching existing DiffCard styling  
- **Total deletions**: Red `-12` style matching existing DiffCard styling
- **Collapse All button**: Positioned on the right with proper spacing

**Key Features:**
- **Efficient calculation**: Extended existing `useMemo` to calculate both files and totals in a single pass
- **Proper edge case handling**: Handles undefined `additionLength`/`deletionLength` values
- **Consistent styling**: Uses same CSS variables as individual file stats (`--console-success`, `--console-error`)
- **Responsive layout**: Flexbox with proper gap and shrink controls
- **Accessibility**: Added `aria-live="polite"` for screen reader updates
- **Performance**: Only recalculates when diffs change, not on every render

The implementation follows all Oracle recommendations and maintains consistency with the existing codebase design patterns. The type checking passed successfully with no errors.

* Cleanup script changes for task attempt 9592ba9e-ff81-483b-b0f4-14bdf6461e24
2025-08-20 12:21:11 +01:00
Gabriel Gordon-Hall
d55b7165f2 feat: upload images to tasks (#500)
* upload images to tasks

* dislpay image path as markdown; remove redundant code; add cleanup

* support svg

* remove unused

* copy images into worktree directories

* shared

* address review

* fmt
2025-08-20 11:54:32 +01:00
Louis Knight-Webb
1caa5ce1d8 Skip running cleanup script if no changes (vibe-kanban) (#523)
* ## Implementation Complete 

I've successfully implemented the feature to skip running cleanup scripts when no changes are made during coding agent execution.

### **Changes Made**

1. **Modified [`GitService::commit()`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-92b8-skip-runni/crates/services/src/services/git.rs#L174-L218)**:
   - Changed return type from `Result<(), GitServiceError>` to `Result<bool, GitServiceError>`
   - Returns `Ok(false)` when no changes to commit
   - Returns `Ok(true)` when changes are committed

2. **Updated [`Container` trait](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-92b8-skip-runni/crates/services/src/services/container.rs#L125)**:
   - Changed `try_commit_changes()` signature to return `Result<bool, ContainerError>`

3. **Updated [`LocalContainerService`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-92b8-skip-runni/crates/local-deployment/src/container.rs#L889-L954)**:
   - Modified implementation to propagate commit feedback
   - Returns `false` for non-commit operations, `true`/`false` based on git changes

4. **Enhanced [execution monitor logic](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-92b8-skip-runni/crates/local-deployment/src/container.rs#L335-L374)**:
   - Conditionally calls `try_start_next_action()` based on whether changes were committed
   - Skips cleanup script when coding agent made no changes
   - Preserves existing behavior for setup scripts (always proceed to coding agent)
   - Added informative logging when cleanup is skipped

### **Behavior**

**Before:**
```
CodingAgent (no changes) → try_commit_changes() → CleanupScript (always runs)
```

**After:**
```
CodingAgent (no changes) → try_commit_changes() returns false → Skip CleanupScript 
CodingAgent (has changes) → try_commit_changes() returns true → CleanupScript runs 
```

### **Safety Features**
- **Conservative error handling**: Commit failures are treated as "changes made" to ensure cleanup runs
- **Preserved workflows**: Setup scripts always proceed to coding agent (unchanged)
- **Informative logging**: Clear indication when cleanup is skipped
- **Type safety**: Compiler enforces correct return types throughout the call chain

### **Verification**
-  Code compiles successfully 
-  All existing tests pass (47/47)
-  Type checker passes
-  No breaking changes to other parts of the codebase

The implementation is complete and ready for use!

* Cleanup script changes for task attempt 92b80e80-dbc1-470c-a3c8-172c38549b61

* Cleanup script changes for task attempt 92b80e80-dbc1-470c-a3c8-172c38549b61

* ## Task Status Fix Complete 

I've successfully fixed the issue where tasks weren't transitioning from `InProgress` to `InReview` when cleanup scripts are skipped.

### **Changes Made**

1. **Created [`finalize_task()` helper method](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-92b8-skip-runni/crates/local-deployment/src/container.rs#L116-L128)**:
   ```rust
   async fn finalize_task(
       db: &DBService,
       config: &Arc<RwLock<Config>>, 
       ctx: &ExecutionContext,
   ) {
       // Updates task status to InReview
       // Sends notifications via NotificationService
   }
   ```

2. **Added manual finalization when skipping cleanup** ([lines 389-391](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-92b8-skip-runni/crates/local-deployment/src/container.rs#L389-L391)):
   ```rust
   } else {
       tracing::info!("Skipping cleanup script - no changes made by coding agent");
       // Manually finalize task since we're bypassing normal execution flow
       Self::finalize_task(&db, &config, &ctx).await;
   }
   ```

3. **Refactored existing finalization** to use the helper method ([line 395](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-92b8-skip-runni/crates/local-deployment/src/container.rs#L395-L397)):
   ```rust
   if Self::should_finalize(&ctx) {
       Self::finalize_task(&db, &config, &ctx).await;
   }
   ```

### **Fixed Flow**

**Before (Broken):**
```
CodingAgent (no changes) → Skip cleanup → should_finalize() = false → Task stuck in InProgress 
```

**After (Fixed):**
```
CodingAgent (no changes) → Skip cleanup → Manual finalize_task() → Task → InReview 
CodingAgent (has changes) → Cleanup runs → should_finalize() = true → Task → InReview 
```

### **Benefits**
-  **Fixes the bug**: Tasks now properly transition to `InReview` when cleanup is skipped
-  **DRY principle**: Reuses finalization logic instead of duplicating 
-  **No double finalization**: Helper is idempotent and safely reusable
-  **Preserves notifications**: Same notification behavior as normal cleanup completion
-  **Clean separation**: `should_finalize()` logic unchanged for normal flows

### **Verification**
-  Code compiles successfully
-  All tests pass (47/47) 
-  Type checker passes
-  Same finalization behavior for both paths

The complete feature is now implemented: cleanup scripts are skipped when no changes are made during coding agent execution, AND tasks properly transition to `InReview` status in both scenarios!

* Cleanup script changes for task attempt 92b80e80-dbc1-470c-a3c8-172c38549b61

* ## UI Copy Updates Complete 

I've successfully updated the project settings UI to clearly communicate that the cleanup script only runs when changes are made by the coding agent.

### **Changes Made**

1. **Updated description text** in [`project-form-fields.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-92b8-skip-runni/frontend/src/components/projects/project-form-fields.tsx#L249-L253):
   ```diff
   - This script will run after coding agent execution is complete.
   + This script runs after coding agent execution only if changes were made.
   + Use it for quality assurance tasks like running linters, formatters, tests, 
   + or other validation steps. If no changes are made, this script is skipped.
   ```

2. **Updated Unix placeholder** in [`script-placeholders.ts`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-92b8-skip-runni/frontend/src/utils/script-placeholders.ts#L36-L38):
   ```diff
   - # This runs after coding agent execution
   + # This runs after coding agent execution - only if changes were made
   ```

3. **Updated Windows placeholder** in [`script-placeholders.ts`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-92b8-skip-runni/frontend/src/utils/script-placeholders.ts#L20-L22):
   ```diff
   - REM This runs after coding agent execution
   + REM This runs after coding agent execution - only if changes were made
   ```

### **User Experience**

Now when users configure a cleanup script in project settings, they will see:

**Label**: "Cleanup Script (Optional)"

**Description**: 
> This script runs after coding agent execution **only if changes were made**. Use it for quality assurance tasks like running linters, formatters, tests, or other validation steps. If no changes are made, this script is skipped.

**Placeholder text**:
```bash
#!/bin/bash
# Add cleanup commands here...
# This runs after coding agent execution - only if changes were made
```

### **Benefits**
-  **Clear expectations**: Users understand the conditional behavior upfront
-  **Emphasized condition**: "only if changes were made" is bolded for visibility  
-  **Comprehensive coverage**: Updated both description and placeholder text
-  **Cross-platform**: Updated both Unix and Windows placeholders
-  **TypeScript verified**: Frontend code compiles successfully

Users will now have clear visibility into when their cleanup scripts will and won't run, preventing any confusion about the new conditional execution behavior!

* Cleanup script changes for task attempt 92b80e80-dbc1-470c-a3c8-172c38549b61
2025-08-19 18:42:40 +01:00
Alex Netsch
1af75ff880 Frontend: Fix esc/click discarding existing input (vibe-kanban) (#508)
* Commit changes from coding agent for task attempt aeb1025a-9b27-4b47-a45f-1cb4833fdf85

* Cleanup script changes for task attempt aeb1025a-9b27-4b47-a45f-1cb4833fdf85

* Commit changes from coding agent for task attempt aeb1025a-9b27-4b47-a45f-1cb4833fdf85

* Cleanup script changes for task attempt aeb1025a-9b27-4b47-a45f-1cb4833fdf85

* Commit changes from coding agent for task attempt aeb1025a-9b27-4b47-a45f-1cb4833fdf85

* Update frontend/src/components/tasks/TaskFormDialog.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-19 16:44:53 +01:00
Louis Knight-Webb
76d46da5ab Dev server logs (vibe-kanban) (#519)
* ## Implementation Complete!

I've successfully implemented the dev server logs feature with the following changes:

### **Files Modified:**

1. **Created Context Files:**
   - [`TabNavigationContext.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-5e98-dev-server/frontend/src/contexts/TabNavigationContext.tsx) - For tab switching
   - [`ProcessSelectionContext.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-5e98-dev-server/frontend/src/contexts/ProcessSelectionContext.tsx) - For process pre-selection

2. **Updated [`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-5e98-dev-server/frontend/src/components/tasks/TaskDetailsPanel.tsx):**
   - Added context providers
   - Connected process selection to ProcessesTab

3. **Updated [`CurrentAttempt.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-5e98-dev-server/frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx):**
   - Added FileText icon import
   - Added process selection hook
   - Added logic to find latest dev server process
   - Added View Logs icon button with tooltip
   - Added handler to jump to dev server logs

4. **Updated [`ProcessesTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-5e98-dev-server/frontend/src/components/tasks/TaskDetails/ProcessesTab.tsx):**
   - Added props interface for jumpProcessId
   - Added useEffect to handle process pre-selection
   - Auto-loads process details when jumping to a process

### **How It Works:**

1. **Button Visibility**: View Logs button (📄 icon) appears next to the dev server button only when a dev server process exists
2. **Smart Process Selection**: Finds the latest dev server process (running preferred, falls back to completed)
3. **Seamless Navigation**: Clicking switches to Processes tab and opens the dev server process logs automatically
4. **No Prop Drilling**: Uses React contexts to avoid passing props through multiple component layers

### **User Experience:**
- When dev server is running: User sees both "Dev" and "📄" buttons
- When dev server stopped but ran before: User sees "📄" button to view historical logs  
- Clicking "📄" instantly opens the relevant dev server process in the Processes tab with logs expanded
- Tooltip shows "View dev server logs" on hover

The implementation is complete, tested, and ready for use! The build passes all TypeScript checks.

* Cleanup script changes for task attempt 5e98f2ff-ed68-4c04-8a75-cdcfd98e2bd7

* Done! Changed the icon from FileText to ScrollText (📜). The View Logs button now uses the scroll-text icon which is more appropriate for viewing logs.

* ## Refactoring Complete! 

The refactoring to more React-like patterns is now complete. Here's what was changed:

### **Key Improvements**

1. **Eliminated Callback Pattern**: Removed the un-React-like `onProcessJumped={() => setJumpProcessId(null)}` callback
2. **Single Source of Truth**: `selectedProcessId` now lives in `ProcessSelectionContext` instead of being split between parent and child
3. **Declarative State**: Components now simply read/write shared state instead of managing events

### **Changes Made**

1. **`ProcessSelectionContext`** → Now a full provider that:
   - Manages `selectedProcessId` state
   - Provides `setSelectedProcessId` for direct state updates
   - Provides `jumpToProcess` wrapper that sets state + switches tab
   - Uses proper React patterns with `useMemo` and `useCallback`

2. **`TaskDetailsPanel`** → Simplified:
   - Removed `jumpProcessId` state
   - Removed callback props to ProcessesTab
   - Uses `ProcessSelectionProvider` component
   - Clean provider hierarchy

3. **`ProcessesTab`** → Cleaner component:
   - Removed props interface entirely
   - Uses context state instead of local `selectedProcessId`
   - Auto-fetches process details via useEffect
   - Manual clicks and button jumps use same state path

4. **`CurrentAttempt`** → Updated API usage:
   - Uses `jumpToProcess(id, setActiveTab)` 
   - More explicit about tab switching

### **Benefits Achieved**

-  **More React-like**: State-driven instead of event-driven
-  **Better separation of concerns**: Context owns selection lifecycle  
-  **No more callbacks**: Eliminated imperative callback pattern
-  **Cleaner code**: Removed props drilling and state synchronization
-  **Easier to test**: Single state source, declarative flow
-  **Better performance**: Memoized context values

The feature works exactly the same from the user's perspective, but the code is now much more maintainable and follows React best practices!

* Cleanup script changes for task attempt 5e98f2ff-ed68-4c04-8a75-cdcfd98e2bd7

* ## Context Refactoring Complete! 

The refactoring to improve context architecture is now complete. Here's what was accomplished:

### **Final Architecture**

**`TabNavContext`**: 
-  Manages tab navigation state (`activeTab`, `setActiveTab`)
-  Single responsibility: UI navigation

**`ProcessSelectionContext`**: 
-  Manages process selection state (`selectedProcessId`, `setSelectedProcessId`) 
-  **Internally consumes** `TabNavContext` via `useTabNavigation()`
-  Provides clean `jumpToProcess(processId)` API that handles both concerns

### **Key Improvements Achieved**

1. **Clean API**: `jumpToProcess(processId)` - no parameters needed
2. **Better Separation**: Each context owns its domain, but they coordinate properly
3. **Performance**: Minimal rerender fanout - tab changes don't rerender process consumers 
4. **Developer Experience**: Simple, discoverable API
5. **Maintainability**: Easy to add more coordinated actions in the future

### **Usage Examples**

```typescript
// Before (awkward)
const { jumpToProcess } = useProcessSelection();
const { setActiveTab } = useTabNavigation();
jumpToProcess(processId, setActiveTab);

// After (clean)
const { jumpToProcess } = useProcessSelection();
jumpToProcess(processId);
```

### **Provider Hierarchy**
```jsx
<TabNavContext.Provider>
  <ProcessSelectionProvider>  {/* ← Uses useTabNavigation internally */}
    <ProcessesTab />           {/* ← Gets clean jumpToProcess API */}
    <CurrentAttempt />         {/* ← Simple jumpToProcess(id) call */}
  </ProcessSelectionProvider>
</TabNavContext.Provider>
```

The architecture now follows React best practices with proper context boundaries, optimal performance, and excellent developer ergonomics. The feature works identically from the user's perspective, but the code is much cleaner and more maintainable!

* Cleanup script changes for task attempt 5e98f2ff-ed68-4c04-8a75-cdcfd98e2bd7

* fmt
2025-08-19 15:09:32 +01:00
Louis Knight-Webb
b868d1917e Raw logs should render ANSI (vibe-kanban) (#520)
* Perfect! Let me summarize what has been successfully implemented:

##  Implementation Complete

I've successfully implemented a **unified log rendering architecture** with ANSI support across the entire application:

### 🎯 What Was Accomplished

1. ** Added `fancy-ansi` dependency** - React 18 compatible ANSI rendering library
2. ** Created `RawLogText` component** - Single, unified component for all raw log rendering
3. ** Added ANSI color CSS classes** - Consistent theming with Tailwind classes
4. ** Refactored all log rendering components**:
   - **StdoutEntry.tsx** - Now uses RawLogText with `channel="stdout"`
   - **StderrEntry.tsx** - Now uses RawLogText with `channel="stderr"`  
   - **ProcessLogsViewer.tsx** - Replaced `formatLogLine()` with RawLogText
   - **ProcessCard.tsx** - Updated raw log display to use RawLogText
5. ** Added comprehensive tests** - Unit tests for the RawLogText component
6. ** Verified build success** - All TypeScript checks pass

### 🌟 Key Features

- **ANSI Escape Code Rendering**: Raw logs like `[0m[1][0m   [32m[1mVITE[22m v5.4.19[39m` now render with proper colors
- **Smart STDERR Handling**: Only applies red fallback color when no ANSI codes are present
- **Flexible HTML Elements**: Supports both `<div>` and `<span>` rendering
- **Performance Optimized**: Uses `memo()` and efficient ANSI detection
- **Consistent Styling**: Single source of truth for all log rendering with proper whitespace preservation

### 📁 Files Modified

- `frontend/package.json` - Added `fancy-ansi` dependency
- `frontend/src/components/common/RawLogText.tsx` - **New unified component**
- `frontend/src/styles/index.css` - Added ANSI color CSS classes
- `frontend/src/components/logs/StdoutEntry.tsx` - Refactored to use RawLogText
- `frontend/src/components/logs/StderrEntry.tsx` - Refactored to use RawLogText  
- `frontend/src/components/tasks/TaskDetails/ProcessLogsViewer.tsx` - Refactored to use RawLogText
- `frontend/src/components/tasks/TaskDetails/ProcessCard.tsx` - Refactored to use RawLogText
- `frontend/src/components/common/__tests__/RawLogText.test.tsx` - **New test file**

The implementation follows all the best practices identified by the Oracle and provides a robust, maintainable solution for ANSI log rendering across the entire application. Raw logs will now display with proper colors, formatting, and styling instead of showing escape codes as plain text.

* Cleanup script changes for task attempt 287442b9-2ddf-4f29-9b91-ddc18e4a96b7

* lockfile

* delete test
2025-08-19 14:19:50 +01:00
Solomon
01662fbd52 Add xcode as editor (#518) 2025-08-19 11:42:52 +01:00
Louis Knight-Webb
88a67d8d9c Prepend and append prompt arguments to executors (vibe-kanban) (#507)
* Commit changes from coding agent for task attempt 50dc90ec-29b2-4c80-9000-133dd7f9fad4

* Cleanup script changes for task attempt 50dc90ec-29b2-4c80-9000-133dd7f9fad4

* Commit changes from coding agent for task attempt 50dc90ec-29b2-4c80-9000-133dd7f9fad4

* Cleanup script changes for task attempt 50dc90ec-29b2-4c80-9000-133dd7f9fad4

* Reverse JSON editor disable

* prompt_args_for_profiles

* Reset any frontend changes

* Remove new. UI components

* reset shared types

* Commit changes from coding agent for task attempt 50dc90ec-29b2-4c80-9000-133dd7f9fad4

* Cleanup script changes for task attempt 50dc90ec-29b2-4c80-9000-133dd7f9fad4

* fmt

* lockfile
2025-08-19 10:54:53 +01:00
Louis Knight-Webb
317811d696 Task details spacing (#517)
* todo styles

* hide todo header

* spacing task attempt buttons

* worktree path

* task attempt header

* fmt
2025-08-19 10:52:46 +01:00
Louis Knight-Webb
d71944d14d It should be possible to view logs in the processes tab (vibe-kanban) (#473)
* Cleanup script changes for task attempt 31bb8b01-6bda-4a86-8b51-3797673d052e

* Commit changes from coding agent for task attempt 31bb8b01-6bda-4a86-8b51-3797673d052e

* Cleanup script changes for task attempt 31bb8b01-6bda-4a86-8b51-3797673d052e

* Commit changes from coding agent for task attempt 31bb8b01-6bda-4a86-8b51-3797673d052e

* Cleanup script changes for task attempt 31bb8b01-6bda-4a86-8b51-3797673d052e

* Commit changes from coding agent for task attempt 31bb8b01-6bda-4a86-8b51-3797673d052e

* Cleanup script changes for task attempt 31bb8b01-6bda-4a86-8b51-3797673d052e

* Commit changes from coding agent for task attempt 31bb8b01-6bda-4a86-8b51-3797673d052e

* Cleanup script changes for task attempt 31bb8b01-6bda-4a86-8b51-3797673d052e

* Commit changes from coding agent for task attempt 31bb8b01-6bda-4a86-8b51-3797673d052e

* Cleanup script changes for task attempt 31bb8b01-6bda-4a86-8b51-3797673d052e

* handle bottom scroll better

* lint

* Lint
2025-08-19 09:19:12 +01:00
Alex Netsch
a172f9bf75 Update pr after creation (#492)
* feat: allow pushing updates to open PRs (#470)

PR push after creation (vibe-kanban c22efac9)

In the last commit, we added the ability to push new changes after a PR has been created. Is there a good way to only show this if there are actually new changes?

feat: allow pushing updates to open PRs (#470)

Commit changes from coding agent for task attempt 771ed0db-8c90-4556-b732-5888b665c42b

refactor: simplify unpushed commits check by focusing on origin/branch_name

PR creation review (vibe-kanban 89c2ecdd)

In the last two commits, we added the ability to push new changes after a PR has been created.
Please review this and explain potential shortcomings

* Fix git push frontend

* Use GitService provided by deployment

* Fix ssh auth failing blocking BranchStatus request

* Fix refspec

* Fix frontend to reflect disconnected
2025-08-15 18:15:50 +01:00
Solomon
598d32a254 VScode extension key events and context menu (#498)
- Forward key-events to vscode when vibe-kanban is hosted in an iframe.
- Create a context-menu for copy/paste operation in iframe mode.
2025-08-15 18:12:29 +01:00
Louis Knight-Webb
805de837b4 Can't navigate using keyboard when searching branch (vibe-kanban) (#495)
* Cleanup script changes for task attempt 69217bab-8e49-498d-b892-6e720f7c6026

* Commit changes from coding agent for task attempt 69217bab-8e49-498d-b892-6e720f7c6026

* Cleanup script changes for task attempt 69217bab-8e49-498d-b892-6e720f7c6026
2025-08-15 17:48:09 +01:00
Solomon
c4ea84e7cf Make edit diffs more robust (#493) 2025-08-15 16:17:22 +01:00
Louis Knight-Webb
41305215fe Use codemirror for JSON editing (vibe-kanban) (#489)
* Commit changes from coding agent for task attempt 009251c6-0595-4baf-be5f-684488a8326c

* Cleanup script changes for task attempt 009251c6-0595-4baf-be5f-684488a8326c

* Commit changes from coding agent for task attempt 009251c6-0595-4baf-be5f-684488a8326c
2025-08-15 11:56:02 +01:00
Matthew Boston
39e05f16d7 rename PR button handler and update button text for clarity (#484) 2025-08-15 11:42:53 +01:00