* I've completed the implementation. Here's a summary of the changes:
## Summary
### Changes Made
1. **`frontend/src/hooks/useBranchStatus.ts`**
- Modified to return `{ data, error, isError, isLoading, refetch }` instead of just the query result
- This exposes the error state to consuming components
2. **`frontend/src/components/tasks/Toolbar/GitOperations.tsx`**
- Added `branchStatusError` prop to interface
- Removed `hasConflictsCalculated` from the "Change target branch" button's disabled condition - now it stays enabled even during errors, allowing users to recover
- Changed the actions section from hiding completely when `selectedRepoStatus` is null to showing an error message when there's a `branchStatusError`
3. **`frontend/src/components/dialogs/tasks/GitActionsDialog.tsx`**
- Extracted `error` from `useBranchStatus` and passes it to `GitOperations` as `branchStatusError`
4. **`frontend/src/pages/ProjectTasks.tsx`**
- Updated `DiffsPanelContainer` to accept and pass `branchStatusError`
- Extracted `branchStatusError` from `useBranchStatus` hook
- Passes the error through to `DiffsPanelContainer`
5. **i18n translation files** (all 6 locales: en, es, ja, ko, zh-Hans, zh-Hant)
- Added `git.errors.branchStatusUnavailable` translation string
### Behavior Changes
- **Before**: When branch status API failed, git operations (Merge, PR/Push, Rebase buttons) were completely hidden
- **After**:
- An error message is shown: "Unable to fetch branch status. You can still change the target branch."
- The "Change target branch" button remains enabled, allowing users to recover from deadlock situations
- Users can see something went wrong instead of the UI silently failing
* Cleanup script changes for workspace cdcbb9c6-fc9f-45bf-9c30-0e432d06cccf
* Simplify useBranchStatus hook return
Return useQuery result directly instead of manually constructing an object.
The useQuery hook already returns all needed properties (data, error, isError, isLoading, refetch).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Restore hasConflictsCalculated check for change target branch button
The conflict check wasn't needed for the branch status error fix.
Keeping it prevents changing target branch during active git conflicts.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Done. I've added a 5-second delay to the `list_git_repos` endpoint at `crates/server/src/routes/filesystem.rs:46`. This will let you see:
- "Searching for repositories..." for the first 2 seconds
- "Still searching... (2s)", "Still searching... (3s)", etc. after that
- The "This is taking longer than usual" message after 3 seconds
Remember to remove this delay (marked with `TODO`) once you're done testing!
* Done, the delay has been removed.
* All checks pass. The i18n script now passes with no new violations introduced.
* feat: Add timeout indicator to repository selector
- Shows progressive feedback when repo search takes longer than expected
- Displays "no repos found" message when search completes empty
- Added translations for all 6 locales (EN, ES, JA, KO, ZH-Hans, ZH-Hant)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Reset the diff view on target-branch change and post rebase
* Remove unbounded channel
tokio watch is sufficient for watching git head changes in case of rebase.
* fmt
* use git service
* fix: copy images to agent_working_dir when set
When agent_working_dir is configured, copy images to
<workspace>/<agent_working_dir>/.vibe-images/ instead of
<workspace>/.vibe-images/ so that relative paths work
correctly for the AI agent.
Closes#1727
Signed-off-by: majiayu000 <1835304752@qq.com>
* optionally append agent working directory in other image routes
---------
Signed-off-by: majiayu000 <1835304752@qq.com>
Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com>
* add some helpful information to the troubleshooting section of the documentation website
I was having an issue with vibe-kanban recently and I had to do a lot of digging myself in order to debug the issue. It would be helpful to have a troubleshooting section of the website that lists some basic tips for how to fix issues on your own.
* make warning stronger
---------
Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com>
* I've added the Exa Code MCP server as a one-click install option. Here's what was configured:
**Changes made to `crates/executors/default_mcp.json`:**
1. **Server configuration** (lines 23-33):
- Command: `npx -y exa-mcp-server`
- Tools enabled: `web_search_exa` and `get_code_context_exa` (as requested)
- Environment variable: `EXA_API_KEY` (required for authentication)
2. **Metadata** (lines 53-58):
- Name: "Exa"
- Description: "Web search and code context retrieval powered by Exa AI"
- URL: https://docs.exa.ai/reference/exa-mcp
- Icon: `mcp/exa_logo.svg` (already exists)
The Exa MCP server icon was already present in the frontend public assets at `frontend/public/mcp/exa_logo.svg`.
* Done. I've added Chrome DevTools MCP as a one-click install option:
**Server configuration** (lines 34-39):
- Command: `npx chrome-devtools-mcp@latest`
- No environment variables required
**Metadata** (lines 65-70):
- Name: "Chrome DevTools"
- Description: "Browser automation, debugging and performance analysis with Chrome DevTools"
- URL: https://github.com/ChromeDevTools/chrome-devtools-mcp
- Icon: `mcp/chrome_devtools_logo.svg`
* The issue was that `justify-center` and `gap-3` were interfering with Embla Carousel's scroll calculations. Embla uses a specific margin/padding system (`-ml-4` on the content container and `pl-4` on items) to handle spacing and scroll positions. Adding `justify-center` shifts items in a way that breaks the scroll math, making it impossible to scroll to the leftmost items.
The fix removes these conflicting classes from `CarouselContent`.
Common settings to reduce database locks.
> 1. WAL is significantly faster in most scenarios.
2. WAL provides more concurrency as readers do not block writers and a writer does not block readers. Reading and writing can proceed concurrently.
3.Disk I/O operations tends to be more sequential using WAL.
4. WAL uses many fewer fsync() operations and is thus less vulnerable to problems on systems where the fsync() system call is broken.
https://sqlite.org/wal.html
* bump opencode to v1.1.3
* use correct working workspace directory for normalize_logs
use the same directory that was used during agent runtime to ensure make_relative_path works as expected
* feat(github): add --body-file support for gh pr create
Use temp file for PR body when content exceeds 1000 chars or contains
newlines, avoiding shell escaping issues and CLI length limits.
Changes:
- Add PreparedPrCreateArgs struct for testable argument building
- Extract should_use_body_file() helper with BODY_FILE_THRESHOLD const
- Refactor create_pr to use prepare_pr_create_args()
- Add 36 unit tests covering parsers, body-file logic, and arg building
* Done! Here's a summary of what I've done:
I've simplified PR #1707's implementation based on your feedback:
**Changes made on top of PR #1707:**
1. **Always use `--body-file`** - Removed the threshold-based conditional logic (`should_use_body_file`) that decided whether to use `--body` or `--body-file`. Now it always uses `--body-file`, which:
- Eliminates complexity
- Fixes shell escaping issues for all bodies (not just long/multiline ones)
- Avoids command-line length limits universally
2. **Simplified struct** - Changed `_temp_file: Option<NamedTempFile>` to `_body_file: NamedTempFile` since it's no longer optional
3. **Removed all tests** - Deleted all 36 tests since the logic is now trivially simple and better tested through integration
**Final diff from main:**
- `+162 lines` adding: body-file support, PR comment features (from original PR #1707)
- `-7 lines` removing: the old `--body` approach and TODO comment
The branch is ready for review. The existing tests in the `services` crate all pass.
Cleanup script changes for workspace 6534b6a9-68c3-4672-a4e8-aaf6939b6499
Done! Here's what I simplified compared to PR #1707:
**Removed:**
- `PreparedPrCreateArgs` struct
- `prepare_pr_create_args` function
- `should_use_body_file` function with threshold logic
- `BODY_FILE_THRESHOLD` constant
- All 36 tests
**The body-file fix is now just ~10 lines added to `create_pr`:**
```rust
// Write body to temp file to avoid shell escaping and length issues
let body = request.body.as_deref().unwrap_or("");
let mut body_file = NamedTempFile::new()
.map_err(|e| GhCliError::CommandFailed(format!("Failed to create temp file: {e}")))?;
body_file
.write_all(body.as_bytes())
.map_err(|e| GhCliError::CommandFailed(format!("Failed to write body: {e}")))?;
// ... then later:
args.push(OsString::from("--body-file"));
args.push(body_file.path().as_os_str().to_os_string());
```
The PR comment types/methods are kept since other code in the branch depends on them (that's a separate feature from the body-file fix).
Cleanup script changes for workspace 6534b6a9-68c3-4672-a4e8-aaf6939b6499
Done. Removed the comment. The temp file cleanup is handled by Rust's RAII - `NamedTempFile` deletes the file when it goes out of scope at the end of `create_pr`.
---------
Co-authored-by: Alex Netsch <alex@bloop.ai>
* All changes have been implemented and tested. Here's a summary of what was done:
Updated the PR URL parsing logic to support GitHub Enterprise hostnames by using the `url` crate instead of searching for `"github.com"` as a string token.
1. **`crates/review/Cargo.toml`** - Added `url = "2.5"` dependency
2. **`crates/review/src/github.rs`** - Rewrote `parse_pr_url` function to use `Url::parse()` and `path_segments()` instead of string splitting. Added two new test cases:
- `test_parse_pr_url_github_enterprise` - Tests GitHub Enterprise URLs
- `test_parse_pr_url_any_host` - Tests that any host with the `/pull/` pattern works
3. **`crates/remote/src/routes/github_app.rs`** - Applied the same pattern to the duplicate `parse_pr_url` function
The new implementation:
- Parses the URL with `Url::parse()`
- Extracts path segments directly (e.g., `["owner", "repo", "pull", "123"]`)
- No longer requires `github.com` as a specific hostname
- Works with any hostname including `github.mycompany.com`, `github.enterprise.corp`, etc.
Cleanup script changes for workspace e22082a4-ca31-4754-9c1c-2dc5b6991338
All done! Here's a summary of what was implemented:
This PR adds support for GitHub Enterprise hostnames and SSH hostname aliases by delegating to the `gh` CLI instead of parsing URLs with hardcoded `github.com` patterns.
**1. `crates/services/src/services/github/cli.rs`**
- Added `run_in_dir()` helper method to run `gh` commands in a specific directory
- Added `get_repo_info(repo_path)` - uses `gh repo view --json owner,name` to get repo info from a directory
- Added `view_pr_by_url(pr_url)` - uses `gh pr view <url>` to get PR info directly from a URL
**2. `crates/services/src/services/github.rs`**
- Exported `GhCli` and `GhCliError` for use by other modules
- Added `update_pr_status_by_url(pr_url)` method to `GitHubService`
- Replaced regex-based `from_remote_url()` with hostname-agnostic URL parsing using the `url` crate (kept for backward compatibility)
**3. `crates/services/src/services/git.rs`**
- Updated `get_github_repo_info()` to use `GhCli::get_repo_info()` instead of parsing URLs
**4. `crates/services/src/services/pr_monitor.rs`**
- Updated `check_pr_status()` to use `update_pr_status_by_url()` instead of parsing the PR URL
**5. Tests** (`crates/services/tests/git_workflow.rs`)
- Updated existing tests for hostname-agnostic parsing
- Added new tests for GitHub Enterprise and SSH alias URLs
**6. `crates/review/src/github.rs`** (previously done)
- Already updated to use hostname-agnostic URL parsing
**7. `crates/remote/src/routes/github_app.rs`** (previously done)
- Already updated to use hostname-agnostic URL parsing
- **SSH hostname aliases** (e.g., `github-xxx` in `~/.ssh/config`) now work
- **GitHub Enterprise** instances (e.g., `github.mycompany.com`) now work
- **No regex** - removed regex dependency from `github.rs`, using simple URL parsing and `gh` CLI
- **Robust** - `gh` CLI handles all the complexity of authentication and hostname resolution
Cleanup script changes for workspace e22082a4-ca31-4754-9c1c-2dc5b6991338
Done! I've simplified the API by:
1. **Removed** the old `update_pr_status(&repo_info, pr_number)` method that took repo info and PR number separately
2. **Renamed** `update_pr_status_by_url(pr_url)` → `update_pr_status(pr_url)` for a cleaner API
Now there's just one method that takes the PR URL directly, and the `gh` CLI handles all the complexity of hostname resolution, SSH aliases, and GitHub Enterprise automatically.
All tests pass. The fix is complete - I renamed the test from `test_parse_pr_url_any_host` to `test_parse_pr_url_custom_github_host` and changed the URL from a misleading GitLab example to a realistic GitHub Enterprise URL (`github.acme.com`).
Done! I've removed `from_remote_url()` entirely:
1. **Removed** `GitHubRepoInfo::from_remote_url()` method from `crates/services/src/services/github.rs`
2. **Removed** the `use url::Url;` import from that file (since it's no longer needed there)
3. **Removed** both tests that exercised the now-deleted function from `crates/services/tests/git_workflow.rs`
4. **Updated** the import to remove `GitHubRepoInfo` and `GitHubServiceError` which are no longer used in tests
All tests pass and the workspace compiles cleanly. The `url` crate is still used elsewhere in the services crate, so I left it in Cargo.toml.
Cleanup script changes for workspace e22082a4-ca31-4754-9c1c-2dc5b6991338
Done! I've made both cleanups:
1. **Consolidated `run()` and `run_in_dir()`** - Now there's a single `run()` method with an optional `dir: Option<&Path>` parameter. All callers pass `None` for global commands and `Some(path)` when running in a specific directory.
2. **Renamed `view_pr_by_url()` to `view_pr()`** - Removed the old `view_pr(owner, repo, pr_number)` method and renamed `view_pr_by_url(pr_url)` to just `view_pr(pr_url)` for a cleaner API.
All tests pass and the workspace compiles cleanly.
Cleanup script changes for workspace e22082a4-ca31-4754-9c1c-2dc5b6991338
Done! I've reverted the test change in `crates/review/src/github.rs` back to the original `test_parse_pr_url_any_host` with the GitLab URL. The `crates/remote/src/routes/github_app.rs` file had no changes from my work to revert.
All tests pass and the workspace compiles. The changes in this PR are now scoped to just the `services` crate:
- `cli.rs` - consolidated `run()`, renamed `view_pr()`
- `github.rs` - removed `from_remote_url()` and `url` import
- `git.rs` - uses `GhCli::get_repo_info()`
- `git_workflow.rs` - removed tests for `from_remote_url()`
Done. I've reset the review and remote crate files to `origin/main`. The changes to those crates are now reverted and can be submitted in a separate PR. All tests pass and the workspace compiles.
This PR now only contains the services crate changes:
- `cli.rs` - consolidated `run()`, renamed `view_pr()`
- `github.rs` - removed `from_remote_url()` and `url` import
- `git.rs` - uses `GhCli::get_repo_info()`
- `git_workflow.rs` - removed tests for `from_remote_url()`
All done. All three review comments addressed:
1. Removed comment "Optionally runs in a specific directory..." from `cli.rs`
2. Removed doc comment from `update_pr_status` in `github.rs`
3. Replaced helper structs with `serde_json::Value` parsing (matches existing pattern in the file)
Cleanup script changes for workspace e22082a4-ca31-4754-9c1c-2dc5b6991338
Done. Reverted to the helper structs.
All done. Summary of changes:
1. **Removed 3 comments** as requested:
- `git.rs:1599` - removed "Uses `gh repo view` which handles SSH aliases, GitHub Enterprise, etc."
- `cli.rs:202` - removed "This handles GitHub Enterprise and custom hostnames automatically via the `gh` CLI."
- `pr_monitor.rs:101` - removed "Use the URL directly - gh CLI handles all hostname/SSH alias complexity"
2. **Clone question in `github.rs:210`** - Added a comment explaining why the clone is needed (spawn_blocking requires owned values, each retry needs fresh copies)
3. **Fixed `--head {owner}:{branch}` bug** - Changed to `--head branch` only, since the `{owner}:{branch}` syntax is not supported per gh docs
4. **Added 2 unit tests** for `get_repo_info()` JSON parsing:
- `test_parse_repo_info_valid` - tests successful parsing
- `test_parse_repo_info_invalid` - tests error handling
* Done. Addressed the review comment by:
1. Removed `GitService.get_github_repo_info()` facade from `git.rs`
2. Updated 3 callers in `pr.rs` to use `GhCli::new().get_repo_info()` directly
3. Added `GhCliError` to `ApiError` in `error.rs` for proper error handling
4. Removed unused import in `git.rs`
* Done. Now the architecture is cleaner:
- `GhCli` is an internal implementation detail of `GitHubService`
- Callers use `GitHubService.get_repo_info(&path)` instead of touching `GhCli` directly
- Later, a `GitLabService` could have the same `get_repo_info` interface
- Removed `GhCliError` from `ApiError` since errors are now converted to `GitHubServiceError`
* Done.
* Done. `get_repo_info` is now async with `spawn_blocking`, matching the pattern used by other methods like `check_token`.
* Cleanup script changes for workspace e22082a4-ca31-4754-9c1c-2dc5b6991338
* Done. `GhCli` and `GhCliError` are now private to the `github` module.
* Cleanup script changes for workspace e22082a4-ca31-4754-9c1c-2dc5b6991338
* Done! I've updated the Claude Code version from `2.0.75` to `2.0.76` in `mission-control/crates/executors/src/executors/claude.rs:46`.
* Updated Gemini CLI from version 0.21.1 to 0.22.5 in `mission-control/crates/executors/src/executors/gemini.rs:39`.
* Updated Codex from version 0.75.0 to 0.77.0 in `mission-control/crates/executors/src/executors/codex.rs:213`.
**Summary:**
- Bumped `git2` from `0.18` to `0.19` in 4 Cargo.toml files
- This brings in libgit2 1.8.1 which supports `index.skipHash`
- Build compiles successfully
* Done! Here's a summary of the changes:
## Changes Made
### `npx-cli/bin/download.js`
- Added `LOCAL_DEV_MODE` detection - automatically enabled when R2 placeholders aren't replaced or `VIBE_KANBAN_LOCAL=1` env var is set
- Modified `ensureBinary()` to use local binaries from `npx-cli/dist/{platform}/` in local dev mode
- Exported `LOCAL_DEV_MODE` and `LOCAL_DIST_DIR` for use by `cli.js`
### `npx-cli/bin/cli.js`
- In local dev mode, extracts binaries directly to `npx-cli/dist/{platform}/` instead of global cache
- Skips version update check in local dev mode
- Shows "(local dev)" label in startup message when running locally
### `local-build.sh`
- Added instructions at the end showing how to run the local build
## How to test
```bash
cd vibe-kanban
./local-build.sh
cd npx-cli && node bin/cli.js
```
* Updated the README to reflect the correct local build instructions.
* Fixed. Now `LOCAL_DEV_MODE` only activates when the `dist/` directory actually exists, which means:
1. **Local dev** (after `./local-build.sh` creates `npx-cli/dist/`): local mode works
2. **npx** (npm cache has no `dist/` folder): normal R2 download works
* Done! The fixes are:
1. **`npx-cli/package.json`**: Added `dist` to the `files` array so local binaries get included in the tarball
2. **`npx-cli/bin/cli.js`**: Added a guard to skip `getLatestVersion()` when R2 URL is a placeholder (starts with `__`)
Now the workflow should work:
```bash
cd vibe-kanban
./local-build.sh
cd npx-cli
npm pack
npx vibe-kanban-0.0.142.tgz
```
* Perfect! I've successfully implemented sticky file name headers for the diffs view. Here's a summary of the changes:
## Summary
I've made the file name headers in the diffs view sticky by modifying the `DiffCard` component:
### Changes Made
**File**: `frontend/src/components/DiffCard.tsx:269`
Added the following CSS classes to the header div:
- `sticky` - Makes the header stick to the top when scrolling
- `top-0` - Positions it at the very top of the scroll container
- `z-[5]` - Sets appropriate z-index to ensure it stays above diff content but below the main panel header (which has z-10)
- `bg-background` - Adds background color so content scrolling underneath is covered
- `border-b` - Adds a bottom border for better visual separation
### How It Works
When users scroll down through the diffs in the DiffsPanel, each file header will now:
1. Stick to the top of the viewport as you scroll past it
2. Stay visible so users always know which file diff they're viewing
3. Get replaced by the next file's header when that file reaches the top
4. Maintain proper layering with the main panel header staying on top
The z-index hierarchy is:
- Main panel header (DiffsPanel): `z-10` (highest)
- Individual diff card headers: `z-[5]` (middle)
- Diff content: default (lowest)
This ensures a smooth scrolling experience where users can always see which file they're looking at, even when viewing large diffs.
* delete package-lock.json
* All changes have been completed. Here's a summary of what was done:
## Summary
Changed both scratches and queued messages to use session IDs instead of workspace IDs:
### Files Modified
1. **`frontend/src/components/tasks/TaskFollowUpSection.tsx`**
- Changed `useScratch(ScratchType.DRAFT_FOLLOW_UP, workspaceId ?? '')` → `useScratch(ScratchType.DRAFT_FOLLOW_UP, sessionId ?? '')`
2. **`crates/server/src/routes/sessions/queue.rs`**
- Changed `session.workspace_id` → `session.id` in all three queue operations (queue, cancel, get status)
3. **`crates/services/src/services/queued_message.rs`**
- Renamed `task_attempt_id` → `session_id` in `QueuedMessage` struct
- Updated all method parameters and comments
4. **`crates/local-deployment/src/container.rs`**
- Changed `ctx.workspace.id` → `ctx.session.id` for queue lookups and scratch deletion
- Updated log messages to reference "session" instead of "workspace"
5. **`shared/types.ts`** (auto-generated)
- `QueuedMessage.task_attempt_id` → `QueuedMessage.session_id`
* Cleanup script changes for task attempt 4df90bcd-f261-41ca-bac3-8f7c2fc576c5
* Build passes. The fix has been applied. Found and fixed one missed instance in `sessions/mod.rs` where `Scratch::delete` was using `workspace.id` instead of `session.id`.
* The code compiles successfully. Let me provide a summary of what was done:
## Summary
I've implemented the fix for the session executor storage format issue:
### Changes Made
1. **`crates/services/src/services/container.rs` (line 912)**
- Changed `executor_profile_id.to_string()` to `executor_profile_id.executor.to_string()`
- This now stores only the base executor name (e.g., `"CLAUDE_CODE"`) instead of the full format with variant (e.g., `"CLAUDE_CODE:ROUTER"`)
2. **`crates/db/migrations/20251220134608_fix_session_executor_format.sql`**
- Added migration to fix existing erroneous entries
- Strips the variant suffix from any executor values containing a colon
- Excludes valid hyphenated values like `dev-server`, `setup-script`, etc.
The fix compiles successfully. This will restore the expected behavior for:
- Capability lookups in `UserMessage.tsx`
- Default profile selection in `CreateAttemptDialog.tsx`
* Simplified. The `LIKE '%:%'` condition is sufficient - it only matches values containing a colon, which are exactly the erroneous `"EXECUTOR:VARIANT"` format entries we need to fix.
* Done! The migration has been updated to copy `dev_script_working_dir` values to `agent_working_dir` for existing projects. The change:
**`vibe-kanban/crates/db/migrations/20251219000000_add_agent_working_dir_to_projects.sql`**:
```sql
-- Add column with empty default first
ALTER TABLE projects ADD COLUMN agent_working_dir TEXT DEFAULT '';
-- Copy existing dev_script_working_dir values to agent_working_dir
UPDATE projects SET agent_working_dir = dev_script_working_dir WHERE dev_script_working_dir IS NOT NULL AND dev_script_working_dir != '';
```
This ensures that when the migration runs, existing projects will have their `agent_working_dir` automatically populated from their existing `dev_script_working_dir` setting.
* Done! The migration has been updated to only copy `dev_script_working_dir` to `agent_working_dir` for single-repo projects. Multi-repo projects will keep `agent_working_dir` empty (None).
The key change in the migration:
```sql
UPDATE projects SET agent_working_dir = dev_script_working_dir
WHERE dev_script_working_dir IS NOT NULL
AND dev_script_working_dir != ''
AND (SELECT COUNT(*) FROM project_repos WHERE project_repos.project_id = projects.id) = 1;
```
The subquery `(SELECT COUNT(*) FROM project_repos WHERE project_repos.project_id = projects.id) = 1` ensures only projects with exactly one repository get the default value copied.
* Done! All tasks completed:
1. **Resolved the rebase conflict** in `task_attempts.rs` - removed the duplicate `follow_up` function since it was moved to `sessions/mod.rs` on main
2. **Updated `sessions/mod.rs`** with the `working_dir` changes - added the code to get `agent_working_dir` from project settings and pass it to both `CodingAgentFollowUpRequest` and `CodingAgentInitialRequest`
3. **Ran `npm run prepare-db`** - successfully prepared the database and updated sqlx cache
4. **Verified compilation** - all crates compile successfully
The migration now only copies `dev_script_working_dir` to `agent_working_dir` for single-repo projects (projects with exactly 1 repo in `project_repos` table). Multi-repo projects will keep `agent_working_dir` empty.
* Done. Removed all 6 comments as requested.
* Done! The implementation is now complete:
1. **Database migration** - Copies `dev_script_working_dir` to `agent_working_dir` for single-repo projects at migration time
2. **Runtime backfill** - `backfill_repo_names()` in `container.rs` sets `agent_working_dir` for existing single-repo projects where it's still empty
3. **Project creation** - New single-repo projects automatically get `agent_working_dir` set to the repo name
All three scenarios are now covered for setting `agent_working_dir` on single-repo projects.
* Done! The frontend UI for `agent_working_dir` has been added:
1. Added `agent_working_dir: string` to `ProjectFormState` interface
2. Added `agent_working_dir` to `projectToFormState` function
3. Added `agent_working_dir` to the `handleSave` payload
4. Added the input field after the dev server working directory input
* All tasks are complete. The implementation is finished:
**Summary of changes:**
1. **Project model**: Renamed `agent_working_dir` to `default_agent_working_dir` - this is now a default value for new workspaces
2. **Workspace model**: Added `agent_working_dir` field - this captures the project's default at workspace creation time
3. **Workspace creation**: Updated `create_task_attempt` to fetch the project's `default_agent_working_dir` and pass it to the workspace
4. **Execution sites**: Updated all 4 locations to use `workspace.agent_working_dir` instead of `project.default_agent_working_dir`:
- `container.rs` (start_workspace)
- `container.rs` (start_queued_follow_up)
- `sessions/mod.rs` (follow_up)
- `task_attempts/pr.rs` (trigger_pr_description_follow_up)
5. **Frontend**: Updated `ProjectSettings.tsx` to use `default_agent_working_dir`
6. **Migrations**: Two migrations added - one to rename the project column and one to add the workspace column
* Cleanup script changes for workspace a87cad74-ed7c-402b-b3f3-413a939a13a9
* Done. The migrations have been squashed into a single migration file `20251219000000_add_agent_working_dir_to_projects.sql` which now handles both the project and workspace table changes. The separate workspace migration file has been deleted and `npm run prepare-db` completes successfully.
* Done. The i18n check passes with all checks passing:
- No new literal strings introduced
- No duplicate keys found in JSON files
- Translation keys are consistent across locales (en, es, ja, ko, zh-Hans)
* All checks pass:
- `npm run check` ✅ (frontend TypeScript and backend Rust)
- `npm run prepare-db` ✅ (migrations and sqlx query cache)
* `npm run lint` passes now.
* Done. I've added the logic to `crates/services/src/services/project.rs` in the `add_repository()` function. When a second repository is added to a project (repo count becomes exactly 2), the `default_agent_working_dir` field is automatically cleared by setting it to an empty string.
* Cleanup script changes for workspace a87cad74-ed7c-402b-b3f3-413a939a13a9
* Both checks pass. The fix now correctly:
1. Counts repos **before** adding the new one
2. Only clears `default_agent_working_dir` if the previous count was exactly 1 (meaning we're going from 1 to 2 repos)
* Done. The fix now:
1. Added a dedicated `Project::clear_default_agent_working_dir()` method in `crates/db/src/models/project.rs` that only updates the `default_agent_working_dir` field without touching other fields
2. Updated `add_repository()` in `crates/services/src/services/project.rs` to use this new method when the repo count goes from 1 to 2
* I've implemented the feature. Here's a summary of the changes:
## Summary
Added automatic generation of workspace-level `CLAUDE.md` and `AGENTS.md` files that import configuration from each repository using Claude Code's `@import` syntax.
### Changes Made
**File: `vibe-kanban/crates/local-deployment/src/container.rs`**
1. **Added `create_workspace_config_files()` function** (lines 739-798):
- Checks each repo for `CLAUDE.md` and `AGENTS.md`
- Creates workspace-level files with `@repo-name/FILENAME.md` import lines
- Skips if workspace file already exists (idempotent)
- Skips if no repos have the config file
- Silently handles errors (warns but doesn't fail workspace creation)
2. **Called in `create()` method** (lines 954-956):
- Runs after `copy_files_and_images()` during initial workspace creation
3. **Called in `ensure_container_exists()` method** (lines 1018-1019):
- Runs after `copy_files_and_images()` for cold restart scenarios
### Example Output
For a workspace with repos `frontend` and `backend` where both have `CLAUDE.md`:
```markdown
# Workspace CLAUDE.md
@frontend/CLAUDE.md
@backend/CLAUDE.md
```
* Done. Removed all the unnecessary comments from the code. The build compiles successfully.
## Summary
I modified `vibe-kanban/crates/local-deployment/src/copy.rs` to prevent copy files from overwriting existing files.
**Before:** Files were only skipped if they existed with the same size. Files with different sizes would be overwritten.
**After:** Files are skipped if they exist at all, regardless of size or content. This ensures user files are never overwritten by the copy operation.
* Yup, I'll hold off and do nothing for now. Let me know when you're ready to proceed with the session routes task, and I'll start exploring the codebase and planning the implementation.
All cherry-pick conflicts resolved:
1. **`sessions/queue.rs`** - Fixed analytics to use `session.id` and `session.workspace_id` (2 locations)
2. **`task_attempts.rs`** - Removed the old `follow_up()` function that was already moved to `sessions/mod.rs`
No remaining conflict markers in the routes directory.
All fixes complete:
1. **`sessions/queue.rs`** ✓ - Fixed analytics to use `session.id` and `session.workspace_id`
2. **`task_attempts.rs`** ✓ - Removed old `follow_up` function (moved to sessions)
3. **`sessions/mod.rs`** ✓ - Fixed to use `find_latest_coding_agent_turn_session_id(pool, session.id)` instead of non-existent method
The session-based `follow_up` now correctly scopes the agent_session_id lookup to the current session rather than across all workspace sessions.
* All done:
1. ✓ `container.rs` - Changed to `find_latest_coding_agent_turn_session_id(pool, ctx.session.id)`
2. ✓ `pr.rs` - Changed to `find_latest_coding_agent_turn_session_id(pool, session.id)`
3. ✓ Deleted `find_latest_agent_session_id_by_workspace` from `execution_process.rs`
All workspace-scoped `agent_session_id` lookups have been converted to session-scoped lookups and the unused method has been removed.
Cleanup script changes for task attempt afc116fb-e639-4150-a299-b05c1f14f61e
Done. Removed the unnecessary `Session::create` call and now using `&ctx.session` directly.
Lint, db
* Done. Simplified the validation:
- Removed the extra `Session::find_by_id` DB call
- Now directly checks `process.session_id != session.id`
- Updated error message to "Process does not belong to this session"