-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add session-level review endpoint with StartReviewDialog (Vibe Kanban) #1849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Review CompleteYour review story is ready! Comment !reviewfast on this PR to re-generate the story. |
567c694 to
51b94c8
Compare
9ab1a85 to
1faea7e
Compare
fbf525a to
5789af4
Compare
128cd68 to
9fa0b06
Compare
5ce47f1 to
405472c
Compare
0e03513 to
a249397
Compare
I've implemented the review endpoint as planned. Here's what was created:
1. **`crates/executors/src/actions/review.rs`** - New action type with:
- `RepoReviewContext` struct (repo_id + commit_hashes)
- `ReviewRequest` struct (executor_profile_id, context, additional_prompt, working_dir)
- `Executable` trait impl that calls `executor.spawn_review()`
2. **`crates/server/src/routes/task_attempts/review.rs`** - Endpoint handler with:
- `StartReviewRequest` for the API
- `RepoReviewContext` (endpoint-specific copy)
- `ReviewError::ProcessAlreadyRunning`
- `start_review` handler that:
- Verifies no running processes on workspace
- Creates fresh session
- Builds ReviewRequest action
- Starts execution with `ExecutionProcessRunReason::CodingAgent`
1. **`crates/executors/src/executors/mod.rs`**:
- Added `spawn_review()` to `StandardCodingAgentExecutor` trait with default prompt-based implementation
- Added `build_review_prompt()` helper function
2. **`crates/executors/src/actions/mod.rs`**:
- Added `pub mod review;`
- Added `ReviewRequest` to `ExecutorActionType` enum
- Updated `base_executor()` match
3. **`crates/services/src/services/container.rs`**:
- Updated match in `try_start_next_action` to handle `ReviewRequest`
4. **`crates/server/src/routes/task_attempts.rs`**:
- Added `pub mod review;`
- Added `.route("/review", post(review::start_review))`
5. **`crates/server/src/bin/generate_types.rs`**:
- Added new types to export list
**`POST /task-attempts/{id}/review`**
Request:
```json
{
"executor_profile_id": { "executor": "CLAUDE_CODE", "variant": null },
"context": [{ "repo_id": "uuid", "commit_hashes": ["abc123"] }],
"additional_prompt": "Focus on security issues"
}
```
Response: `ExecutionProcess` on success, `ReviewError` on failure.
To add native review for an executor (e.g., Codex), just override `spawn_review()` in that executor's `StandardCodingAgentExecutor` impl. No changes needed to action or endpoint.
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
All checks pass now. The duplicate type issue is fixed - we're using a single `RepoReviewContext` type from the executors crate.
All checks pass now. Both frontend lint (ESLint) and backend lint (Clippy) are passing.
Found and fixed the real issue. The problem was in `crates/services/src/services/container.rs` - the log normalization was only set up for `CodingAgentInitialRequest` and `CodingAgentFollowUpRequest`. `ReviewRequest` was falling through to the default case and returning `None`, so no normalizer was started for review processes.
Fixed in two places:
1. **Line 787-791**: Added `ReviewRequest` handling in `stream_normalized_logs` (for historic logs)
2. **Line 1149-1151**: Added `ReviewRequest` handling in `start_execution` (for live logs)
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
…. Here's what was implemented:
Added `use_all_workspace_commits` flag to `StartReviewRequest` for automatically populating review context.
1. **`crates/db/src/models/execution_process_repo_state.rs`**
- Added `find_initial_commits_for_workspace()` - query to get the earliest `before_head_commit` for each repo in a workspace
2. **`crates/server/src/routes/task_attempts/review.rs`**
- Added `use_all_workspace_commits: bool` field to `StartReviewRequest` (defaults to `false`)
- When flag is `true` and `context` is `None`, auto-populates context with initial commits from workspace execution processes
3. **`crates/executors/src/executors/mod.rs`**
- Updated `build_review_prompt()` to detect single-commit context (indicating initial commit)
- When single commit per repo, prompts agent to "Review all changes made since the following base commit(s)" with git diff hint
4. **`crates/services/src/services/git.rs`**
- Added `get_commits_since_branch()` method (may be useful for future use)
5. **`shared/types.ts`**
- Generated TypeScript type includes `use_all_workspace_commits: boolean`
When frontend calls `POST /task-attempts/{id}/review` with:
```json
{
"executor_profile_id": { "executor": "CLAUDE_CODE", "variant": null },
"use_all_workspace_commits": true
}
```
The backend will:
1. Find the earliest execution process for the workspace
2. Get the `before_head_commit` for each repo (the commit before agents started making changes)
3. Pass that to the prompt builder which tells the agent to review all changes since that commit
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
…added: Added simple frontend UI to test the review endpoint. 1. **`frontend/src/lib/api.ts`** - Added `startReview` method to `attemptsApi` - Imports `StartReviewRequest`, `ReviewError` types 2. **`frontend/src/hooks/useStartReview.ts`** (NEW) - Hook that calls `attemptsApi.startReview` with `use_all_workspace_commits: true` - Invalidates `processes` and `branchStatus` queries on success 3. **`frontend/src/hooks/index.ts`** - Exports `useStartReview` 4. **`frontend/src/components/ui/actions-dropdown.tsx`** - Added "Start Review" menu item in the attempt actions section - Uses the user's default executor profile from config - Shows loading state while starting review 5. **`frontend/src/i18n/locales/en/tasks.json`** - Added translation keys: `startReview`, `startingReview` From the workspace actions dropdown (three dots menu), click "Start Review" to start a code review session using all workspace commits as context. Done! The fix has been implemented. The review endpoint now uses `Session::find_latest_by_workspace_id` to find an existing session for the workspace, and only creates a new session if none exists. This means review logs will now appear in the same conversation view as other coding agent runs. **Change summary:** - Modified `crates/server/src/routes/task_attempts/review.rs` (lines 79-93) - Instead of always creating a new session, it now checks for an existing session first using `Session::find_latest_by_workspace_id` - This matches the pattern used by dev server, setup scripts, and other similar endpoints Done! The fix is now in place. The change adds `ReviewRequest` to the action type filter in `useConversationHistory.ts` so review processes are included in the conversation view, and handles the content extraction appropriately (using `additional_prompt` for reviews instead of `prompt`). **Change summary:** - Modified `frontend/src/hooks/useConversationHistory.ts` (lines 226-244) - Added `ReviewRequest` to the action type filter - Used conditional to extract content from `additional_prompt` for reviews (with fallback "Review the code changes") vs `prompt` for coding agent requests Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3 Done! All fixes are now in place: 1. **`useConversationHistory.ts` - `flattenEntries()`** (line 177-184): Added `ReviewRequest` to the filter so review processes are included in the flattened entries 2. **`useConversationHistory.ts` - `flattenEntriesForEmit()`** (line 226-244): Already fixed earlier - handles `ReviewRequest` and extracts `additional_prompt` for user message content 3. **`ProcessesTab.tsx`** (line 223-228): Added `ReviewRequest` to the ProfileVariantBadge conditional so the agent badge shows for review processes
1. **`crates/executors/src/actions/review.rs`**: Added `prompt: String` field to `ReviewRequest` 2. **`crates/server/src/routes/task_attempts/review.rs`**: - Import `build_review_prompt` - Build the full prompt from context and additional_prompt before creating the action 3. **`frontend/src/hooks/useConversationHistory.ts`**: Simplified content extraction to just use `actionType.prompt` for all action types (since `ReviewRequest` now has a prompt field too) 4. **Regenerated TypeScript types** - `ReviewRequest` in `shared/types.ts` now includes the `prompt` field Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
**Backend:** 1. **`crates/executors/src/actions/review.rs`**: - Added `CommitRange` enum with three variants: `FromBase`, `Specific`, and `Range` - Updated `RepoReviewContext` to use `repo_name: String` and `commits: CommitRange` instead of `commit_hashes` 2. **`crates/executors/src/executors/mod.rs`**: - Updated `build_review_prompt` to format output with repo names and handle all `CommitRange` variants 3. **`crates/server/src/routes/task_attempts/review.rs`**: - Simplified `StartReviewRequest` (removed `context` field, kept `use_all_workspace_commits`) - Updated handler to look up repo names via `Repo::find_by_ids` and use `CommitRange::FromBase` 4. **`crates/server/src/bin/generate_types.rs`**: Added `CommitRange` to exported types **Frontend:** - **`frontend/src/hooks/useStartReview.ts`**: Removed `context: null` since that field no longer exists The prompt will now look like: ``` Please review the code changes. Repository: vibe-kanban Review all changes from base commit abc123 to HEAD. Use `git diff abc123..HEAD` to see the changes. ``` Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
## Context
We've added a review endpoint (\`POST /task-attempts/{id}/review\`) that starts a code review session. Currently it uses a default prompt-based implementation via \`spawn\_review()\` on \`StandardCodingAgentExecutor\`, which builds a prompt and delegates to \`spawn()\`.
## Goal
Implement native Codex review support by overriding \`spawn\_review()\` in the Codex executor to use Codex's native review mechanism instead of the prompt-based approach.
## Current Implementation
### Backend Types
\*\*\`CommitRange\` enum\*\* (\`crates/executors/src/actions/review.rs\`):
\`\`\`rust
pub enum CommitRange {
FromBase { commit: String },
Specific { commits: Vec<String> },
Range { from: String, to: String },
}
\`\`\`
\*\*\`RepoReviewContext\`\*\*:
\`\`\`rust
pub struct RepoReviewContext {
pub repo\_id: Uuid,
pub repo\_name: String,
pub commits: CommitRange,
}
\`\`\`
### Trait Method
\*\*\`spawn\_review()\`\*\* in \`StandardCodingAgentExecutor\` trait (\`crates/executors/src/executors/mod.rs\`):
\`\`\`rust
async fn spawn\_review(
&self,
current\_dir: &Path,
context: Option<&[RepoReviewContext]>,
additional\_prompt: Option<&str>,
env: &ExecutionEnv,
) -> Result<SpawnedChild, ExecutorError> {
// Default: build prompt and delegate to spawn()
let prompt = build\_review\_prompt(context, additional\_prompt);
self.spawn(current\_dir, &prompt, env).await
}
\`\`\`
## Tasks
1. Research Codex's native review API/mechanism (if it has one)
2. Override \`spawn\_review()\` in \`CodexExecutor\` to use native review if available
3. Fall back to prompt-based approach if native review isn't supported
1. **Removed dead code** from `crates/executors/src/executors/codex/review.rs`: - Deleted the `map_to_review_target()` function (was ~120 lines) - Removed unused imports (`CommitRange`, `RepoReviewContext`) 2. **Codex now uses `ReviewTarget::Custom`** with the pre-built prompt, which ensures the displayed prompt matches what Codex actually receives. The build passes and TypeScript types have been regenerated.
## Summary
Moved the review endpoint from workspace-level to session-level:
### Changes
1. **Created `crates/server/src/routes/sessions/review.rs`**
- New review endpoint at `POST /sessions/{id}/review`
- Takes `Extension<Session>` instead of `Extension<Workspace>`
- Looks up `agent_session_id` from previous executions using `find_latest_coding_agent_turn_session_id()`
- Passes `agent_session_id` to `ReviewAction` for session resumption
2. **Updated `crates/server/src/routes/sessions/mod.rs`**
- Added `pub mod review;`
- Added route `.route("/review", post(review::start_review))`
3. **Updated `crates/server/src/routes/task_attempts.rs`**
- Removed `pub mod review;`
- Removed `.route("/review", post(review::start_review))`
4. **Deleted `crates/server/src/routes/task_attempts/review.rs`**
5. **Updated `crates/server/src/bin/generate_types.rs`**
- Changed path from `task_attempts::review` to `sessions::review`
### API Change
- **Old**: `POST /api/task-attempts/{workspace_id}/review`
- **New**: `POST /api/sessions/{session_id}/review`
This ensures vk sessions and agent sessions are 1:1:
- Existing session → resumes agent session if available
- New session → fresh agent session
- Added `startReview` to `sessionsApi` using new endpoint `POST /api/sessions/${sessionId}/review`
- Removed `startReview` from `attemptsApi`
- Changed parameter from `attemptId` to `sessionId` and added optional `workspaceId` for query invalidation
- Changed API call from `attemptsApi.startReview` to `sessionsApi.startReview`
- Added `MagnifyingGlassIcon` import
- Added `onStartReview` and `isReviewStarting` to `SessionProps` interface
- Added "Start Review" menu item in the session dropdown
- Added `useStartReview` hook import and usage
- Added `handleStartReview` callback function
- Passed `onStartReview` and `isReviewStarting` to `SessionChatBox`
- Removed `useStartReview` import
- Removed `useUserSystem` import (now unused)
- Removed `startReview` hook usage
- Removed `handleStartReview` function
- Removed "Start Review" menu item from the dropdown
…le_for_session()` in `crates/db/src/models/execution_process.rs:688-690`. The backend check passes. Follow-ups after reviews should now work correctly since the executor profile can be extracted from `ReviewRequest` just like from the other request types.
**`frontend/src/components/ui-new/actions/index.ts`:**
1. Added `HighlighterIcon` to the Phosphor icons import (line 33)
2. Added `StartReviewDialog` import (line 49)
3. Added `StartReview` action definition (lines 293-304) with:
- `id: 'start-review'`
- `label: 'Start Review'`
- `icon: HighlighterIcon`
- `requiresTarget: true`
- Visibility when workspace exists
- Execute function that opens `StartReviewDialog`
**`frontend/src/components/ui-new/actions/pages.ts`:**
1. Added `{ type: 'action', action: Actions.StartReview }` as the first item in the `workspaceActions` page group (line 105)
The "Start Review" action with the highlighter icon will now appear in the workspace actions menu (accessed via CMD+K or the three-dots menu on a workspace).
**`frontend/src/components/ui-new/primitives/SessionChatBox.tsx`:** - Changed `MagnifyingGlassIcon` to `HighlighterIcon` in the import (line 12) - Updated the `ToolbarIconButton` to use `HighlighterIcon` instead of `MagnifyingGlassIcon` (line 635) The review button in the text input now shows the highlighter icon instead of the magnifying glass.
**`frontend/src/components/ui-new/primitives/Toolbar.tsx`:** - Added proper disabled styling to `ToolbarIconButton` (`opacity-40 cursor-not-allowed`) **`frontend/src/components/ui-new/primitives/SessionChatBox.tsx`:** - Removed `HighlighterIcon` import (no longer hardcoded) - Added `Icon` type import - Replaced `ReviewModeProps` with generic `ToolbarActionProps` interface (`icon`, `label`, `onClick`) - Changed `reviewMode` prop to `toolbarActions?: ToolbarActionProps[]` - Updated footer to render toolbar actions dynamically from the array **`frontend/src/components/ui-new/containers/SessionChatBoxContainer.tsx`:** - Added `HighlighterIcon` import - Changed `reviewMode` prop to `toolbarActions` array with the review action The button is now: 1. Generic - accepts any action with icon/label/onClick 2. Shows proper disabled state (opacity + cursor) 3. Extensible - you can add more toolbar actions by adding to the array
**Summary of changes:**
1. **`SessionChatBox.tsx`**:
- Changed `toolbarActions` prop from simple `{icon, label, onClick}[]` to `{actions, context, onExecuteAction}` structure
- Uses `ActionDefinition[]` from the actions system
- Uses `isActionEnabled()` to derive disabled state from action context
- Uses `isSpecialIcon()` to filter out non-standard icons
- Handles `label` being either a string or function
2. **`SessionChatBoxContainer.tsx`**:
- Added `useActions()` and `useActionVisibilityContext()` hooks
- Created `handleToolbarAction` callback that routes actions through `executeAction`
- Created `toolbarActionsList` array containing `Actions.StartReview`
- Passes the full action context to `SessionChatBox`
Now adding a new action to the conversation input works the same as navbar:
```typescript
// Just add to the array
const toolbarActionsList = useMemo(
() => [Actions.StartReview, Actions.SomeOtherAction],
[]
);
```
The action's `isVisible`, `isEnabled`, icon, label, and execute logic all come from the central `Actions` definition in `index.ts`.
… in both the navbar (left side) and the chat input toolbar.
…ode` to the conversation input toolbar alongside `StartReview`.
…g other containers. The toolbar action now just respects `requiresTarget`. Details and context: - Simplified the action handler in `frontend/src/components/ui-new/containers/SessionChatBoxContainer.tsx:444` to rely solely on the generic `action.requiresTarget` path. - This aligns with `frontend/src/components/ui-new/containers/NavbarContainer.tsx:66`, where all actions flow through the same generic logic. Next steps: 1) If you want, I can run a quick lint/typecheck on the frontend (`pnpm run check`) to confirm.
…bar, so action availability is handled by the same logic and execution stays generic. Details and context: - Filtered `toolbarActionsList` through `isActionVisible` with the shared `actionCtx` so Start Review only appears when it’s supposed to. - Kept the execution handler generic so it just respects `requiresTarget`. Files: - `frontend/src/components/ui-new/containers/SessionChatBoxContainer.tsx` Next steps: 1) If you want me to run a quick frontend typecheck (`pnpm run check`), say the word.
…a default executor profile from workspace context + config, which restores preselection and enables the “new session” toggle when a session exists. This keeps the chatbox action generic while fixing the dialog behavior. Details and context: - Added workspace context awareness and default profile derivation (mirrors Create Attempt’s logic). - Uses the resolved session id to enable/disable the toggle and to decide whether a new session is required. - Keeps user selection override behavior intact. File: - `frontend/src/components/dialogs/tasks/StartReviewDialog.tsx` If you want, I can also add a quick regression check or walk through the UI flow with you.
…he requested commands. The Start Review dialog now uses `resolvedSessionId` consistently in its callback, and review log normalization handles qa-mode without unused vars. Files updated: - `frontend/src/components/dialogs/tasks/StartReviewDialog.tsx` - `crates/services/src/services/container.rs` Commands run: - `npm run lint` - `npm run format` - `npm run check`
…ne, and removed the comment you flagged. Notes: - The `let _ = request;` was only there to silence an unused-var warning under the `qa-mode` cfg. Using `_request` is the standard way to mark it intentionally unused. Files: - `crates/services/src/services/container.rs` - `frontend/src/components/ui-new/containers/SessionChatBoxContainer.tsx` Want me to rerun `npm run lint` since this touched the linted files?
…on-qa uses `request` normally—no dummy line needed. File: - `crates/services/src/services/container.rs`
…s `CodingAgentTurn` records. Now when a review is started, a `coding_agent_turn` row will be created with the review prompt, and the `agent_session_id` will be stored when Codex reports it. Subsequent follow-ups will find this session ID and correctly use `CodingAgentFollowUpRequest` instead of starting a fresh session.
…r will error on this match and force the developer to decide whether it should create a `CodingAgentTurn` record.
…ke other session calls, and aligned the `handleApiResponse` generic so callers get an `ExecutionProcess` instead of a misleading `ApiResponse`. This fixes the runtime mismatch and keeps the API consistent. Updated `frontend/src/lib/api.ts`. If you want, I can: 1) run `pnpm run check` to validate types, or 2) scan for any other session APIs with inconsistent `handleApiResponse` generics.
a249397 to
f69e9f7
Compare
1. **Removed tooltip from dialog button** - Dialog buttons don't use tooltips in this codebase
2. **Added `getTooltip` to the `StartReview` action definition** in `actions/index.ts` - This is the pattern used for action tooltips ("Ask the agent to review your changes")
3. **Removed `submitTooltip` from all locale files** since it's no longer used
4. **Added missing `title` and `description` to zh-Hant locale**
…Session(targetSessionId)` to switch to the newly created session before closing.
mxyhi
added a commit
to mxyhi/vibe-kanban
that referenced
this pull request
Jan 13, 2026
* Add QA mode for automated testing with mock executor and hardcoded repos (Vibe Kanban) (#1940)
* The QA mode implementation is complete. Here's a summary of what was implemented:
## Summary
I've successfully implemented the QA mode feature for the vibe-kanban application. Here's what was created/modified:
### New Files
1. **`crates/services/src/services/qa_repos.rs`** - QA repos module that:
- Defines two hardcoded QA repo URLs (`internal-qa-1` and `internal-qa-2`)
- Clones repos to a persistent temp directory on first access using `git2`
- Returns `DirectoryEntry` compatible with existing API
2. **`crates/executors/src/executors/qa_mock.rs`** - Mock executor that:
- Implements `StandardCodingAgentExecutor` trait
- Performs random file operations (create, delete, modify)
- Streams 10 mock log entries in ClaudeJson format over 10 seconds
- Reuses Claude's log processor for normalization
### Modified Files
1. **Cargo.toml files** - Added `qa-mode` feature flags to:
- `crates/executors/Cargo.toml`
- `crates/services/Cargo.toml`
- `crates/server/Cargo.toml`
2. **`crates/executors/src/executors/mod.rs`** - Added:
- Conditional `qa_mock` module export
- `QaMock` variant to `CodingAgent` enum
- Updated `capabilities()` match arm
3. **`crates/executors/src/mcp_config.rs`** - Added `QaMock` handling
4. **`crates/services/src/services/filesystem.rs`** - Override `list_git_repos` and `list_common_git_repos` in QA mode
5. **`crates/services/src/services/container.rs`** - Override `normalize_logs` executor lookup in QA mode
6. **`crates/executors/src/actions/coding_agent_initial.rs`** - Override spawn in QA mode
7. **`crates/executors/src/actions/coding_agent_follow_up.rs`** - Override spawn in QA mode
8. **`vibe-kanban/package.json`** - Added QA build scripts:
- `backend:dev:qa`
- `backend:dev:watch:qa`
- `dev:qa`
### Usage
```bash
# Run backend in QA mode
cargo run --features qa-mode
# Or with pnpm
pnpm run dev:qa
```
When QA mode is enabled:
- `GitPanelCreate` will show only `internal-qa-1` and `internal-qa-2` as recent repos
- Starting any task will perform mock file operations and stream 10 logs over 10 seconds
- Logs follow the ClaudeJson format for compatibility with the existing log processor
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* The TLS error fix is complete. I've replaced the `git2::Repository::clone` call with the `git` CLI approach in `qa_repos.rs`:
**Changes made:**
- Updated `clone_qa_repos_if_needed` function to use `Command::new("git")` with `["clone", "--depth", "1", url, path]` arguments instead of `git2::Repository::clone`
- Added `--depth 1` for shallow cloning (faster)
- Updated error handling to capture stderr output from the git command
The fix uses the git CLI which has reliable TLS support, avoiding the TLS configuration issues that git2 can have on some systems. This matches patterns used elsewhere in the codebase (e.g., `crates/remote/src/github_app/service.rs`).
You can now run `pnpm run backend:dev:qa` or `pnpm run dev:qa` and the QA repos should clone successfully.
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* Done! I've made the mock logs strongly typed by:
1. **Added imports** for `ClaudeJson`, `ClaudeMessage`, `ClaudeContentItem`, and `ClaudeToolData` from the Claude executor
2. **Replaced `generate_mock_logs()`** to use strongly-typed structs:
- Each log entry is now a proper `ClaudeJson` enum variant
- Uses `ClaudeMessage` with proper fields (`id`, `message_type`, `role`, `model`, `content`, `stop_reason`)
- Uses `ClaudeContentItem` variants (`Thinking`, `ToolUse`, `ToolResult`, `Text`)
- Uses `ClaudeToolData` variants (`Read`, `Write`, `Bash`)
- Serializes to JSON using `serde_json::to_string()` for correct escaping
3. **Updated tests** to verify the logs deserialize back to `ClaudeJson` types
This ensures:
- All fields match what `ClaudeLogProcessor::process_logs()` expects
- No manual JSON escaping needed (serde handles it)
- Compile-time type checking prevents malformed logs
- Session IDs are consistent across all entries
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* Done! I've fixed the log display issue by replacing the shell echo approach with a temp file approach:
**Changes made to `crates/executors/src/executors/qa_mock.rs`:**
1. **Write logs to a temp file** instead of embedding them in a shell script:
- Creates a temp file at `$TMPDIR/qa_mock_logs_{uuid}.jsonl`
- Writes all logs as newline-delimited JSON
2. **Use `IFS= read -r` to read the file** - this preserves exact content:
- `IFS=` prevents word splitting
- `-r` prevents backslash interpretation
- `echo "$line"` outputs the exact line content
3. **Clean up the temp file** after reading with `rm -f`
**Benefits:**
- No shell escaping needed - file contents are read verbatim
- Each line is output exactly as serialized by serde_json
- Avoids issues with single quotes, backslashes, and escape sequences
- Temp file is automatically cleaned up after use
This should fix the issue where logs were appearing as raw JSON or with corrupted content due to shell escaping issues.
* fix formatting
* Build succeeds. I've applied the same fix to the two remaining locations that had newlines in their content:
1. **Line 234** - README tool result: Changed `\n\n` to `\\n\\n`
2. **Line 302** - Bash tool result: Changed `\n` to `\\n`
This matches the pattern the user established in the assistant final message (line 318) where `\\n` is used instead of `\n` to ensure newlines are properly preserved through the serialization and display pipeline.
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* simplify scripts
* update agents.md
* fix: update font-feature-settings in diff-style-overrides.css (#1827)
* fix: update font-feature-settings in diff-style-overrides.css
Changed the font-feature-settings property for the diff-tailwindcss-wrapper to disable ligatures by setting it to "liga" off, ensuring consistent text rendering across different components.
* chore: run formatter
---------
Co-authored-by: Pedro <>
* feat: remove `agent_working_dir` from settings (#1874)
* remove configurable agent_working_dir
(cherry picked from commit 285b3e04abceeb8e4a4ee1be16e3de97a8f32299)
* calculate agent_working_dir on create and start task
* i18n
* Fix gh CLI compatibility for older versions missing baseRefOid field
**Changes:**
1. Added `GhApiPr` and `GhApiRef` structs (lines 31-46) to deserialize the GitHub REST API response
2. Added `get_pr_info_via_api()` function (lines 103-141) as a fallback that uses `gh api repos/{owner}/{repo}/pulls/{number}`
3. Modified `get_pr_info()` (lines 166-170) to detect "unknown json field" errors and fall back to the API method
**How it works:**
- Modern `gh` CLI versions continue to use the faster `gh pr view --json` approach
- When an older `gh` CLI returns "Unknown JSON field: baseRefOid", the code catches this error and falls back to `gh api` which uses the stable REST API
- The REST API fields (`base.sha`, `head.sha`, `head.ref`) have been stable for years and work with all `gh` CLI versions
* Make local build script work across more platforms (#1681)
* Enhance local build script and frontend package configuration
- Updated `local-build.sh` to detect OS and architecture, setting the target directory dynamically based on the platform.
- Modified build and lint scripts in `frontend/package.json` to include `NODE_OPTIONS=--max-old-space-size=4096` for improved memory management during builds and linting.
* Enhance local build script and frontend package configuration
- Updated `local-build.sh` to detect OS and architecture, setting the target directory dynamically based on the platform.
- Modified build and lint scripts in `frontend/package.json` to include `NODE_OPTIONS=--max-old-space-size=4096` for improved memory management during builds and linting.
* Solve task follow up section infinite loop (#1955)
**Root cause:** The `switch` statement was missing a `default` case. When `typ.type` didn't match any handled case, the loop continued forever because `curr` was never updated.
**Changes made:**
1. **`vibe-kanban/frontend/src/utils/executor.ts`** (line 59-60): Added `default:` to fall through with `ScriptRequest`, advancing to the next action for any unhandled types.
2. **`vibe-kanban/frontend/src/components/tasks/TaskFollowUpSection.tsx`**:
- Removed duplicate local `extractProfile` function (17 lines)
- Added import from `@/utils/executor`
- Updated usage to `extractProfileFromAction`
3. **`vibe-kanban/frontend/src/components/NormalizedConversation/RetryEditorInline.tsx`**:
- Removed duplicate local `extractProfile` function (17 lines)
- Added import from `@/utils/executor`
- Updated usage to `extractProfileFromAction`
Both type checks (TypeScript and Rust/cargo) pass successfully.
* Add accelerated 1-hour cleanup for archived workspaces or inactive tasks (Vibe Kanban) (#1952)
* The implementation is complete. Here's a summary of the changes:
## Summary
Modified `crates/db/src/models/workspace.rs` in the `find_expired_for_cleanup()` function:
1. **Added task join** - `JOIN tasks t ON w.task_id = t.id` to access the task's status
2. **Conditional expiration threshold** in the `HAVING` clause:
- **1 hour** if workspace is archived AND task status is NOT `inprogress` or `inreview`
- **72 hours** otherwise (preserves existing behavior)
```sql
HAVING datetime('now',
CASE
WHEN w.archived = 1 AND t.status NOT IN ('inprogress', 'inreview')
THEN '-1 hours'
ELSE '-72 hours'
END
) > datetime(...)
```
This means archived workspaces for completed/cancelled/todo tasks will be cleaned up much faster (1 hour vs 72 hours), while active work remains protected.
* Done! I've:
1. **Fixed the condition** from `AND` to `OR` in `crates/db/src/models/workspace.rs:350`
2. **Updated the doc comment** to reflect the correct logic
3. **Regenerated the SQLx cache** with `pnpm run prepare-db`
4. **Updated the PR** with the corrected title and description
The accelerated cleanup now triggers when:
- The workspace is archived (regardless of task status), **OR**
- The task is not actively being worked on (todo/done/cancelled)
* Fix comparison between EP and Workspace during cleanup (#1959)
* Increase max height of chat box (#1957)
I've successfully implemented the change to allow the `ChatBoxBase.tsx` to expand vertically up to 50% of the window height.
**Change made in** `vibe-kanban/frontend/src/components/ui-new/primitives/ChatBoxBase.tsx:144`:
```tsx
// Before:
className="min-h-0 max-h-[min(15rem,20vh)] overflow-y-auto"
// After:
className="min-h-0 max-h-[50vh] overflow-y-auto"
```
**What this does:**
- The old constraint `max-h-[min(15rem,20vh)]` limited the editor to whichever was smaller: 15rem or 20% of viewport height
- The new constraint `max-h-[50vh]` allows the editor to grow up to 50% of the viewport height
- The editor still starts small and only expands as content is added (due to `min-h-0`)
- `overflow-y-auto` ensures scrolling when content exceeds the max height
**Verification:**
- ✅ TypeScript check passes (`pnpm run check`)
- ✅ ESLint passes (`pnpm run lint`)
- The dev server was started and the change was tested in the browser (though the browser MCP encountered an issue during extended testing)
* Done. I've updated the agent install hints across all 6 locales: (#1960)
**Changes made:**
- `notFound`: Changed from "Not Found" → "Unknown" (and equivalent in other languages)
- `notFoundTooltip`: Changed from "No previous usage detected. Agent may require installation and/or login." → "We couldn't verify this agent is set up, but go ahead and try it."
**Files modified:**
- `frontend/src/i18n/locales/en/settings.json`
- `frontend/src/i18n/locales/es/settings.json`
- `frontend/src/i18n/locales/ja/settings.json`
- `frontend/src/i18n/locales/ko/settings.json`
- `frontend/src/i18n/locales/zh-Hans/settings.json`
- `frontend/src/i18n/locales/zh-Hant/settings.json`
The new wording is softer and encourages users to just try the agent rather than assuming it's not installed.
* Fix QA mode lint warnings with conditional compilation attributes (Vibe Kanban) (#1958)
* All lint checks pass. Here's a summary of the fixes I made:
**Fixed files:**
1. **`crates/executors/src/actions/coding_agent_follow_up.rs`**:
- Made `ExecutorConfigs` import conditional with `#[cfg(not(feature = "qa-mode"))]`
- Added `let _ = &approvals;` in qa-mode block to silence unused variable warning
2. **`crates/executors/src/actions/coding_agent_initial.rs`**:
- Same fixes as above
3. **`crates/executors/src/executors/qa_mock.rs`**:
- Changed `std::io::Error::new(std::io::ErrorKind::Other, e)` to `std::io::Error::other(e)` (clippy `io_other_error` lint)
4. **`crates/services/src/services/container.rs`**:
- Made `ExecutorConfigs` import conditional with `#[cfg(not(feature = "qa-mode"))]`
- Renamed `executor_profile_id` to `_executor_profile_id` to indicate it's conditionally used
5. **`crates/services/src/services/filesystem.rs`**:
- Made imports conditional: `HashSet`, `WalkBuilder`, and `CancellationToken` are only needed in non-qa-mode
- Added `#[cfg(not(feature = "qa-mode"))]` to helper functions: `get_directories_to_skip`, `list_git_repos_with_timeout`, `list_git_repos_inner`
- Renamed parameters to `_path`, `_timeout_ms`, `_hard_timeout_ms`, `_max_depth` since they're not used in qa-mode
- Removed needless `return` statements in qa-mode blocks
6. **`crates/services/src/services/qa_repos.rs`**:
- Changed `&PathBuf` to `&std::path::Path` in function parameter (clippy `ptr_arg` lint)
* Cleanup script changes for workspace 6fcb2b78-f418-451f-9a22-8d4381a538f0
* All lint checks pass. The fix now uses `#[cfg_attr(feature = "qa-mode", allow(unused_variables))]` which cleanly communicates that the variables are intentionally unused only in qa-mode, while keeping the normal parameter names.
* All lint checks pass. Fixed by using `#[cfg_attr(feature = "qa-mode", allow(unused_variables))]` and keeping the proper variable name `executor_profile_id` (which is used in non-qa-mode).
* All lint checks pass. The changes are now cleaner - using `#[cfg_attr(feature = "qa-mode", allow(unused_variables))]` on the function instead of `let _ = &approvals;` inside the qa-mode block.
To summarize the cleanup: I replaced the inline `let _ = &approvals;` workaround in `coding_agent_initial.rs` and `coding_agent_follow_up.rs` with the cleaner `#[cfg_attr]` attribute on the function, which is consistent with how we handled it in `filesystem.rs` and `container.rs`.
* I've made both changes: (#1962)
1. **Moved the Dev Server Script input** to be the first field in the Scripts & Configuration section (in `ReposSettings.tsx`)
2. **Updated the section description** in the English locale to mention "dev server" scripts: the description now reads "Configure dev server, setup, cleanup, and copy files for this repository..."
* feat(notifications): include task name in approval needed notification (#1879)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <[email protected]>
* Add Push button to Git panel when PR is open with unpushed commits (Vibe Kanban) (#1951)
* The implementation is complete. Here's a summary of what I changed:
## Summary
Added a "Push" button to the workspaces UI Git panel. The changes allow users to push changes when a PR is already open.
### Files Modified:
1. **`frontend/src/components/ui-new/primitives/RepoCard.tsx`** (lines 27-42)
- Added `'push'` to the `RepoAction` type union
- Added a new option to `repoActionOptions` array with the Push button configuration using `ArrowUpIcon`
2. **`frontend/src/components/ui-new/actions/index.ts`** (lines 33, 691-707)
- Imported `ArrowUpIcon` from phosphor-icons
- Added `GitPush` action definition that:
- Calls `attemptsApi.push()` with the workspace and repo IDs
- Handles the `force_push_required` error case
- Invalidates workspace queries on success to refresh the UI
3. **`frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`** (line 103)
- Added mapping from `'push'` action to `Actions.GitPush` in the action handler
The Push button now appears in the Git panel dropdown alongside "Open pull request" and "Merge" options.
* The type check passes. Here's a summary of the updated changes:
## Summary
The Push button now appears **next to the PR number** when:
1. A PR is already open (`prStatus === 'open'`)
2. There are new commits ahead (`commitsAhead > 0`)
### Changes Made:
**`frontend/src/components/ui-new/primitives/RepoCard.tsx`**:
- Removed `push` from the `repoActionOptions` dropdown (lines 34-41)
- Added a dedicated Push button in the PR status row (lines 213-222) that:
- Only appears when `prStatus === 'open'` AND `commitsAhead > 0`
- Uses brand primary styling (`bg-brand-primary`) to make it prominent
- Displays with an up arrow icon and "Push" label using existing translation
- Calls `onActionsClick?.('push')` when clicked
The `GitPush` action and handler mapping from the previous changes remain in place to handle the push operation.
* Done. The Push button now uses the same styling as the "Open PR" button: `bg-panel text-normal hover:bg-tertiary`.
* The type check passes. Here's a summary of the fix:
## Summary
The Push button now correctly uses `remoteCommitsAhead` (unpushed commits to remote) instead of `commitsAhead` (total commits ahead of target branch) to determine when to show.
### Changes Made:
1. **`frontend/src/components/ui-new/views/GitPanel.tsx`**:
- Added `remoteCommitsAhead: number` to the `RepoInfo` interface
- Pass `remoteCommitsAhead` to `RepoCard`
2. **`frontend/src/components/ui-new/primitives/RepoCard.tsx`**:
- Added `remoteCommitsAhead?: number` to `RepoCardProps`
- Changed the push button condition from `commitsAhead > 0` to `remoteCommitsAhead > 0`
3. **`frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`**:
- Added `remoteCommitsAhead: repoStatus?.remote_commits_ahead ?? 0` to the `repoInfos` mapping
Now the Push button will:
- Only appear when there's an open PR AND there are unpushed commits (`remote_commits_ahead > 0`)
- Disappear after a successful push (when `remote_commits_ahead` becomes 0)
- Reappear when new commits are made locally that haven't been pushed
* The type check passes. Here's a summary of the changes:
## Summary
The Push button now hides immediately when clicked and only reappears when new commits are available:
### Changes to `RepoCard.tsx`:
- Added `useState` and `useRef` imports
- Added `isPushHidden` state to track when the button should be hidden
- Added `lastRemoteCommitsAhead` ref to track the previous value
- Added `useEffect` that resets `isPushHidden` to `false` when `remoteCommitsAhead` increases (meaning new commits are available)
- Added `handlePushClick` function that hides the button immediately and triggers the push action
- Updated the button condition to include `!isPushHidden`
The button will:
1. Hide immediately when clicked (no double-clicking possible)
2. Stay hidden until `remoteCommitsAhead` increases above the last known value
3. Reappear when new local commits are made that need to be pushed
* Both the linter and type check pass. The linter errors are fixed. Here's a summary of the changes:
## Summary of Linter Fixes
The linter was flagging that `RepoCard` (a presentational component) should not manage state or have side effects. I refactored the code to lift the state up to the container component:
### Changes:
1. **`RepoCard.tsx`** - Made purely presentational:
- Removed `useState`, `useRef`, `useEffect` imports
- Removed `remoteCommitsAhead` prop
- Added `showPushButton` prop (boolean, controlled by parent)
- Added `onPushClick` callback prop
- The button now just renders based on `showPushButton` and calls `onPushClick`
2. **`GitPanel.tsx`** - Updated interface and props:
- `RepoInfo` now has optional `remoteCommitsAhead` and `showPushButton` fields
- Added `onPushClick` callback to `GitPanelProps`
- Passes `showPushButton` and `onPushClick` to `RepoCard`
3. **`WorkspacesLayout.tsx`** - State management moved here:
- Added `hiddenPushRepos` state (Set of repo IDs where push was clicked)
- Added `lastRemoteCommitsAhead` ref to track previous values
- Added `useEffect` to reset hidden state when `remoteCommitsAhead` increases
- Added `repoInfosWithPushButton` memo that computes `showPushButton` for each repo
- Added `handlePushClick` that hides button immediately and executes push action
* prettier fix
* Done. I've added `GitPush` to the Git actions list in the command bar. It now appears between "Merge" and "Rebase" in the Git Actions menu.
* Both type check and lint pass.
Done! The Push action in the command bar now has the same visibility conditions as in the Git panel - it only appears when:
1. There's a workspace
2. There are git repos
3. There's an open PR (`hasOpenPR`)
4. There are unpushed commits (`hasUnpushedCommits`)
### Summary of changes:
1. **`frontend/src/components/ui-new/actions/index.ts`**:
- Added `hasOpenPR` and `hasUnpushedCommits` to `ActionVisibilityContext`
- Updated `GitPush.isVisible` to check these new context properties
2. **`frontend/src/components/ui-new/actions/useActionVisibility.ts`**:
- Added `useBranchStatus` hook to get branch status data
- Computed `hasOpenPR` by checking if any repo has an open PR in merges
- Computed `hasUnpushedCommits` by checking if any repo has `remote_commits_ahead > 0`
- Added these values to the returned context
* The refactoring is complete. Here's a summary of the changes:
## Summary of Changes
The push button logic has been simplified by using React Query's mutation state instead of manually tracking hidden state with refs and effects.
### Key Changes:
1. **WorkspacesLayout.tsx (`GitPanelContainer`)**:
- Removed the complex `useEffect` that tracked `lastRemoteCommitsAhead` and managed `hiddenPushRepos` state
- Removed `hiddenPushRepos` state and `lastRemoteCommitsAhead` ref
- Added `usePush` hook with callbacks that:
- On success: awaits query invalidation before clearing the loading state
- On error: clears the loading state
- Added simple `pushingRepoId` state to track which repo is being pushed
- The button now shows loading state during push and automatically disappears after refetch if `remoteCommitsAhead` becomes 0
2. **GitPanel.tsx**:
- Added `isPushPending?: boolean` to `RepoInfo` interface
- Passes `isPushPending` to `RepoCard`
3. **RepoCard.tsx**:
- Added `isPushPending` prop
- Button shows while either `showPushButton` or `isPushPending` is true
- Button is disabled and shows spinner with "Pushing..." text when pending
- Uses existing translation key `git.states.pushing`
### How it works now:
1. User clicks push button
2. Button immediately shows loading state (spinner + "Pushing...")
3. Button is disabled to prevent multiple clicks
4. Push mutation runs
5. On success, query invalidation completes before clearing loading state
6. Once `branchStatus` refetches, if `remoteCommitsAhead` is 0, `showPushButton` becomes false and button disappears
7. On error, loading state clears and button returns to normal
This approach is simpler and more predictable than manually tracking previous values.
* Done. The push button now shows success feedback like the old UI:
## Summary of Changes
The push button now has three states:
1. **Normal**: Shows "Push" with an up arrow icon
2. **Pending**: Shows "Pushing..." with a spinning icon, button is disabled
3. **Success**: Shows "Pushed!" with a green checkmark icon and green background for 2 seconds
The flow is:
1. User clicks "Push"
2. Button immediately shows "Pushing..." with spinner
3. Push completes, queries are invalidated and refetched
4. Button shows green "Pushed!" for 2 seconds
5. Button disappears (if no more commits to push) or returns to normal state
* All code review issues have been addressed:
## Summary of Changes
1. **Unified push logic** - Now uses `executeAction(Actions.GitPush, ...)` instead of calling `usePush` hook directly. This ensures consistent error handling between the button and command bar.
2. **Proper setTimeout cleanup** - Added `successTimeoutRef` with a cleanup effect that clears the timeout when the component unmounts:
```typescript
const successTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
useEffect(() => {
return () => {
if (successTimeoutRef.current) {
clearTimeout(successTimeoutRef.current);
}
};
}, []);
```
3. **Error feedback** - Added error state handling:
- New `isPushError` prop flows through GitPanel to RepoCard
- Button shows red "Failed" with warning icon when push fails
- Error state clears after 3 seconds
- Added `git.states.pushFailed` translation key
4. **Simplified state management** - Changed from separate `pushingRepoId` and `pushSuccessRepoId` to a single `pushStates` record with `PushState` type (`'idle' | 'pending' | 'success' | 'error'`)
* All i18n checks pass now.
* Both code review issues have been addressed:
## Summary of Changes
### 1. Fixed stale closure issue
- Added a `pushStatesRef` that mirrors the `pushStates` state
- Changed the check from `pushStates[repoId]` to `pushStatesRef.current[repoId]`
- Removed `pushStates` from the dependency array
### 2. Added proper error logging and user-facing error message
- Modified `ActionsContext.tsx` to re-throw errors after showing the dialog, so callers can handle them
- Added `console.error('Push failed:', error)` for debugging purposes
- The error dialog is already shown by `executeAction` via `ConfirmDialog`
- The button now properly shows the error state when push fails
* fmt
* The fix is in place. The key change is:
- When we're in a "push flow" (state is `pending`, `success`, or `error`), we set `showPushButton: false` but the button remains visible because of the `isPushPending || isPushSuccess || isPushError` condition in RepoCard
- This prevents the race condition where the query refetch could hide the button before we set the success state
* All checks pass. The changes now:
1. **Reverted ActionsContext** - Removed the re-throw to maintain backwards compatibility
2. **Use `usePush` hook directly** - For proper success/error detection instead of going through `executeAction`
3. **Show error dialog manually** - Using `ConfirmDialog.show()` when push fails
4. **Track current repo with ref** - `currentPushRepoRef` tracks which repo is being pushed so callbacks can update the correct state
* All checks pass. Here's a summary of the force push handling:
## Force Push Functionality
Yes, force push is fully supported. Here's how it works:
**Old UI (`useGitOperations.ts`):**
1. When `usePush` fails with `errorData.type === 'force_push_required'`
2. It automatically shows `ForcePushDialog`
3. The dialog warns the user about the consequences and lets them confirm
4. If confirmed, it calls `useForcePush` to execute the force push
**New UI (now updated):**
1. When the push button is clicked and fails with `force_push_required`
2. The push state is reset to `idle` (so the button returns to normal)
3. `ForcePushDialog` is shown with the attemptId and repoId
4. User can confirm or cancel the force push from the dialog
The `ForcePushDialog` handles its own loading state, success/error feedback, and API call internally via `useForcePush` hook.
* clear pushStates on workspace change
Co-authored-by: Copilot <[email protected]>
---------
Co-authored-by: Copilot <[email protected]>
* Fix workspace sidebar ordering to use updated_at instead of created_at (Vibe Kanban) (#1965)
* Done. I've updated the workspace sorting in `frontend/src/components/ui-new/hooks/useWorkspaces.ts` to use `updated_at` instead of `created_at`. Both active and archived workspaces will now be sorted by their most recent update time (with pinned workspaces still appearing first). All type checks and lint pass.
* Cleanup script changes for workspace 37e99d73-8ab0-4501-990e-1007d78e44aa
* Fix search input losing focus when hovering over dropdown items (Vibe Kanban) (#1966)
* Done! Here's a summary of the changes:
## Changes Made
### 1. `Dropdown.tsx` (lines 140-190)
- Added `preventFocusOnHover?: boolean` prop to `DropdownMenuItemProps` interface
- Added `onPointerMove` handler that calls `e.preventDefault()` when `preventFocusOnHover` is true, which stops Radix from stealing focus on hover
### 2. `SearchableDropdown.tsx` (line 110)
- Added `preventFocusOnHover` prop to `DropdownMenuItem`
### 3. `ProjectSelectorContainer.tsx` (lines 181, 208)
- Added `preventFocusOnHover` prop to both `DropdownMenuItem` components (the "Create new project" button and the virtualized project items)
The fix uses `e.preventDefault()` on `onPointerMove` to disable Radix's hover-to-focus behavior, as documented in [Radix UI Issue #2193](https://github.com/radix-ui/primitives/issues/2193). This preserves all other functionality (click, keyboard navigation, selection) while allowing the search input to retain focus when hovering over items.
* Done! I've added the `onPointerLeave` handler to `DropdownMenuItem` alongside the existing `onPointerMove` handler. Both now call `e.preventDefault()` when `preventFocusOnHover` is true.
**Summary of the fix:**
- Added `onPointerLeave` destructuring from props (line 161)
- Added `onPointerLeave` handler that calls `e.preventDefault()` when `preventFocusOnHover` is true (lines 187-194)
Per the [Radix UI Issue #2193](https://github.com/radix-ui/primitives/issues/2193), **both** `onPointerMove` and `onPointerLeave` need `preventDefault()` to fully disable hover-to-focus behavior.
* Script Fixer Dialog (Vibe Kanban) (#1968)
* All checks pass. Let me provide a summary of what was implemented:
## Summary
I've implemented the Script Fixer Dialog feature. Here's what was created and modified:
### New File Created:
1. **`frontend/src/components/dialogs/scripts/ScriptFixerDialog.tsx`** - A new dialog component that:
- Shows the current script content in an editable textarea
- Displays the last execution logs using `VirtualizedProcessLogs`
- Provides "Save" and "Save and Test" buttons
- Supports both setup scripts and dev server scripts
- Handles multi-repo scenarios with a repo selector dropdown
### Files Modified:
**New UI (Setup Script):**
1. **`ChatScriptEntry.tsx`** - Added `onFix` prop and a "Fix Script" button that appears when a script fails
2. **`NewDisplayConversationEntry.tsx`** - Added `ScriptEntryWithFix` wrapper component that provides the fix handler to `ChatScriptEntry`
**Legacy UI (Setup Script):**
3. **`DisplayConversationEntry.tsx`** - Added `ScriptFixButton` component that renders a fix button for failed scripts in the legacy conversation view
**Preview/Dev Server:**
4. **`PreviewPanel.tsx`** - Added "Fix Script" button to the troubleshooting alert when dev server has issues
5. **`PreviewBrowser.tsx`** - Added optional `handleFixDevScript` prop and "Fix Script" button alongside "Start Server"
6. **`PreviewBrowserContainer.tsx`** - Wired up the dialog opening for dev server script fixes
7. **`PreviewControls.tsx`** - Added `onFixScript` prop and "Fix Script" button in the dev server controls
8. **`PreviewControlsContainer.tsx`** - Wired up the dialog opening for the controls
**Translations:**
9. **`tasks.json` (English)** - Added `scriptFixer` translation keys
* Cleanup script changes for workspace 5496d4c0-d1d3-4e6a-b9d0-6a421270eeac
* Type check passes. I've updated the `ScriptFixerDialog` to also start the dev server when "Save and Test" is clicked for dev_server script type.
* Done! I've updated the `ScriptFixerDialog` to:
1. **Keep the dialog open after "Save and Test"** - The dialog no longer closes after clicking "Save and Test", so the user can watch the logs update in real-time as the script executes
2. **Changed "Cancel" to "Close"** - The button now says "Close" (using `t('common:close')`) and is always enabled, making it clear the user can close the dialog at any time
3. **Logs update automatically** - The `useExecutionProcesses` and `useLogStream` hooks will automatically pick up the new execution process and stream its logs in real-time
* Cleanup script changes for workspace 5496d4c0-d1d3-4e6a-b9d0-6a421270eeac
* Done! I've fixed the horizontal overflow by adding `min-w-0` to all flex containers and `overflow-hidden` to the `DialogContent`. This prevents flex children from overflowing their container horizontally.
* The type check passes. The fix has been applied - the width constraints (`max-w-4xl w-[90vw]`) are now on the `Dialog` component instead of `DialogContent`. This will override the default `max-w-xl` from the Dialog component's base className, allowing the dialog to be wider and preventing horizontal overflow.
* Done! I've added the status indicator to the ScriptFixerDialog. Here's what was implemented:
**Changes made:**
1. **`ScriptFixerDialog.tsx`:**
- Added import for `RunningDots` component
- Added status computation logic to determine if the process is running, succeeded, failed, or killed
- Added status indicator UI next to the "Last Execution Logs" label showing:
- Animated dots + "Running..." when the script is executing
- Green dot + "Completed successfully" when script succeeded (exit code 0)
- Red dot + "Failed with exit code X" when script failed
- Gray dot + "Process was killed" when killed
2. **`tasks.json` (translations):**
- Added `statusRunning`, `statusSuccess`, `statusFailed`, and `statusKilled` translation keys
The status indicator will update in real-time as the script executes since it's computed from `latestProcess` which is updated via the `useExecutionProcesses` hook.
* Fixed! The issue was that `exit_code` can be `null` when the process completes successfully, and comparing `null !== BigInt(0)` returns `true`, which incorrectly triggered the error state.
The fix:
- Treat `exit_code === null` as success (same as exit code 0)
- Only show error when `exit_code` is explicitly a non-zero value
* Fixed. The issue was that `exit_code` comes back as a regular number `0` from the API, but the TypeScript type says `bigint`. Using `Number(exitCode) === 0` handles both cases correctly and satisfies the type checker.
* Fixed! The translation key was missing the `buttons.` namespace prefix. It now uses `t('common:buttons.close')` which maps to "Close".
* Done. Added `bg-error` and `text-error` classes alongside the `destructive` classes for the error state.
* styles
* Done! I've fixed the issue by passing `sessionId` to the `ScriptFixerDialog` in all three files:
1. **`PreviewPanel.tsx`** - Gets `sessionId` from `devServerProcesses[0]?.session_id`
2. **`PreviewBrowserContainer.tsx`** - Added `devServerProcesses` to destructuring from `usePreviewDevServer` and passes `sessionId`
3. **`PreviewControlsContainer.tsx`** - Already had `devServerProcesses`, just added `sessionId` to the dialog call
Now when you click "Save and Test" for a dev server script, the dialog will receive the session ID, connect to the WebSocket stream, and show the execution logs in real-time.
* rollback trigger the ScriptFixer for old UI
* Done! I've extended the ScriptFixerDialog to support cleanup scripts. Here's a summary of the changes:
**1. `frontend/src/i18n/locales/en/tasks.json`**
- Added `cleanupScriptTitle: "Fix Cleanup Script"` translation key
**2. `frontend/src/components/dialogs/scripts/ScriptFixerDialog.tsx`**
- Updated `ScriptType` from `'setup' | 'dev_server'` to `'setup' | 'cleanup' | 'dev_server'`
- Updated `latestProcess` filter to use `'cleanupscript'` run_reason for cleanup scripts
- Updated script fetching logic to read `cleanup_script` field
- Updated both `handleSave` and `handleSaveAndTest` to save `cleanup_script` field
- Updated execution logic to call `attemptsApi.runCleanupScript(workspaceId)` for cleanup scripts
- Updated dialog title to show "Fix Cleanup Script" for cleanup type
- Updated placeholder text to show `#!/bin/bash\nrm -rf node_modules` for cleanup scripts
**3. `frontend/src/components/ui-new/NewDisplayConversationEntry.tsx`**
- Fixed the scriptType mapping so "Cleanup Script" maps to `'cleanup'` instead of incorrectly mapping to `'setup'`
* All tasks are complete. Here's a summary of the changes I made:
## Summary
I've implemented the ScriptFixerDialog in the old UI for both `DisplayConversationEntry.tsx` and `PreviewPanel.tsx`.
### Changes Made:
**1. `DisplayConversationEntry.tsx`** (`frontend/src/components/NormalizedConversation/DisplayConversationEntry.tsx`):
- Added imports for `ScriptFixerDialog`, `ScriptType`, `useAttemptRepo`, `Button`, and `Wrench` icon
- Added `SCRIPT_TOOL_NAMES` constant to identify script entries
- Added `getScriptType()` helper function to map tool names to script types
- Created `ScriptToolCallCard` component that wraps `ToolCallCard` and adds a "Fix Script" button for failed scripts
- Modified `renderToolUse()` to detect script entries and render them with `ScriptToolCallCard`
**2. `PreviewPanel.tsx`** (`frontend/src/components/panels/PreviewPanel.tsx`):
- Added imports for `ScriptFixerDialog`, `useAttemptRepo`, and `Wrench` icon
- Added `useAttemptRepo(attemptId)` hook to get repos
- Added `handleFixDevScript()` function that opens the ScriptFixerDialog
- Added `canFixDevScript` computed value
- Added "Fix Dev Script" button in the troubleshooting alert next to the "Stop and Edit" button
**3. Translation Keys**:
- Added `conversation.fixScript: "Fix Script"` in `en/common.json`
- Added `preview.troubleAlert.fixScript: "Fix Dev Script"` in `en/tasks.json`
The implementation follows the same pattern as the new UI's `ScriptEntryWithFix` component in `NewDisplayConversationEntry.tsx`, using `useAttemptRepo` hook to fetch repos instead of `useWorkspaceContext` (which is only available in the new design scope).
* Cleanup script changes for workspace 5496d4c0-d1d3-4e6a-b9d0-6a421270eeac
* All tasks are complete. Here's a summary of the fixes made:
## Summary of Changes
### Problem
The "Fix Dev Script" button was only showing in the troubleshooting alert, which only appears when a dev server is **running** but slow to respond. When the dev server script **fails to start** (exits with error), there are no running dev servers, so the user saw `NoServerContent` without any fix option.
### Solution
**1. `PreviewPanel.tsx`** - Added failed dev server detection:
```typescript
const failedDevServerProcess = devServerProcesses.find(
(p) =>
p.status === 'failed' ||
(p.status === 'completed' && p.exit_code !== null && p.exit_code !== 0n)
);
const hasFailedDevServer = Boolean(failedDevServerProcess);
```
And passed `hasFailedDevServer` and `onFixDevScript` to `NoServerContent`.
**2. `NoServerContent.tsx`** - Added new props and "Fix Dev Script" button:
- Added `hasFailedDevServer?: boolean` and `onFixDevScript?: () => void` props
- Added fix button that shows when dev server has failed
**3. Translation Keys** - Added `preview.noServer.fixScript: "Fix Dev Script"` to `en/tasks.json`
Now when a user tries to start a dev server and it fails, they'll see the "Fix Dev Script" button in the `NoServerContent` view, allowing them to open the ScriptFixerDialog to fix the script.
* Done! I've successfully added all the Script Fixer i18n translations to the 5 non-English locale files:
**Summary of changes:**
### common.json files (5 files updated)
Added `fixScript` key to the `conversation` section:
- **es**: `"Corregir Script"`
- **ja**: `"スクリプトを修正"`
- **ko**: `"스크립트 수정"`
- **zh-Hans**: `"修复脚本"`
- **zh-Hant**: `"修復腳本"`
### tasks.json files (5 files updated)
1. Added `fixScript` to `preview.noServer` section
2. Added `fixScript` to `preview.troubleAlert` section
3. Added the entire `scriptFixer` section with 17 keys including:
- `title`, `setupScriptTitle`, `cleanupScriptTitle`, `devServerTitle`
- `scriptLabel`, `logsLabel`
- `saveButton`, `saveAndTestButton`, `saving`, `testing`
- `noLogs`, `selectRepo`, `fixScript`
- `statusRunning`, `statusSuccess`, `statusFailed`, `statusKilled`
All type checks (`pnpm run check`) passed successfully.
* Both lint and type check pass now. Here's a summary of the lint fixes I made:
**Fixed lint issues in:**
1. **`ScriptFixerDialog.tsx`** (lines 198 and 253):
- Added missing `repos` dependency to both `handleSave` and `handleSaveAndTest` useCallback hooks
- Removed unnecessary `modal` dependency from `handleSaveAndTest`
2. **`NewDisplayConversationEntry.tsx`** (line 658):
- Used a `useRef` pattern to access `repos` inside the `handleFix` callback without including it in the dependency array, since the `repos` array is recreated on every render from context
* All checks pass. The fix is complete.
**Summary:** The "Fix Script" button in `PreviewControls` will now only appear when the latest dev server process has a status of `'failed'`. When the dev server is running, completed successfully, or was killed by the user, the button will be hidden.
* chore: bump version to 0.0.149
* Prevent WorkspacesSidebar re-render on workspace switch (Vibe Kanban) (#1973)
* The refactoring is complete. Here's a summary of what was changed:
## Summary
**File modified:** `vibe-kanban/frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`
**Change:** Restructured `renderContent()` so that `WorkspacesSidebar` is rendered **outside** the `ExecutionProcessesProvider`.
### Before:
```tsx
<ExecutionProcessesProvider key={`${selectedWorkspace?.id}-${selectedSessionId}`}>
<ReviewProvider>
<Allotment>
<Allotment.Pane>{renderSidebar()}</Allotment.Pane> // Inside provider
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
</Allotment>
</ReviewProvider>
</ExecutionProcessesProvider>
```
### After:
```tsx
<Allotment>
<Allotment.Pane>{renderSidebar()}</Allotment.Pane> // OUTSIDE provider - won't remount
<ExecutionProcessesProvider key={`${selectedWorkspace?.id}-${selectedSessionId}`}>
<ReviewProvider>
<>
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
</>
</ReviewProvider>
</ExecutionProcessesProvider>
</Allotment>
```
**Result:** When switching workspaces, the `ExecutionProcessesProvider`'s key changes, which unmounts/remounts only panes 2-4. The sidebar pane stays mounted and won't re-render unnecessarily.
* The implementation is complete. Here's a summary of what was changed:
## Summary
**File modified:** `vibe-kanban/frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`
### Changes:
1. **Created nested Allotments structure:**
- **Outer Allotment** (2 panes): Sidebar + Content container
- **Inner Allotment** (3 panes): Main + Changes/Logs + Git Panel
2. **Separated resize handlers:**
- `handleOuterPaneResize`: Handles sidebar width only
- `handleInnerPaneResize`: Handles main, changes/logs, and git panel widths
3. **Removed old `handlePaneResize`** which was designed for the flat 4-pane structure
### Result:
```
Outer Allotment
├── Sidebar Pane (OUTSIDE providers - won't remount)
└── Content Pane
└── ExecutionProcessesProvider (keyed)
└── ReviewProvider
└── Inner Allotment
├── Main Pane
├── Changes/Logs Pane
└── Git Panel Pane
```
Now when switching workspaces:
- The `ExecutionProcessesProvider` with its key will remount the inner Allotment (ensuring clean state)
- The sidebar stays mounted because it's outside the keyed provider
- Layout looks the same as before (sidebar on left, 3 panes on right)
* Revert "Fix workspace sidebar ordering to use updated_at instead of created_at (Vibe Kanban) (#1965)" (#1974)
This reverts commit 8dc07ee2b2cabc1326f0aad5a8977c66f98b6f75.
* update cursor-agent models (#1977)
* The frontend TypeScript check passed without errors. (#1978)
The implementation is complete. The change removes the Bash-only restriction so that any tool with output (including MCP tools like `mcp:dev-manager:stop`) can now be clicked to view their results in the logs panel.
**Summary of changes:**
- **File:** `vibe-kanban/frontend/src/components/ui-new/NewDisplayConversationEntry.tsx`
- **Change:** Simplified `hasOutput` check in `ToolSummaryEntry` from `isBash && content && content.trim().length > 0` to just `content && content.trim().length > 0`
- **Effect:** MCP tool entries (and any other tool with output) are now clickable to view their JSON results in the logs panel
* Add session-level review endpoint with StartReviewDialog (Vibe Kanban) (#1849)
* All checks pass. Let me provide a summary of what was implemented:
I've implemented the review endpoint as planned. Here's what was created:
1. **`crates/executors/src/actions/review.rs`** - New action type with:
- `RepoReviewContext` struct (repo_id + commit_hashes)
- `ReviewRequest` struct (executor_profile_id, context, additional_prompt, working_dir)
- `Executable` trait impl that calls `executor.spawn_review()`
2. **`crates/server/src/routes/task_attempts/review.rs`** - Endpoint handler with:
- `StartReviewRequest` for the API
- `RepoReviewContext` (endpoint-specific copy)
- `ReviewError::ProcessAlreadyRunning`
- `start_review` handler that:
- Verifies no running processes on workspace
- Creates fresh session
- Builds ReviewRequest action
- Starts execution with `ExecutionProcessRunReason::CodingAgent`
1. **`crates/executors/src/executors/mod.rs`**:
- Added `spawn_review()` to `StandardCodingAgentExecutor` trait with default prompt-based implementation
- Added `build_review_prompt()` helper function
2. **`crates/executors/src/actions/mod.rs`**:
- Added `pub mod review;`
- Added `ReviewRequest` to `ExecutorActionType` enum
- Updated `base_executor()` match
3. **`crates/services/src/services/container.rs`**:
- Updated match in `try_start_next_action` to handle `ReviewRequest`
4. **`crates/server/src/routes/task_attempts.rs`**:
- Added `pub mod review;`
- Added `.route("/review", post(review::start_review))`
5. **`crates/server/src/bin/generate_types.rs`**:
- Added new types to export list
**`POST /task-attempts/{id}/review`**
Request:
```json
{
"executor_profile_id": { "executor": "CLAUDE_CODE", "variant": null },
"context": [{ "repo_id": "uuid", "commit_hashes": ["abc123"] }],
"additional_prompt": "Focus on security issues"
}
```
Response: `ExecutionProcess` on success, `ReviewError` on failure.
To add native review for an executor (e.g., Codex), just override `spawn_review()` in that executor's `StandardCodingAgentExecutor` impl. No changes needed to action or endpoint.
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
All checks pass now. The duplicate type issue is fixed - we're using a single `RepoReviewContext` type from the executors crate.
All checks pass now. Both frontend lint (ESLint) and backend lint (Clippy) are passing.
Found and fixed the real issue. The problem was in `crates/services/src/services/container.rs` - the log normalization was only set up for `CodingAgentInitialRequest` and `CodingAgentFollowUpRequest`. `ReviewRequest` was falling through to the default case and returning `None`, so no normalizer was started for review processes.
Fixed in two places:
1. **Line 787-791**: Added `ReviewRequest` handling in `stream_normalized_logs` (for historic logs)
2. **Line 1149-1151**: Added `ReviewRequest` handling in `start_execution` (for live logs)
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Backend changes for the `use_all_workspace_commits` flag are complete. Here's what was implemented:
Added `use_all_workspace_commits` flag to `StartReviewRequest` for automatically populating review context.
1. **`crates/db/src/models/execution_process_repo_state.rs`**
- Added `find_initial_commits_for_workspace()` - query to get the earliest `before_head_commit` for each repo in a workspace
2. **`crates/server/src/routes/task_attempts/review.rs`**
- Added `use_all_workspace_commits: bool` field to `StartReviewRequest` (defaults to `false`)
- When flag is `true` and `context` is `None`, auto-populates context with initial commits from workspace execution processes
3. **`crates/executors/src/executors/mod.rs`**
- Updated `build_review_prompt()` to detect single-commit context (indicating initial commit)
- When single commit per repo, prompts agent to "Review all changes made since the following base commit(s)" with git diff hint
4. **`crates/services/src/services/git.rs`**
- Added `get_commits_since_branch()` method (may be useful for future use)
5. **`shared/types.ts`**
- Generated TypeScript type includes `use_all_workspace_commits: boolean`
When frontend calls `POST /task-attempts/{id}/review` with:
```json
{
"executor_profile_id": { "executor": "CLAUDE_CODE", "variant": null },
"use_all_workspace_commits": true
}
```
The backend will:
1. Find the earliest execution process for the workspace
2. Get the `before_head_commit` for each repo (the commit before agents started making changes)
3. Pass that to the prompt builder which tells the agent to review all changes since that commit
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Frontend UI implementation is complete. Here's a summary of what was added:
Added simple frontend UI to test the review endpoint.
1. **`frontend/src/lib/api.ts`**
- Added `startReview` method to `attemptsApi`
- Imports `StartReviewRequest`, `ReviewError` types
2. **`frontend/src/hooks/useStartReview.ts`** (NEW)
- Hook that calls `attemptsApi.startReview` with `use_all_workspace_commits: true`
- Invalidates `processes` and `branchStatus` queries on success
3. **`frontend/src/hooks/index.ts`**
- Exports `useStartReview`
4. **`frontend/src/components/ui/actions-dropdown.tsx`**
- Added "Start Review" menu item in the attempt actions section
- Uses the user's default executor profile from config
- Shows loading state while starting review
5. **`frontend/src/i18n/locales/en/tasks.json`**
- Added translation keys: `startReview`, `startingReview`
From the workspace actions dropdown (three dots menu), click "Start Review" to start a code review session using all workspace commits as context.
Done! The fix has been implemented. The review endpoint now uses `Session::find_latest_by_workspace_id` to find an existing session for the workspace, and only creates a new session if none exists. This means review logs will now appear in the same conversation view as other coding agent runs.
**Change summary:**
- Modified `crates/server/src/routes/task_attempts/review.rs` (lines 79-93)
- Instead of always creating a new session, it now checks for an existing session first using `Session::find_latest_by_workspace_id`
- This matches the pattern used by dev server, setup scripts, and other similar endpoints
Done! The fix is now in place. The change adds `ReviewRequest` to the action type filter in `useConversationHistory.ts` so review processes are included in the conversation view, and handles the content extraction appropriately (using `additional_prompt` for reviews instead of `prompt`).
**Change summary:**
- Modified `frontend/src/hooks/useConversationHistory.ts` (lines 226-244)
- Added `ReviewRequest` to the action type filter
- Used conditional to extract content from `additional_prompt` for reviews (with fallback "Review the code changes") vs `prompt` for coding agent requests
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
Done! All fixes are now in place:
1. **`useConversationHistory.ts` - `flattenEntries()`** (line 177-184): Added `ReviewRequest` to the filter so review processes are included in the flattened entries
2. **`useConversationHistory.ts` - `flattenEntriesForEmit()`** (line 226-244): Already fixed earlier - handles `ReviewRequest` and extracts `additional_prompt` for user message content
3. **`ProcessesTab.tsx`** (line 223-228): Added `ReviewRequest` to the ProfileVariantBadge conditional so the agent badge shows for review processes
* Done. Changes made:
1. **`crates/executors/src/actions/review.rs`**: Added `prompt: String` field to `ReviewRequest`
2. **`crates/server/src/routes/task_attempts/review.rs`**:
- Import `build_review_prompt`
- Build the full prompt from context and additional_prompt before creating the action
3. **`frontend/src/hooks/useConversationHistory.ts`**: Simplified content extraction to just use `actionType.prompt` for all action types (since `ReviewRequest` now has a prompt field too)
4. **Regenerated TypeScript types** - `ReviewRequest` in `shared/types.ts` now includes the `prompt` field
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Done. Here's a summary of the changes:
**Backend:**
1. **`crates/executors/src/actions/review.rs`**:
- Added `CommitRange` enum with three variants: `FromBase`, `Specific`, and `Range`
- Updated `RepoReviewContext` to use `repo_name: String` and `commits: CommitRange` instead of `commit_hashes`
2. **`crates/executors/src/executors/mod.rs`**:
- Updated `build_review_prompt` to format output with repo names and handle all `CommitRange` variants
3. **`crates/server/src/routes/task_attempts/review.rs`**:
- Simplified `StartReviewRequest` (removed `context` field, kept `use_all_workspace_commits`)
- Updated handler to look up repo names via `Repo::find_by_ids` and use `CommitRange::FromBase`
4. **`crates/server/src/bin/generate_types.rs`**: Added `CommitRange` to exported types
**Frontend:**
- **`frontend/src/hooks/useStartReview.ts`**: Removed `context: null` since that field no longer exists
The prompt will now look like:
```
Please review the code changes.
Repository: vibe-kanban
Review all changes from base commit abc123 to HEAD.
Use `git diff abc123..HEAD` to see the changes.
```
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Codex review support (vibe-kanban e7996a18)
## Context
We've added a review endpoint (\`POST /task-attempts/{id}/review\`) that starts a code review session. Currently it uses a default prompt-based implementation via \`spawn\_review()\` on \`StandardCodingAgentExecutor\`, which builds a prompt and delegates to \`spawn()\`.
## Goal
Implement native Codex review support by overriding \`spawn\_review()\` in the Codex executor to use Codex's native review mechanism instead of the prompt-based approach.
## Current Implementation
### Backend Types
\*\*\`CommitRange\` enum\*\* (\`crates/executors/src/actions/review.rs\`):
\`\`\`rust
pub enum CommitRange {
FromBase { commit: String },
Specific { commits: Vec<String> },
Range { from: String, to: String },
}
\`\`\`
\*\*\`RepoReviewContext\`\*\*:
\`\`\`rust
pub struct RepoReviewContext {
pub repo\_id: Uuid,
pub repo\_name: String,
pub commits: CommitRange,
}
\`\`\`
### Trait Method
\*\*\`spawn\_review()\`\*\* in \`StandardCodingAgentExecutor\` trait (\`crates/executors/src/executors/mod.rs\`):
\`\`\`rust
async fn spawn\_review(
&self,
current\_dir: &Path,
context: Option<&[RepoReviewContext]>,
additional\_prompt: Option<&str>,
env: &ExecutionEnv,
) -> Result<SpawnedChild, ExecutorError> {
// Default: build prompt and delegate to spawn()
let prompt = build\_review\_prompt(context, additional\_prompt);
self.spawn(current\_dir, &prompt, env).await
}
\`\`\`
## Tasks
1. Research Codex's native review API/mechanism (if it has one)
2. Override \`spawn\_review()\` in \`CodexExecutor\` to use native review if available
3. Fall back to prompt-based approach if native review isn't supported
* Done. Here's a summary of the changes:
1. **Removed dead code** from `crates/executors/src/executors/codex/review.rs`:
- Deleted the `map_to_review_target()` function (was ~120 lines)
- Removed unused imports (`CommitRange`, `RepoReviewContext`)
2. **Codex now uses `ReviewTarget::Custom`** with the pre-built prompt, which ensures the displayed prompt matches what Codex actually receives.
The build passes and TypeScript types have been regenerated.
* Use custom review target for codex
* Done. Here's a summary of the changes:
## Summary
Moved the review endpoint from workspace-level to session-level:
### Changes
1. **Created `crates/server/src/routes/sessions/review.rs`**
- New review endpoint at `POST /sessions/{id}/review`
- Takes `Extension<Session>` instead of `Extension<Workspace>`
- Looks up `agent_session_id` from previous executions using `find_latest_coding_agent_turn_session_id()`
- Passes `agent_session_id` to `ReviewAction` for session resumption
2. **Updated `crates/server/src/routes/sessions/mod.rs`**
- Added `pub mod review;`
- Added route `.route("/review", post(review::start_review))`
3. **Updated `crates/server/src/routes/task_attempts.rs`**
- Removed `pub mod review;`
- Removed `.route("/review", post(review::start_review))`
4. **Deleted `crates/server/src/routes/task_attempts/review.rs`**
5. **Updated `crates/server/src/bin/generate_types.rs`**
- Changed path from `task_attempts::review` to `sessions::review`
### API Change
- **Old**: `POST /api/task-attempts/{workspace_id}/review`
- **New**: `POST /api/sessions/{session_id}/review`
This ensures vk sessions and agent sessions are 1:1:
- Existing session → resumes agent session if available
- New session → fresh agent session
* Done! Here's a summary of all the frontend changes:
- Added `startReview` to `sessionsApi` using new endpoint `POST /api/sessions/${sessionId}/review`
- Removed `startReview` from `attemptsApi`
- Changed parameter from `attemptId` to `sessionId` and added optional `workspaceId` for query invalidation
- Changed API call from `attemptsApi.startReview` to `sessionsApi.startReview`
- Added `MagnifyingGlassIcon` import
- Added `onStartReview` and `isReviewStarting` to `SessionProps` interface
- Added "Start Review" menu item in the session dropdown
- Added `useStartReview` hook import and usage
- Added `handleStartReview` callback function
- Passed `onStartReview` and `isReviewStarting` to `SessionChatBox`
- Removed `useStartReview` import
- Removed `useUserSystem` import (now unused)
- Removed `startReview` hook usage
- Removed `handleStartReview` function
- Removed "Start Review" menu item from the dropdown
* Done. The fix adds the `ReviewRequest` case to `latest_executor_profile_for_session()` in `crates/db/src/models/execution_process.rs:688-690`.
The backend check passes. Follow-ups after reviews should now work correctly since the executor profile can be extracted from `ReviewRequest` just like from the other request types.
* Done. Removed `CommitRange` enum entirely. Changes:
1. **`crates/executors/src/actions/review.rs`** - Deleted `CommitRange` enum, changed `RepoReviewContext.commits` to `RepoReviewContext.base_commit: String`
2. **`crates/server/src/routes/sessions/review.rs`** - Updated construction to use `base_commit: initial_commit` instead of `commits: CommitRange::FromBase { commit: initial_commit }`
3. **`crates/executors/src/executors/mod.rs`** - Simplified `build_review_prompt()` to directly use `repo.base_commit` instead of matching on the enum
4. **`crates/server/src/bin/generate_types.rs`** - Removed `CommitRange::decl()` from type exports
5. **`shared/types.ts`** - Regenerated, `CommitRange` type is now gone
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Done. Simplified the review context building:
**Changes:**
1. **`crates/db/src/models/execution_process_repo_state.rs`** - Replaced `find_initial_commits_for_workspace` with `find_initial_commit_for_repo` that takes a specific repo_id and uses ORDER BY + LIMIT 1 instead of GROUP BY/HAVING.
2. **`crates/server/src/routes/sessions/review.rs`** - Simplified the context building:
- Get workspace repos first (has repo names via `display_name`)
- For each repo, get initial commit
- Build context directly - no more HashMap joining, no more separate `Repo::find_by_ids` call
The new code is much easier to follow: get repos → for each, get initial commit → build context.
* Done. Addressed all 23 review comments:
1. Removed comment from `SessionChatBoxContainer.tsx` (line 161)
2. Removed doc comments from `RepoReviewContext` and `ReviewRequest` structs in `review.rs`
3. Removed module doc comment from `codex/review.rs`
4. Removed comment from `codex.rs` about Custom review target
5. Removed doc comments from `spawn_review` trait method in `mod.rs`
6. Removed doc comment from `build_review_prompt` function
7. Removed all comments from `sessions/review.rs` (doc comments and inline comments)
8. Removed unused `get_commits_since_branch` function from `git.rs` (~45 lines of dead code)
* Done. Added the review toggle button:
**Changes:**
1. **`SessionChatBox.tsx`**
- Added `ReviewModeProps` interface with `isActive`, `onToggle`, `isSubmitting`
- Added `reviewMode` prop to `SessionChatBoxProps`
- Added toggle button next to attach button (MagnifyingGlassIcon) - highlighted when active
- Updated placeholder to show "Enter review instructions..." when in review mode
- Removed old `onStartReview` and `isReviewStarting` from SessionProps
- Removed "Start Review" dropdown menu item
2. **`SessionChatBoxContainer.tsx`**
- Added `useState` for `isReviewMode`
- Updated `handleSend` to call `startReviewMutation` with `additionalPrompt` when in review mode
- Reset review mode after successful review start
- Pass `reviewMode` props to SessionChatBox
- Removed old `handleStartReview` callback
Now the user can:
1. Click the magnifying glass toggle next to attach
2. Enter review instructions in the text area
3. Click send → starts review with the prompt
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
TypeScript and Rust both compile. The changes are:
1. Button shows "Review" when review mode is active
2. Toggle icon uses `!text-accent-foreground` to force override the `text-low` class from the base component, along with `bg-accent rounded-sm` for the background highlight
Done. Changed `!text-accent-foreground` to `!text-normal` which uses the design system's proper text color for active/selected states. The `!` prefix forces the override of the base `text-low` class. Both TypeScript and Rust compile successfully.
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
All done. TypeScript and Rust compile successfully. Here's a summary of the changes:
**Created:**
- `frontend/src/components/dialogs/tasks/StartReviewDialog.tsx` - New dialog with:
- Agent/variant selection (using ExecutorProfileSelector)
- Review comments preview (if any)
- Additional instructions textarea
- Start Review / Cancel buttons
**Modified:**
- `frontend/src/components/dialogs/index.ts` - Added export for StartReviewDialog
- `frontend/src/components/ui-new/primitives/SessionChatBox.tsx`:
- Changed `ReviewModeProps` from toggle state to simple callback (`onReviewClick`, `isDisabled`)
- Removed toggle styling and review mode button text
- Button now just opens the dialog
- `frontend/src/components/ui-new/containers/SessionChatBoxContainer.tsx`:
- Removed `isReviewMode` state and `startReviewMutation`
- Added `handleReviewClick` callback that opens `StartReviewDialog`
- Disabled review button when in new session mode or no session exists
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
Done. TypeScript and Rust compile successfully. Summary of changes:
**`StartReviewDialog.tsx`:**
- Added "New Session" toggle (defaults ON when no session exists, disabled when no session to toggle from)
- Added conditional `AgentSelector` - only shown when creating a new session
- Always shows `ConfigSelector` for variant selection
- Handles session creation inline when toggle is on or no session exists
- Updated `onSuccess` callback to return new session ID when created
**`SessionChatBox.tsx`:**
- Removed `isDisabled` from `ReviewModeProps` interface
- Removed `reviewMode.isDisabled` from button disabled logic
**`SessionChatBoxContainer.tsx`:**
- Updated `handleReviewClick` to allow opening dialog without sessionId
- Updated `onSuccess` callback to select the new session if one was created
- Removed `isDisabled` from reviewMode prop
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f…
mxyhi
added a commit
to mxyhi/vibe-kanban
that referenced
this pull request
Jan 14, 2026
* Add QA mode for automated testing with mock executor and hardcoded repos (Vibe Kanban) (#1940)
* The QA mode implementation is complete. Here's a summary of what was implemented:
## Summary
I've successfully implemented the QA mode feature for the vibe-kanban application. Here's what was created/modified:
### New Files
1. **`crates/services/src/services/qa_repos.rs`** - QA repos module that:
- Defines two hardcoded QA repo URLs (`internal-qa-1` and `internal-qa-2`)
- Clones repos to a persistent temp directory on first access using `git2`
- Returns `DirectoryEntry` compatible with existing API
2. **`crates/executors/src/executors/qa_mock.rs`** - Mock executor that:
- Implements `StandardCodingAgentExecutor` trait
- Performs random file operations (create, delete, modify)
- Streams 10 mock log entries in ClaudeJson format over 10 seconds
- Reuses Claude's log processor for normalization
### Modified Files
1. **Cargo.toml files** - Added `qa-mode` feature flags to:
- `crates/executors/Cargo.toml`
- `crates/services/Cargo.toml`
- `crates/server/Cargo.toml`
2. **`crates/executors/src/executors/mod.rs`** - Added:
- Conditional `qa_mock` module export
- `QaMock` variant to `CodingAgent` enum
- Updated `capabilities()` match arm
3. **`crates/executors/src/mcp_config.rs`** - Added `QaMock` handling
4. **`crates/services/src/services/filesystem.rs`** - Override `list_git_repos` and `list_common_git_repos` in QA mode
5. **`crates/services/src/services/container.rs`** - Override `normalize_logs` executor lookup in QA mode
6. **`crates/executors/src/actions/coding_agent_initial.rs`** - Override spawn in QA mode
7. **`crates/executors/src/actions/coding_agent_follow_up.rs`** - Override spawn in QA mode
8. **`vibe-kanban/package.json`** - Added QA build scripts:
- `backend:dev:qa`
- `backend:dev:watch:qa`
- `dev:qa`
### Usage
```bash
# Run backend in QA mode
cargo run --features qa-mode
# Or with pnpm
pnpm run dev:qa
```
When QA mode is enabled:
- `GitPanelCreate` will show only `internal-qa-1` and `internal-qa-2` as recent repos
- Starting any task will perform mock file operations and stream 10 logs over 10 seconds
- Logs follow the ClaudeJson format for compatibility with the existing log processor
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* The TLS error fix is complete. I've replaced the `git2::Repository::clone` call with the `git` CLI approach in `qa_repos.rs`:
**Changes made:**
- Updated `clone_qa_repos_if_needed` function to use `Command::new("git")` with `["clone", "--depth", "1", url, path]` arguments instead of `git2::Repository::clone`
- Added `--depth 1` for shallow cloning (faster)
- Updated error handling to capture stderr output from the git command
The fix uses the git CLI which has reliable TLS support, avoiding the TLS configuration issues that git2 can have on some systems. This matches patterns used elsewhere in the codebase (e.g., `crates/remote/src/github_app/service.rs`).
You can now run `pnpm run backend:dev:qa` or `pnpm run dev:qa` and the QA repos should clone successfully.
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* Done! I've made the mock logs strongly typed by:
1. **Added imports** for `ClaudeJson`, `ClaudeMessage`, `ClaudeContentItem`, and `ClaudeToolData` from the Claude executor
2. **Replaced `generate_mock_logs()`** to use strongly-typed structs:
- Each log entry is now a proper `ClaudeJson` enum variant
- Uses `ClaudeMessage` with proper fields (`id`, `message_type`, `role`, `model`, `content`, `stop_reason`)
- Uses `ClaudeContentItem` variants (`Thinking`, `ToolUse`, `ToolResult`, `Text`)
- Uses `ClaudeToolData` variants (`Read`, `Write`, `Bash`)
- Serializes to JSON using `serde_json::to_string()` for correct escaping
3. **Updated tests** to verify the logs deserialize back to `ClaudeJson` types
This ensures:
- All fields match what `ClaudeLogProcessor::process_logs()` expects
- No manual JSON escaping needed (serde handles it)
- Compile-time type checking prevents malformed logs
- Session IDs are consistent across all entries
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* Done! I've fixed the log display issue by replacing the shell echo approach with a temp file approach:
**Changes made to `crates/executors/src/executors/qa_mock.rs`:**
1. **Write logs to a temp file** instead of embedding them in a shell script:
- Creates a temp file at `$TMPDIR/qa_mock_logs_{uuid}.jsonl`
- Writes all logs as newline-delimited JSON
2. **Use `IFS= read -r` to read the file** - this preserves exact content:
- `IFS=` prevents word splitting
- `-r` prevents backslash interpretation
- `echo "$line"` outputs the exact line content
3. **Clean up the temp file** after reading with `rm -f`
**Benefits:**
- No shell escaping needed - file contents are read verbatim
- Each line is output exactly as serialized by serde_json
- Avoids issues with single quotes, backslashes, and escape sequences
- Temp file is automatically cleaned up after use
This should fix the issue where logs were appearing as raw JSON or with corrupted content due to shell escaping issues.
* fix formatting
* Build succeeds. I've applied the same fix to the two remaining locations that had newlines in their content:
1. **Line 234** - README tool result: Changed `\n\n` to `\\n\\n`
2. **Line 302** - Bash tool result: Changed `\n` to `\\n`
This matches the pattern the user established in the assistant final message (line 318) where `\\n` is used instead of `\n` to ensure newlines are properly preserved through the serialization and display pipeline.
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* simplify scripts
* update agents.md
* fix: update font-feature-settings in diff-style-overrides.css (#1827)
* fix: update font-feature-settings in diff-style-overrides.css
Changed the font-feature-settings property for the diff-tailwindcss-wrapper to disable ligatures by setting it to "liga" off, ensuring consistent text rendering across different components.
* chore: run formatter
---------
Co-authored-by: Pedro <>
* feat: remove `agent_working_dir` from settings (#1874)
* remove configurable agent_working_dir
(cherry picked from commit 285b3e04abceeb8e4a4ee1be16e3de97a8f32299)
* calculate agent_working_dir on create and start task
* i18n
* Fix gh CLI compatibility for older versions missing baseRefOid field
**Changes:**
1. Added `GhApiPr` and `GhApiRef` structs (lines 31-46) to deserialize the GitHub REST API response
2. Added `get_pr_info_via_api()` function (lines 103-141) as a fallback that uses `gh api repos/{owner}/{repo}/pulls/{number}`
3. Modified `get_pr_info()` (lines 166-170) to detect "unknown json field" errors and fall back to the API method
**How it works:**
- Modern `gh` CLI versions continue to use the faster `gh pr view --json` approach
- When an older `gh` CLI returns "Unknown JSON field: baseRefOid", the code catches this error and falls back to `gh api` which uses the stable REST API
- The REST API fields (`base.sha`, `head.sha`, `head.ref`) have been stable for years and work with all `gh` CLI versions
* Make local build script work across more platforms (#1681)
* Enhance local build script and frontend package configuration
- Updated `local-build.sh` to detect OS and architecture, setting the target directory dynamically based on the platform.
- Modified build and lint scripts in `frontend/package.json` to include `NODE_OPTIONS=--max-old-space-size=4096` for improved memory management during builds and linting.
* Enhance local build script and frontend package configuration
- Updated `local-build.sh` to detect OS and architecture, setting the target directory dynamically based on the platform.
- Modified build and lint scripts in `frontend/package.json` to include `NODE_OPTIONS=--max-old-space-size=4096` for improved memory management during builds and linting.
* Solve task follow up section infinite loop (#1955)
**Root cause:** The `switch` statement was missing a `default` case. When `typ.type` didn't match any handled case, the loop continued forever because `curr` was never updated.
**Changes made:**
1. **`vibe-kanban/frontend/src/utils/executor.ts`** (line 59-60): Added `default:` to fall through with `ScriptRequest`, advancing to the next action for any unhandled types.
2. **`vibe-kanban/frontend/src/components/tasks/TaskFollowUpSection.tsx`**:
- Removed duplicate local `extractProfile` function (17 lines)
- Added import from `@/utils/executor`
- Updated usage to `extractProfileFromAction`
3. **`vibe-kanban/frontend/src/components/NormalizedConversation/RetryEditorInline.tsx`**:
- Removed duplicate local `extractProfile` function (17 lines)
- Added import from `@/utils/executor`
- Updated usage to `extractProfileFromAction`
Both type checks (TypeScript and Rust/cargo) pass successfully.
* Add accelerated 1-hour cleanup for archived workspaces or inactive tasks (Vibe Kanban) (#1952)
* The implementation is complete. Here's a summary of the changes:
## Summary
Modified `crates/db/src/models/workspace.rs` in the `find_expired_for_cleanup()` function:
1. **Added task join** - `JOIN tasks t ON w.task_id = t.id` to access the task's status
2. **Conditional expiration threshold** in the `HAVING` clause:
- **1 hour** if workspace is archived AND task status is NOT `inprogress` or `inreview`
- **72 hours** otherwise (preserves existing behavior)
```sql
HAVING datetime('now',
CASE
WHEN w.archived = 1 AND t.status NOT IN ('inprogress', 'inreview')
THEN '-1 hours'
ELSE '-72 hours'
END
) > datetime(...)
```
This means archived workspaces for completed/cancelled/todo tasks will be cleaned up much faster (1 hour vs 72 hours), while active work remains protected.
* Done! I've:
1. **Fixed the condition** from `AND` to `OR` in `crates/db/src/models/workspace.rs:350`
2. **Updated the doc comment** to reflect the correct logic
3. **Regenerated the SQLx cache** with `pnpm run prepare-db`
4. **Updated the PR** with the corrected title and description
The accelerated cleanup now triggers when:
- The workspace is archived (regardless of task status), **OR**
- The task is not actively being worked on (todo/done/cancelled)
* Fix comparison between EP and Workspace during cleanup (#1959)
* Increase max height of chat box (#1957)
I've successfully implemented the change to allow the `ChatBoxBase.tsx` to expand vertically up to 50% of the window height.
**Change made in** `vibe-kanban/frontend/src/components/ui-new/primitives/ChatBoxBase.tsx:144`:
```tsx
// Before:
className="min-h-0 max-h-[min(15rem,20vh)] overflow-y-auto"
// After:
className="min-h-0 max-h-[50vh] overflow-y-auto"
```
**What this does:**
- The old constraint `max-h-[min(15rem,20vh)]` limited the editor to whichever was smaller: 15rem or 20% of viewport height
- The new constraint `max-h-[50vh]` allows the editor to grow up to 50% of the viewport height
- The editor still starts small and only expands as content is added (due to `min-h-0`)
- `overflow-y-auto` ensures scrolling when content exceeds the max height
**Verification:**
- ✅ TypeScript check passes (`pnpm run check`)
- ✅ ESLint passes (`pnpm run lint`)
- The dev server was started and the change was tested in the browser (though the browser MCP encountered an issue during extended testing)
* Done. I've updated the agent install hints across all 6 locales: (#1960)
**Changes made:**
- `notFound`: Changed from "Not Found" → "Unknown" (and equivalent in other languages)
- `notFoundTooltip`: Changed from "No previous usage detected. Agent may require installation and/or login." → "We couldn't verify this agent is set up, but go ahead and try it."
**Files modified:**
- `frontend/src/i18n/locales/en/settings.json`
- `frontend/src/i18n/locales/es/settings.json`
- `frontend/src/i18n/locales/ja/settings.json`
- `frontend/src/i18n/locales/ko/settings.json`
- `frontend/src/i18n/locales/zh-Hans/settings.json`
- `frontend/src/i18n/locales/zh-Hant/settings.json`
The new wording is softer and encourages users to just try the agent rather than assuming it's not installed.
* Fix QA mode lint warnings with conditional compilation attributes (Vibe Kanban) (#1958)
* All lint checks pass. Here's a summary of the fixes I made:
**Fixed files:**
1. **`crates/executors/src/actions/coding_agent_follow_up.rs`**:
- Made `ExecutorConfigs` import conditional with `#[cfg(not(feature = "qa-mode"))]`
- Added `let _ = &approvals;` in qa-mode block to silence unused variable warning
2. **`crates/executors/src/actions/coding_agent_initial.rs`**:
- Same fixes as above
3. **`crates/executors/src/executors/qa_mock.rs`**:
- Changed `std::io::Error::new(std::io::ErrorKind::Other, e)` to `std::io::Error::other(e)` (clippy `io_other_error` lint)
4. **`crates/services/src/services/container.rs`**:
- Made `ExecutorConfigs` import conditional with `#[cfg(not(feature = "qa-mode"))]`
- Renamed `executor_profile_id` to `_executor_profile_id` to indicate it's conditionally used
5. **`crates/services/src/services/filesystem.rs`**:
- Made imports conditional: `HashSet`, `WalkBuilder`, and `CancellationToken` are only needed in non-qa-mode
- Added `#[cfg(not(feature = "qa-mode"))]` to helper functions: `get_directories_to_skip`, `list_git_repos_with_timeout`, `list_git_repos_inner`
- Renamed parameters to `_path`, `_timeout_ms`, `_hard_timeout_ms`, `_max_depth` since they're not used in qa-mode
- Removed needless `return` statements in qa-mode blocks
6. **`crates/services/src/services/qa_repos.rs`**:
- Changed `&PathBuf` to `&std::path::Path` in function parameter (clippy `ptr_arg` lint)
* Cleanup script changes for workspace 6fcb2b78-f418-451f-9a22-8d4381a538f0
* All lint checks pass. The fix now uses `#[cfg_attr(feature = "qa-mode", allow(unused_variables))]` which cleanly communicates that the variables are intentionally unused only in qa-mode, while keeping the normal parameter names.
* All lint checks pass. Fixed by using `#[cfg_attr(feature = "qa-mode", allow(unused_variables))]` and keeping the proper variable name `executor_profile_id` (which is used in non-qa-mode).
* All lint checks pass. The changes are now cleaner - using `#[cfg_attr(feature = "qa-mode", allow(unused_variables))]` on the function instead of `let _ = &approvals;` inside the qa-mode block.
To summarize the cleanup: I replaced the inline `let _ = &approvals;` workaround in `coding_agent_initial.rs` and `coding_agent_follow_up.rs` with the cleaner `#[cfg_attr]` attribute on the function, which is consistent with how we handled it in `filesystem.rs` and `container.rs`.
* I've made both changes: (#1962)
1. **Moved the Dev Server Script input** to be the first field in the Scripts & Configuration section (in `ReposSettings.tsx`)
2. **Updated the section description** in the English locale to mention "dev server" scripts: the description now reads "Configure dev server, setup, cleanup, and copy files for this repository..."
* feat(notifications): include task name in approval needed notification (#1879)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <[email protected]>
* Add Push button to Git panel when PR is open with unpushed commits (Vibe Kanban) (#1951)
* The implementation is complete. Here's a summary of what I changed:
## Summary
Added a "Push" button to the workspaces UI Git panel. The changes allow users to push changes when a PR is already open.
### Files Modified:
1. **`frontend/src/components/ui-new/primitives/RepoCard.tsx`** (lines 27-42)
- Added `'push'` to the `RepoAction` type union
- Added a new option to `repoActionOptions` array with the Push button configuration using `ArrowUpIcon`
2. **`frontend/src/components/ui-new/actions/index.ts`** (lines 33, 691-707)
- Imported `ArrowUpIcon` from phosphor-icons
- Added `GitPush` action definition that:
- Calls `attemptsApi.push()` with the workspace and repo IDs
- Handles the `force_push_required` error case
- Invalidates workspace queries on success to refresh the UI
3. **`frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`** (line 103)
- Added mapping from `'push'` action to `Actions.GitPush` in the action handler
The Push button now appears in the Git panel dropdown alongside "Open pull request" and "Merge" options.
* The type check passes. Here's a summary of the updated changes:
## Summary
The Push button now appears **next to the PR number** when:
1. A PR is already open (`prStatus === 'open'`)
2. There are new commits ahead (`commitsAhead > 0`)
### Changes Made:
**`frontend/src/components/ui-new/primitives/RepoCard.tsx`**:
- Removed `push` from the `repoActionOptions` dropdown (lines 34-41)
- Added a dedicated Push button in the PR status row (lines 213-222) that:
- Only appears when `prStatus === 'open'` AND `commitsAhead > 0`
- Uses brand primary styling (`bg-brand-primary`) to make it prominent
- Displays with an up arrow icon and "Push" label using existing translation
- Calls `onActionsClick?.('push')` when clicked
The `GitPush` action and handler mapping from the previous changes remain in place to handle the push operation.
* Done. The Push button now uses the same styling as the "Open PR" button: `bg-panel text-normal hover:bg-tertiary`.
* The type check passes. Here's a summary of the fix:
## Summary
The Push button now correctly uses `remoteCommitsAhead` (unpushed commits to remote) instead of `commitsAhead` (total commits ahead of target branch) to determine when to show.
### Changes Made:
1. **`frontend/src/components/ui-new/views/GitPanel.tsx`**:
- Added `remoteCommitsAhead: number` to the `RepoInfo` interface
- Pass `remoteCommitsAhead` to `RepoCard`
2. **`frontend/src/components/ui-new/primitives/RepoCard.tsx`**:
- Added `remoteCommitsAhead?: number` to `RepoCardProps`
- Changed the push button condition from `commitsAhead > 0` to `remoteCommitsAhead > 0`
3. **`frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`**:
- Added `remoteCommitsAhead: repoStatus?.remote_commits_ahead ?? 0` to the `repoInfos` mapping
Now the Push button will:
- Only appear when there's an open PR AND there are unpushed commits (`remote_commits_ahead > 0`)
- Disappear after a successful push (when `remote_commits_ahead` becomes 0)
- Reappear when new commits are made locally that haven't been pushed
* The type check passes. Here's a summary of the changes:
## Summary
The Push button now hides immediately when clicked and only reappears when new commits are available:
### Changes to `RepoCard.tsx`:
- Added `useState` and `useRef` imports
- Added `isPushHidden` state to track when the button should be hidden
- Added `lastRemoteCommitsAhead` ref to track the previous value
- Added `useEffect` that resets `isPushHidden` to `false` when `remoteCommitsAhead` increases (meaning new commits are available)
- Added `handlePushClick` function that hides the button immediately and triggers the push action
- Updated the button condition to include `!isPushHidden`
The button will:
1. Hide immediately when clicked (no double-clicking possible)
2. Stay hidden until `remoteCommitsAhead` increases above the last known value
3. Reappear when new local commits are made that need to be pushed
* Both the linter and type check pass. The linter errors are fixed. Here's a summary of the changes:
## Summary of Linter Fixes
The linter was flagging that `RepoCard` (a presentational component) should not manage state or have side effects. I refactored the code to lift the state up to the container component:
### Changes:
1. **`RepoCard.tsx`** - Made purely presentational:
- Removed `useState`, `useRef`, `useEffect` imports
- Removed `remoteCommitsAhead` prop
- Added `showPushButton` prop (boolean, controlled by parent)
- Added `onPushClick` callback prop
- The button now just renders based on `showPushButton` and calls `onPushClick`
2. **`GitPanel.tsx`** - Updated interface and props:
- `RepoInfo` now has optional `remoteCommitsAhead` and `showPushButton` fields
- Added `onPushClick` callback to `GitPanelProps`
- Passes `showPushButton` and `onPushClick` to `RepoCard`
3. **`WorkspacesLayout.tsx`** - State management moved here:
- Added `hiddenPushRepos` state (Set of repo IDs where push was clicked)
- Added `lastRemoteCommitsAhead` ref to track previous values
- Added `useEffect` to reset hidden state when `remoteCommitsAhead` increases
- Added `repoInfosWithPushButton` memo that computes `showPushButton` for each repo
- Added `handlePushClick` that hides button immediately and executes push action
* prettier fix
* Done. I've added `GitPush` to the Git actions list in the command bar. It now appears between "Merge" and "Rebase" in the Git Actions menu.
* Both type check and lint pass.
Done! The Push action in the command bar now has the same visibility conditions as in the Git panel - it only appears when:
1. There's a workspace
2. There are git repos
3. There's an open PR (`hasOpenPR`)
4. There are unpushed commits (`hasUnpushedCommits`)
### Summary of changes:
1. **`frontend/src/components/ui-new/actions/index.ts`**:
- Added `hasOpenPR` and `hasUnpushedCommits` to `ActionVisibilityContext`
- Updated `GitPush.isVisible` to check these new context properties
2. **`frontend/src/components/ui-new/actions/useActionVisibility.ts`**:
- Added `useBranchStatus` hook to get branch status data
- Computed `hasOpenPR` by checking if any repo has an open PR in merges
- Computed `hasUnpushedCommits` by checking if any repo has `remote_commits_ahead > 0`
- Added these values to the returned context
* The refactoring is complete. Here's a summary of the changes:
## Summary of Changes
The push button logic has been simplified by using React Query's mutation state instead of manually tracking hidden state with refs and effects.
### Key Changes:
1. **WorkspacesLayout.tsx (`GitPanelContainer`)**:
- Removed the complex `useEffect` that tracked `lastRemoteCommitsAhead` and managed `hiddenPushRepos` state
- Removed `hiddenPushRepos` state and `lastRemoteCommitsAhead` ref
- Added `usePush` hook with callbacks that:
- On success: awaits query invalidation before clearing the loading state
- On error: clears the loading state
- Added simple `pushingRepoId` state to track which repo is being pushed
- The button now shows loading state during push and automatically disappears after refetch if `remoteCommitsAhead` becomes 0
2. **GitPanel.tsx**:
- Added `isPushPending?: boolean` to `RepoInfo` interface
- Passes `isPushPending` to `RepoCard`
3. **RepoCard.tsx**:
- Added `isPushPending` prop
- Button shows while either `showPushButton` or `isPushPending` is true
- Button is disabled and shows spinner with "Pushing..." text when pending
- Uses existing translation key `git.states.pushing`
### How it works now:
1. User clicks push button
2. Button immediately shows loading state (spinner + "Pushing...")
3. Button is disabled to prevent multiple clicks
4. Push mutation runs
5. On success, query invalidation completes before clearing loading state
6. Once `branchStatus` refetches, if `remoteCommitsAhead` is 0, `showPushButton` becomes false and button disappears
7. On error, loading state clears and button returns to normal
This approach is simpler and more predictable than manually tracking previous values.
* Done. The push button now shows success feedback like the old UI:
## Summary of Changes
The push button now has three states:
1. **Normal**: Shows "Push" with an up arrow icon
2. **Pending**: Shows "Pushing..." with a spinning icon, button is disabled
3. **Success**: Shows "Pushed!" with a green checkmark icon and green background for 2 seconds
The flow is:
1. User clicks "Push"
2. Button immediately shows "Pushing..." with spinner
3. Push completes, queries are invalidated and refetched
4. Button shows green "Pushed!" for 2 seconds
5. Button disappears (if no more commits to push) or returns to normal state
* All code review issues have been addressed:
## Summary of Changes
1. **Unified push logic** - Now uses `executeAction(Actions.GitPush, ...)` instead of calling `usePush` hook directly. This ensures consistent error handling between the button and command bar.
2. **Proper setTimeout cleanup** - Added `successTimeoutRef` with a cleanup effect that clears the timeout when the component unmounts:
```typescript
const successTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
useEffect(() => {
return () => {
if (successTimeoutRef.current) {
clearTimeout(successTimeoutRef.current);
}
};
}, []);
```
3. **Error feedback** - Added error state handling:
- New `isPushError` prop flows through GitPanel to RepoCard
- Button shows red "Failed" with warning icon when push fails
- Error state clears after 3 seconds
- Added `git.states.pushFailed` translation key
4. **Simplified state management** - Changed from separate `pushingRepoId` and `pushSuccessRepoId` to a single `pushStates` record with `PushState` type (`'idle' | 'pending' | 'success' | 'error'`)
* All i18n checks pass now.
* Both code review issues have been addressed:
## Summary of Changes
### 1. Fixed stale closure issue
- Added a `pushStatesRef` that mirrors the `pushStates` state
- Changed the check from `pushStates[repoId]` to `pushStatesRef.current[repoId]`
- Removed `pushStates` from the dependency array
### 2. Added proper error logging and user-facing error message
- Modified `ActionsContext.tsx` to re-throw errors after showing the dialog, so callers can handle them
- Added `console.error('Push failed:', error)` for debugging purposes
- The error dialog is already shown by `executeAction` via `ConfirmDialog`
- The button now properly shows the error state when push fails
* fmt
* The fix is in place. The key change is:
- When we're in a "push flow" (state is `pending`, `success`, or `error`), we set `showPushButton: false` but the button remains visible because of the `isPushPending || isPushSuccess || isPushError` condition in RepoCard
- This prevents the race condition where the query refetch could hide the button before we set the success state
* All checks pass. The changes now:
1. **Reverted ActionsContext** - Removed the re-throw to maintain backwards compatibility
2. **Use `usePush` hook directly** - For proper success/error detection instead of going through `executeAction`
3. **Show error dialog manually** - Using `ConfirmDialog.show()` when push fails
4. **Track current repo with ref** - `currentPushRepoRef` tracks which repo is being pushed so callbacks can update the correct state
* All checks pass. Here's a summary of the force push handling:
## Force Push Functionality
Yes, force push is fully supported. Here's how it works:
**Old UI (`useGitOperations.ts`):**
1. When `usePush` fails with `errorData.type === 'force_push_required'`
2. It automatically shows `ForcePushDialog`
3. The dialog warns the user about the consequences and lets them confirm
4. If confirmed, it calls `useForcePush` to execute the force push
**New UI (now updated):**
1. When the push button is clicked and fails with `force_push_required`
2. The push state is reset to `idle` (so the button returns to normal)
3. `ForcePushDialog` is shown with the attemptId and repoId
4. User can confirm or cancel the force push from the dialog
The `ForcePushDialog` handles its own loading state, success/error feedback, and API call internally via `useForcePush` hook.
* clear pushStates on workspace change
Co-authored-by: Copilot <[email protected]>
---------
Co-authored-by: Copilot <[email protected]>
* Fix workspace sidebar ordering to use updated_at instead of created_at (Vibe Kanban) (#1965)
* Done. I've updated the workspace sorting in `frontend/src/components/ui-new/hooks/useWorkspaces.ts` to use `updated_at` instead of `created_at`. Both active and archived workspaces will now be sorted by their most recent update time (with pinned workspaces still appearing first). All type checks and lint pass.
* Cleanup script changes for workspace 37e99d73-8ab0-4501-990e-1007d78e44aa
* Fix search input losing focus when hovering over dropdown items (Vibe Kanban) (#1966)
* Done! Here's a summary of the changes:
## Changes Made
### 1. `Dropdown.tsx` (lines 140-190)
- Added `preventFocusOnHover?: boolean` prop to `DropdownMenuItemProps` interface
- Added `onPointerMove` handler that calls `e.preventDefault()` when `preventFocusOnHover` is true, which stops Radix from stealing focus on hover
### 2. `SearchableDropdown.tsx` (line 110)
- Added `preventFocusOnHover` prop to `DropdownMenuItem`
### 3. `ProjectSelectorContainer.tsx` (lines 181, 208)
- Added `preventFocusOnHover` prop to both `DropdownMenuItem` components (the "Create new project" button and the virtualized project items)
The fix uses `e.preventDefault()` on `onPointerMove` to disable Radix's hover-to-focus behavior, as documented in [Radix UI Issue #2193](https://github.com/radix-ui/primitives/issues/2193). This preserves all other functionality (click, keyboard navigation, selection) while allowing the search input to retain focus when hovering over items.
* Done! I've added the `onPointerLeave` handler to `DropdownMenuItem` alongside the existing `onPointerMove` handler. Both now call `e.preventDefault()` when `preventFocusOnHover` is true.
**Summary of the fix:**
- Added `onPointerLeave` destructuring from props (line 161)
- Added `onPointerLeave` handler that calls `e.preventDefault()` when `preventFocusOnHover` is true (lines 187-194)
Per the [Radix UI Issue #2193](https://github.com/radix-ui/primitives/issues/2193), **both** `onPointerMove` and `onPointerLeave` need `preventDefault()` to fully disable hover-to-focus behavior.
* Script Fixer Dialog (Vibe Kanban) (#1968)
* All checks pass. Let me provide a summary of what was implemented:
## Summary
I've implemented the Script Fixer Dialog feature. Here's what was created and modified:
### New File Created:
1. **`frontend/src/components/dialogs/scripts/ScriptFixerDialog.tsx`** - A new dialog component that:
- Shows the current script content in an editable textarea
- Displays the last execution logs using `VirtualizedProcessLogs`
- Provides "Save" and "Save and Test" buttons
- Supports both setup scripts and dev server scripts
- Handles multi-repo scenarios with a repo selector dropdown
### Files Modified:
**New UI (Setup Script):**
1. **`ChatScriptEntry.tsx`** - Added `onFix` prop and a "Fix Script" button that appears when a script fails
2. **`NewDisplayConversationEntry.tsx`** - Added `ScriptEntryWithFix` wrapper component that provides the fix handler to `ChatScriptEntry`
**Legacy UI (Setup Script):**
3. **`DisplayConversationEntry.tsx`** - Added `ScriptFixButton` component that renders a fix button for failed scripts in the legacy conversation view
**Preview/Dev Server:**
4. **`PreviewPanel.tsx`** - Added "Fix Script" button to the troubleshooting alert when dev server has issues
5. **`PreviewBrowser.tsx`** - Added optional `handleFixDevScript` prop and "Fix Script" button alongside "Start Server"
6. **`PreviewBrowserContainer.tsx`** - Wired up the dialog opening for dev server script fixes
7. **`PreviewControls.tsx`** - Added `onFixScript` prop and "Fix Script" button in the dev server controls
8. **`PreviewControlsContainer.tsx`** - Wired up the dialog opening for the controls
**Translations:**
9. **`tasks.json` (English)** - Added `scriptFixer` translation keys
* Cleanup script changes for workspace 5496d4c0-d1d3-4e6a-b9d0-6a421270eeac
* Type check passes. I've updated the `ScriptFixerDialog` to also start the dev server when "Save and Test" is clicked for dev_server script type.
* Done! I've updated the `ScriptFixerDialog` to:
1. **Keep the dialog open after "Save and Test"** - The dialog no longer closes after clicking "Save and Test", so the user can watch the logs update in real-time as the script executes
2. **Changed "Cancel" to "Close"** - The button now says "Close" (using `t('common:close')`) and is always enabled, making it clear the user can close the dialog at any time
3. **Logs update automatically** - The `useExecutionProcesses` and `useLogStream` hooks will automatically pick up the new execution process and stream its logs in real-time
* Cleanup script changes for workspace 5496d4c0-d1d3-4e6a-b9d0-6a421270eeac
* Done! I've fixed the horizontal overflow by adding `min-w-0` to all flex containers and `overflow-hidden` to the `DialogContent`. This prevents flex children from overflowing their container horizontally.
* The type check passes. The fix has been applied - the width constraints (`max-w-4xl w-[90vw]`) are now on the `Dialog` component instead of `DialogContent`. This will override the default `max-w-xl` from the Dialog component's base className, allowing the dialog to be wider and preventing horizontal overflow.
* Done! I've added the status indicator to the ScriptFixerDialog. Here's what was implemented:
**Changes made:**
1. **`ScriptFixerDialog.tsx`:**
- Added import for `RunningDots` component
- Added status computation logic to determine if the process is running, succeeded, failed, or killed
- Added status indicator UI next to the "Last Execution Logs" label showing:
- Animated dots + "Running..." when the script is executing
- Green dot + "Completed successfully" when script succeeded (exit code 0)
- Red dot + "Failed with exit code X" when script failed
- Gray dot + "Process was killed" when killed
2. **`tasks.json` (translations):**
- Added `statusRunning`, `statusSuccess`, `statusFailed`, and `statusKilled` translation keys
The status indicator will update in real-time as the script executes since it's computed from `latestProcess` which is updated via the `useExecutionProcesses` hook.
* Fixed! The issue was that `exit_code` can be `null` when the process completes successfully, and comparing `null !== BigInt(0)` returns `true`, which incorrectly triggered the error state.
The fix:
- Treat `exit_code === null` as success (same as exit code 0)
- Only show error when `exit_code` is explicitly a non-zero value
* Fixed. The issue was that `exit_code` comes back as a regular number `0` from the API, but the TypeScript type says `bigint`. Using `Number(exitCode) === 0` handles both cases correctly and satisfies the type checker.
* Fixed! The translation key was missing the `buttons.` namespace prefix. It now uses `t('common:buttons.close')` which maps to "Close".
* Done. Added `bg-error` and `text-error` classes alongside the `destructive` classes for the error state.
* styles
* Done! I've fixed the issue by passing `sessionId` to the `ScriptFixerDialog` in all three files:
1. **`PreviewPanel.tsx`** - Gets `sessionId` from `devServerProcesses[0]?.session_id`
2. **`PreviewBrowserContainer.tsx`** - Added `devServerProcesses` to destructuring from `usePreviewDevServer` and passes `sessionId`
3. **`PreviewControlsContainer.tsx`** - Already had `devServerProcesses`, just added `sessionId` to the dialog call
Now when you click "Save and Test" for a dev server script, the dialog will receive the session ID, connect to the WebSocket stream, and show the execution logs in real-time.
* rollback trigger the ScriptFixer for old UI
* Done! I've extended the ScriptFixerDialog to support cleanup scripts. Here's a summary of the changes:
**1. `frontend/src/i18n/locales/en/tasks.json`**
- Added `cleanupScriptTitle: "Fix Cleanup Script"` translation key
**2. `frontend/src/components/dialogs/scripts/ScriptFixerDialog.tsx`**
- Updated `ScriptType` from `'setup' | 'dev_server'` to `'setup' | 'cleanup' | 'dev_server'`
- Updated `latestProcess` filter to use `'cleanupscript'` run_reason for cleanup scripts
- Updated script fetching logic to read `cleanup_script` field
- Updated both `handleSave` and `handleSaveAndTest` to save `cleanup_script` field
- Updated execution logic to call `attemptsApi.runCleanupScript(workspaceId)` for cleanup scripts
- Updated dialog title to show "Fix Cleanup Script" for cleanup type
- Updated placeholder text to show `#!/bin/bash\nrm -rf node_modules` for cleanup scripts
**3. `frontend/src/components/ui-new/NewDisplayConversationEntry.tsx`**
- Fixed the scriptType mapping so "Cleanup Script" maps to `'cleanup'` instead of incorrectly mapping to `'setup'`
* All tasks are complete. Here's a summary of the changes I made:
## Summary
I've implemented the ScriptFixerDialog in the old UI for both `DisplayConversationEntry.tsx` and `PreviewPanel.tsx`.
### Changes Made:
**1. `DisplayConversationEntry.tsx`** (`frontend/src/components/NormalizedConversation/DisplayConversationEntry.tsx`):
- Added imports for `ScriptFixerDialog`, `ScriptType`, `useAttemptRepo`, `Button`, and `Wrench` icon
- Added `SCRIPT_TOOL_NAMES` constant to identify script entries
- Added `getScriptType()` helper function to map tool names to script types
- Created `ScriptToolCallCard` component that wraps `ToolCallCard` and adds a "Fix Script" button for failed scripts
- Modified `renderToolUse()` to detect script entries and render them with `ScriptToolCallCard`
**2. `PreviewPanel.tsx`** (`frontend/src/components/panels/PreviewPanel.tsx`):
- Added imports for `ScriptFixerDialog`, `useAttemptRepo`, and `Wrench` icon
- Added `useAttemptRepo(attemptId)` hook to get repos
- Added `handleFixDevScript()` function that opens the ScriptFixerDialog
- Added `canFixDevScript` computed value
- Added "Fix Dev Script" button in the troubleshooting alert next to the "Stop and Edit" button
**3. Translation Keys**:
- Added `conversation.fixScript: "Fix Script"` in `en/common.json`
- Added `preview.troubleAlert.fixScript: "Fix Dev Script"` in `en/tasks.json`
The implementation follows the same pattern as the new UI's `ScriptEntryWithFix` component in `NewDisplayConversationEntry.tsx`, using `useAttemptRepo` hook to fetch repos instead of `useWorkspaceContext` (which is only available in the new design scope).
* Cleanup script changes for workspace 5496d4c0-d1d3-4e6a-b9d0-6a421270eeac
* All tasks are complete. Here's a summary of the fixes made:
## Summary of Changes
### Problem
The "Fix Dev Script" button was only showing in the troubleshooting alert, which only appears when a dev server is **running** but slow to respond. When the dev server script **fails to start** (exits with error), there are no running dev servers, so the user saw `NoServerContent` without any fix option.
### Solution
**1. `PreviewPanel.tsx`** - Added failed dev server detection:
```typescript
const failedDevServerProcess = devServerProcesses.find(
(p) =>
p.status === 'failed' ||
(p.status === 'completed' && p.exit_code !== null && p.exit_code !== 0n)
);
const hasFailedDevServer = Boolean(failedDevServerProcess);
```
And passed `hasFailedDevServer` and `onFixDevScript` to `NoServerContent`.
**2. `NoServerContent.tsx`** - Added new props and "Fix Dev Script" button:
- Added `hasFailedDevServer?: boolean` and `onFixDevScript?: () => void` props
- Added fix button that shows when dev server has failed
**3. Translation Keys** - Added `preview.noServer.fixScript: "Fix Dev Script"` to `en/tasks.json`
Now when a user tries to start a dev server and it fails, they'll see the "Fix Dev Script" button in the `NoServerContent` view, allowing them to open the ScriptFixerDialog to fix the script.
* Done! I've successfully added all the Script Fixer i18n translations to the 5 non-English locale files:
**Summary of changes:**
### common.json files (5 files updated)
Added `fixScript` key to the `conversation` section:
- **es**: `"Corregir Script"`
- **ja**: `"スクリプトを修正"`
- **ko**: `"스크립트 수정"`
- **zh-Hans**: `"修复脚本"`
- **zh-Hant**: `"修復腳本"`
### tasks.json files (5 files updated)
1. Added `fixScript` to `preview.noServer` section
2. Added `fixScript` to `preview.troubleAlert` section
3. Added the entire `scriptFixer` section with 17 keys including:
- `title`, `setupScriptTitle`, `cleanupScriptTitle`, `devServerTitle`
- `scriptLabel`, `logsLabel`
- `saveButton`, `saveAndTestButton`, `saving`, `testing`
- `noLogs`, `selectRepo`, `fixScript`
- `statusRunning`, `statusSuccess`, `statusFailed`, `statusKilled`
All type checks (`pnpm run check`) passed successfully.
* Both lint and type check pass now. Here's a summary of the lint fixes I made:
**Fixed lint issues in:**
1. **`ScriptFixerDialog.tsx`** (lines 198 and 253):
- Added missing `repos` dependency to both `handleSave` and `handleSaveAndTest` useCallback hooks
- Removed unnecessary `modal` dependency from `handleSaveAndTest`
2. **`NewDisplayConversationEntry.tsx`** (line 658):
- Used a `useRef` pattern to access `repos` inside the `handleFix` callback without including it in the dependency array, since the `repos` array is recreated on every render from context
* All checks pass. The fix is complete.
**Summary:** The "Fix Script" button in `PreviewControls` will now only appear when the latest dev server process has a status of `'failed'`. When the dev server is running, completed successfully, or was killed by the user, the button will be hidden.
* chore: bump version to 0.0.149
* Prevent WorkspacesSidebar re-render on workspace switch (Vibe Kanban) (#1973)
* The refactoring is complete. Here's a summary of what was changed:
## Summary
**File modified:** `vibe-kanban/frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`
**Change:** Restructured `renderContent()` so that `WorkspacesSidebar` is rendered **outside** the `ExecutionProcessesProvider`.
### Before:
```tsx
<ExecutionProcessesProvider key={`${selectedWorkspace?.id}-${selectedSessionId}`}>
<ReviewProvider>
<Allotment>
<Allotment.Pane>{renderSidebar()}</Allotment.Pane> // Inside provider
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
</Allotment>
</ReviewProvider>
</ExecutionProcessesProvider>
```
### After:
```tsx
<Allotment>
<Allotment.Pane>{renderSidebar()}</Allotment.Pane> // OUTSIDE provider - won't remount
<ExecutionProcessesProvider key={`${selectedWorkspace?.id}-${selectedSessionId}`}>
<ReviewProvider>
<>
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
</>
</ReviewProvider>
</ExecutionProcessesProvider>
</Allotment>
```
**Result:** When switching workspaces, the `ExecutionProcessesProvider`'s key changes, which unmounts/remounts only panes 2-4. The sidebar pane stays mounted and won't re-render unnecessarily.
* The implementation is complete. Here's a summary of what was changed:
## Summary
**File modified:** `vibe-kanban/frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`
### Changes:
1. **Created nested Allotments structure:**
- **Outer Allotment** (2 panes): Sidebar + Content container
- **Inner Allotment** (3 panes): Main + Changes/Logs + Git Panel
2. **Separated resize handlers:**
- `handleOuterPaneResize`: Handles sidebar width only
- `handleInnerPaneResize`: Handles main, changes/logs, and git panel widths
3. **Removed old `handlePaneResize`** which was designed for the flat 4-pane structure
### Result:
```
Outer Allotment
├── Sidebar Pane (OUTSIDE providers - won't remount)
└── Content Pane
└── ExecutionProcessesProvider (keyed)
└── ReviewProvider
└── Inner Allotment
├── Main Pane
├── Changes/Logs Pane
└── Git Panel Pane
```
Now when switching workspaces:
- The `ExecutionProcessesProvider` with its key will remount the inner Allotment (ensuring clean state)
- The sidebar stays mounted because it's outside the keyed provider
- Layout looks the same as before (sidebar on left, 3 panes on right)
* Revert "Fix workspace sidebar ordering to use updated_at instead of created_at (Vibe Kanban) (#1965)" (#1974)
This reverts commit 8dc07ee2b2cabc1326f0aad5a8977c66f98b6f75.
* update cursor-agent models (#1977)
* The frontend TypeScript check passed without errors. (#1978)
The implementation is complete. The change removes the Bash-only restriction so that any tool with output (including MCP tools like `mcp:dev-manager:stop`) can now be clicked to view their results in the logs panel.
**Summary of changes:**
- **File:** `vibe-kanban/frontend/src/components/ui-new/NewDisplayConversationEntry.tsx`
- **Change:** Simplified `hasOutput` check in `ToolSummaryEntry` from `isBash && content && content.trim().length > 0` to just `content && content.trim().length > 0`
- **Effect:** MCP tool entries (and any other tool with output) are now clickable to view their JSON results in the logs panel
* Add session-level review endpoint with StartReviewDialog (Vibe Kanban) (#1849)
* All checks pass. Let me provide a summary of what was implemented:
I've implemented the review endpoint as planned. Here's what was created:
1. **`crates/executors/src/actions/review.rs`** - New action type with:
- `RepoReviewContext` struct (repo_id + commit_hashes)
- `ReviewRequest` struct (executor_profile_id, context, additional_prompt, working_dir)
- `Executable` trait impl that calls `executor.spawn_review()`
2. **`crates/server/src/routes/task_attempts/review.rs`** - Endpoint handler with:
- `StartReviewRequest` for the API
- `RepoReviewContext` (endpoint-specific copy)
- `ReviewError::ProcessAlreadyRunning`
- `start_review` handler that:
- Verifies no running processes on workspace
- Creates fresh session
- Builds ReviewRequest action
- Starts execution with `ExecutionProcessRunReason::CodingAgent`
1. **`crates/executors/src/executors/mod.rs`**:
- Added `spawn_review()` to `StandardCodingAgentExecutor` trait with default prompt-based implementation
- Added `build_review_prompt()` helper function
2. **`crates/executors/src/actions/mod.rs`**:
- Added `pub mod review;`
- Added `ReviewRequest` to `ExecutorActionType` enum
- Updated `base_executor()` match
3. **`crates/services/src/services/container.rs`**:
- Updated match in `try_start_next_action` to handle `ReviewRequest`
4. **`crates/server/src/routes/task_attempts.rs`**:
- Added `pub mod review;`
- Added `.route("/review", post(review::start_review))`
5. **`crates/server/src/bin/generate_types.rs`**:
- Added new types to export list
**`POST /task-attempts/{id}/review`**
Request:
```json
{
"executor_profile_id": { "executor": "CLAUDE_CODE", "variant": null },
"context": [{ "repo_id": "uuid", "commit_hashes": ["abc123"] }],
"additional_prompt": "Focus on security issues"
}
```
Response: `ExecutionProcess` on success, `ReviewError` on failure.
To add native review for an executor (e.g., Codex), just override `spawn_review()` in that executor's `StandardCodingAgentExecutor` impl. No changes needed to action or endpoint.
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
All checks pass now. The duplicate type issue is fixed - we're using a single `RepoReviewContext` type from the executors crate.
All checks pass now. Both frontend lint (ESLint) and backend lint (Clippy) are passing.
Found and fixed the real issue. The problem was in `crates/services/src/services/container.rs` - the log normalization was only set up for `CodingAgentInitialRequest` and `CodingAgentFollowUpRequest`. `ReviewRequest` was falling through to the default case and returning `None`, so no normalizer was started for review processes.
Fixed in two places:
1. **Line 787-791**: Added `ReviewRequest` handling in `stream_normalized_logs` (for historic logs)
2. **Line 1149-1151**: Added `ReviewRequest` handling in `start_execution` (for live logs)
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Backend changes for the `use_all_workspace_commits` flag are complete. Here's what was implemented:
Added `use_all_workspace_commits` flag to `StartReviewRequest` for automatically populating review context.
1. **`crates/db/src/models/execution_process_repo_state.rs`**
- Added `find_initial_commits_for_workspace()` - query to get the earliest `before_head_commit` for each repo in a workspace
2. **`crates/server/src/routes/task_attempts/review.rs`**
- Added `use_all_workspace_commits: bool` field to `StartReviewRequest` (defaults to `false`)
- When flag is `true` and `context` is `None`, auto-populates context with initial commits from workspace execution processes
3. **`crates/executors/src/executors/mod.rs`**
- Updated `build_review_prompt()` to detect single-commit context (indicating initial commit)
- When single commit per repo, prompts agent to "Review all changes made since the following base commit(s)" with git diff hint
4. **`crates/services/src/services/git.rs`**
- Added `get_commits_since_branch()` method (may be useful for future use)
5. **`shared/types.ts`**
- Generated TypeScript type includes `use_all_workspace_commits: boolean`
When frontend calls `POST /task-attempts/{id}/review` with:
```json
{
"executor_profile_id": { "executor": "CLAUDE_CODE", "variant": null },
"use_all_workspace_commits": true
}
```
The backend will:
1. Find the earliest execution process for the workspace
2. Get the `before_head_commit` for each repo (the commit before agents started making changes)
3. Pass that to the prompt builder which tells the agent to review all changes since that commit
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Frontend UI implementation is complete. Here's a summary of what was added:
Added simple frontend UI to test the review endpoint.
1. **`frontend/src/lib/api.ts`**
- Added `startReview` method to `attemptsApi`
- Imports `StartReviewRequest`, `ReviewError` types
2. **`frontend/src/hooks/useStartReview.ts`** (NEW)
- Hook that calls `attemptsApi.startReview` with `use_all_workspace_commits: true`
- Invalidates `processes` and `branchStatus` queries on success
3. **`frontend/src/hooks/index.ts`**
- Exports `useStartReview`
4. **`frontend/src/components/ui/actions-dropdown.tsx`**
- Added "Start Review" menu item in the attempt actions section
- Uses the user's default executor profile from config
- Shows loading state while starting review
5. **`frontend/src/i18n/locales/en/tasks.json`**
- Added translation keys: `startReview`, `startingReview`
From the workspace actions dropdown (three dots menu), click "Start Review" to start a code review session using all workspace commits as context.
Done! The fix has been implemented. The review endpoint now uses `Session::find_latest_by_workspace_id` to find an existing session for the workspace, and only creates a new session if none exists. This means review logs will now appear in the same conversation view as other coding agent runs.
**Change summary:**
- Modified `crates/server/src/routes/task_attempts/review.rs` (lines 79-93)
- Instead of always creating a new session, it now checks for an existing session first using `Session::find_latest_by_workspace_id`
- This matches the pattern used by dev server, setup scripts, and other similar endpoints
Done! The fix is now in place. The change adds `ReviewRequest` to the action type filter in `useConversationHistory.ts` so review processes are included in the conversation view, and handles the content extraction appropriately (using `additional_prompt` for reviews instead of `prompt`).
**Change summary:**
- Modified `frontend/src/hooks/useConversationHistory.ts` (lines 226-244)
- Added `ReviewRequest` to the action type filter
- Used conditional to extract content from `additional_prompt` for reviews (with fallback "Review the code changes") vs `prompt` for coding agent requests
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
Done! All fixes are now in place:
1. **`useConversationHistory.ts` - `flattenEntries()`** (line 177-184): Added `ReviewRequest` to the filter so review processes are included in the flattened entries
2. **`useConversationHistory.ts` - `flattenEntriesForEmit()`** (line 226-244): Already fixed earlier - handles `ReviewRequest` and extracts `additional_prompt` for user message content
3. **`ProcessesTab.tsx`** (line 223-228): Added `ReviewRequest` to the ProfileVariantBadge conditional so the agent badge shows for review processes
* Done. Changes made:
1. **`crates/executors/src/actions/review.rs`**: Added `prompt: String` field to `ReviewRequest`
2. **`crates/server/src/routes/task_attempts/review.rs`**:
- Import `build_review_prompt`
- Build the full prompt from context and additional_prompt before creating the action
3. **`frontend/src/hooks/useConversationHistory.ts`**: Simplified content extraction to just use `actionType.prompt` for all action types (since `ReviewRequest` now has a prompt field too)
4. **Regenerated TypeScript types** - `ReviewRequest` in `shared/types.ts` now includes the `prompt` field
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Done. Here's a summary of the changes:
**Backend:**
1. **`crates/executors/src/actions/review.rs`**:
- Added `CommitRange` enum with three variants: `FromBase`, `Specific`, and `Range`
- Updated `RepoReviewContext` to use `repo_name: String` and `commits: CommitRange` instead of `commit_hashes`
2. **`crates/executors/src/executors/mod.rs`**:
- Updated `build_review_prompt` to format output with repo names and handle all `CommitRange` variants
3. **`crates/server/src/routes/task_attempts/review.rs`**:
- Simplified `StartReviewRequest` (removed `context` field, kept `use_all_workspace_commits`)
- Updated handler to look up repo names via `Repo::find_by_ids` and use `CommitRange::FromBase`
4. **`crates/server/src/bin/generate_types.rs`**: Added `CommitRange` to exported types
**Frontend:**
- **`frontend/src/hooks/useStartReview.ts`**: Removed `context: null` since that field no longer exists
The prompt will now look like:
```
Please review the code changes.
Repository: vibe-kanban
Review all changes from base commit abc123 to HEAD.
Use `git diff abc123..HEAD` to see the changes.
```
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Codex review support (vibe-kanban e7996a18)
## Context
We've added a review endpoint (\`POST /task-attempts/{id}/review\`) that starts a code review session. Currently it uses a default prompt-based implementation via \`spawn\_review()\` on \`StandardCodingAgentExecutor\`, which builds a prompt and delegates to \`spawn()\`.
## Goal
Implement native Codex review support by overriding \`spawn\_review()\` in the Codex executor to use Codex's native review mechanism instead of the prompt-based approach.
## Current Implementation
### Backend Types
\*\*\`CommitRange\` enum\*\* (\`crates/executors/src/actions/review.rs\`):
\`\`\`rust
pub enum CommitRange {
FromBase { commit: String },
Specific { commits: Vec<String> },
Range { from: String, to: String },
}
\`\`\`
\*\*\`RepoReviewContext\`\*\*:
\`\`\`rust
pub struct RepoReviewContext {
pub repo\_id: Uuid,
pub repo\_name: String,
pub commits: CommitRange,
}
\`\`\`
### Trait Method
\*\*\`spawn\_review()\`\*\* in \`StandardCodingAgentExecutor\` trait (\`crates/executors/src/executors/mod.rs\`):
\`\`\`rust
async fn spawn\_review(
&self,
current\_dir: &Path,
context: Option<&[RepoReviewContext]>,
additional\_prompt: Option<&str>,
env: &ExecutionEnv,
) -> Result<SpawnedChild, ExecutorError> {
// Default: build prompt and delegate to spawn()
let prompt = build\_review\_prompt(context, additional\_prompt);
self.spawn(current\_dir, &prompt, env).await
}
\`\`\`
## Tasks
1. Research Codex's native review API/mechanism (if it has one)
2. Override \`spawn\_review()\` in \`CodexExecutor\` to use native review if available
3. Fall back to prompt-based approach if native review isn't supported
* Done. Here's a summary of the changes:
1. **Removed dead code** from `crates/executors/src/executors/codex/review.rs`:
- Deleted the `map_to_review_target()` function (was ~120 lines)
- Removed unused imports (`CommitRange`, `RepoReviewContext`)
2. **Codex now uses `ReviewTarget::Custom`** with the pre-built prompt, which ensures the displayed prompt matches what Codex actually receives.
The build passes and TypeScript types have been regenerated.
* Use custom review target for codex
* Done. Here's a summary of the changes:
## Summary
Moved the review endpoint from workspace-level to session-level:
### Changes
1. **Created `crates/server/src/routes/sessions/review.rs`**
- New review endpoint at `POST /sessions/{id}/review`
- Takes `Extension<Session>` instead of `Extension<Workspace>`
- Looks up `agent_session_id` from previous executions using `find_latest_coding_agent_turn_session_id()`
- Passes `agent_session_id` to `ReviewAction` for session resumption
2. **Updated `crates/server/src/routes/sessions/mod.rs`**
- Added `pub mod review;`
- Added route `.route("/review", post(review::start_review))`
3. **Updated `crates/server/src/routes/task_attempts.rs`**
- Removed `pub mod review;`
- Removed `.route("/review", post(review::start_review))`
4. **Deleted `crates/server/src/routes/task_attempts/review.rs`**
5. **Updated `crates/server/src/bin/generate_types.rs`**
- Changed path from `task_attempts::review` to `sessions::review`
### API Change
- **Old**: `POST /api/task-attempts/{workspace_id}/review`
- **New**: `POST /api/sessions/{session_id}/review`
This ensures vk sessions and agent sessions are 1:1:
- Existing session → resumes agent session if available
- New session → fresh agent session
* Done! Here's a summary of all the frontend changes:
- Added `startReview` to `sessionsApi` using new endpoint `POST /api/sessions/${sessionId}/review`
- Removed `startReview` from `attemptsApi`
- Changed parameter from `attemptId` to `sessionId` and added optional `workspaceId` for query invalidation
- Changed API call from `attemptsApi.startReview` to `sessionsApi.startReview`
- Added `MagnifyingGlassIcon` import
- Added `onStartReview` and `isReviewStarting` to `SessionProps` interface
- Added "Start Review" menu item in the session dropdown
- Added `useStartReview` hook import and usage
- Added `handleStartReview` callback function
- Passed `onStartReview` and `isReviewStarting` to `SessionChatBox`
- Removed `useStartReview` import
- Removed `useUserSystem` import (now unused)
- Removed `startReview` hook usage
- Removed `handleStartReview` function
- Removed "Start Review" menu item from the dropdown
* Done. The fix adds the `ReviewRequest` case to `latest_executor_profile_for_session()` in `crates/db/src/models/execution_process.rs:688-690`.
The backend check passes. Follow-ups after reviews should now work correctly since the executor profile can be extracted from `ReviewRequest` just like from the other request types.
* Done. Removed `CommitRange` enum entirely. Changes:
1. **`crates/executors/src/actions/review.rs`** - Deleted `CommitRange` enum, changed `RepoReviewContext.commits` to `RepoReviewContext.base_commit: String`
2. **`crates/server/src/routes/sessions/review.rs`** - Updated construction to use `base_commit: initial_commit` instead of `commits: CommitRange::FromBase { commit: initial_commit }`
3. **`crates/executors/src/executors/mod.rs`** - Simplified `build_review_prompt()` to directly use `repo.base_commit` instead of matching on the enum
4. **`crates/server/src/bin/generate_types.rs`** - Removed `CommitRange::decl()` from type exports
5. **`shared/types.ts`** - Regenerated, `CommitRange` type is now gone
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Done. Simplified the review context building:
**Changes:**
1. **`crates/db/src/models/execution_process_repo_state.rs`** - Replaced `find_initial_commits_for_workspace` with `find_initial_commit_for_repo` that takes a specific repo_id and uses ORDER BY + LIMIT 1 instead of GROUP BY/HAVING.
2. **`crates/server/src/routes/sessions/review.rs`** - Simplified the context building:
- Get workspace repos first (has repo names via `display_name`)
- For each repo, get initial commit
- Build context directly - no more HashMap joining, no more separate `Repo::find_by_ids` call
The new code is much easier to follow: get repos → for each, get initial commit → build context.
* Done. Addressed all 23 review comments:
1. Removed comment from `SessionChatBoxContainer.tsx` (line 161)
2. Removed doc comments from `RepoReviewContext` and `ReviewRequest` structs in `review.rs`
3. Removed module doc comment from `codex/review.rs`
4. Removed comment from `codex.rs` about Custom review target
5. Removed doc comments from `spawn_review` trait method in `mod.rs`
6. Removed doc comment from `build_review_prompt` function
7. Removed all comments from `sessions/review.rs` (doc comments and inline comments)
8. Removed unused `get_commits_since_branch` function from `git.rs` (~45 lines of dead code)
* Done. Added the review toggle button:
**Changes:**
1. **`SessionChatBox.tsx`**
- Added `ReviewModeProps` interface with `isActive`, `onToggle`, `isSubmitting`
- Added `reviewMode` prop to `SessionChatBoxProps`
- Added toggle button next to attach button (MagnifyingGlassIcon) - highlighted when active
- Updated placeholder to show "Enter review instructions..." when in review mode
- Removed old `onStartReview` and `isReviewStarting` from SessionProps
- Removed "Start Review" dropdown menu item
2. **`SessionChatBoxContainer.tsx`**
- Added `useState` for `isReviewMode`
- Updated `handleSend` to call `startReviewMutation` with `additionalPrompt` when in review mode
- Reset review mode after successful review start
- Pass `reviewMode` props to SessionChatBox
- Removed old `handleStartReview` callback
Now the user can:
1. Click the magnifying glass toggle next to attach
2. Enter review instructions in the text area
3. Click send → starts review with the prompt
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
TypeScript and Rust both compile. The changes are:
1. Button shows "Review" when review mode is active
2. Toggle icon uses `!text-accent-foreground` to force override the `text-low` class from the base component, along with `bg-accent rounded-sm` for the background highlight
Done. Changed `!text-accent-foreground` to `!text-normal` which uses the design system's proper text color for active/selected states. The `!` prefix forces the override of the base `text-low` class. Both TypeScript and Rust compile successfully.
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
All done. TypeScript and Rust compile successfully. Here's a summary of the changes:
**Created:**
- `frontend/src/components/dialogs/tasks/StartReviewDialog.tsx` - New dialog with:
- Agent/variant selection (using ExecutorProfileSelector)
- Review comments preview (if any)
- Additional instructions textarea
- Start Review / Cancel buttons
**Modified:**
- `frontend/src/components/dialogs/index.ts` - Added export for StartReviewDialog
- `frontend/src/components/ui-new/primitives/SessionChatBox.tsx`:
- Changed `ReviewModeProps` from toggle state to simple callback (`onReviewClick`, `isDisabled`)
- Removed toggle styling and review mode button text
- Button now just opens the dialog
- `frontend/src/components/ui-new/containers/SessionChatBoxContainer.tsx`:
- Removed `isReviewMode` state and `startReviewMutation`
- Added `handleReviewClick` callback that opens `StartReviewDialog`
- Disabled review button when in new session mode or no session exists
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
Done. TypeScript and Rust compile successfully. Summary of changes:
**`StartReviewDialog.tsx`:**
- Added "New Session" toggle (defaults ON when no session exists, disabled when no session to toggle from)
- Added conditional `AgentSelector` - only shown when creating a new session
- Always shows `ConfigSelector` for variant selection
- Handles session creation inline when toggle is on or no session exists
- Updated `onSuccess` callback to return new session ID when created
**`SessionChatBox.tsx`:**
- Removed `isDisabled` from `ReviewModeProps` interface
- Removed `reviewMode.isDisabled` from button disabled logic
**`SessionChatBoxContainer.tsx`:**
- Updated `handleReviewClick` to allow opening dialog without sessionId
- Updated `onSuccess` callback to select the new session if one was created
- Removed `isDisabled` from reviewMode prop
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
Done. Made `reviewMode` re…
mxyhi
added a commit
to mxyhi/vibe-kanban
that referenced
this pull request
Jan 16, 2026
* Add QA mode for automated testing with mock executor and hardcoded repos (Vibe Kanban) (#1940)
* The QA mode implementation is complete. Here's a summary of what was implemented:
## Summary
I've successfully implemented the QA mode feature for the vibe-kanban application. Here's what was created/modified:
### New Files
1. **`crates/services/src/services/qa_repos.rs`** - QA repos module that:
- Defines two hardcoded QA repo URLs (`internal-qa-1` and `internal-qa-2`)
- Clones repos to a persistent temp directory on first access using `git2`
- Returns `DirectoryEntry` compatible with existing API
2. **`crates/executors/src/executors/qa_mock.rs`** - Mock executor that:
- Implements `StandardCodingAgentExecutor` trait
- Performs random file operations (create, delete, modify)
- Streams 10 mock log entries in ClaudeJson format over 10 seconds
- Reuses Claude's log processor for normalization
### Modified Files
1. **Cargo.toml files** - Added `qa-mode` feature flags to:
- `crates/executors/Cargo.toml`
- `crates/services/Cargo.toml`
- `crates/server/Cargo.toml`
2. **`crates/executors/src/executors/mod.rs`** - Added:
- Conditional `qa_mock` module export
- `QaMock` variant to `CodingAgent` enum
- Updated `capabilities()` match arm
3. **`crates/executors/src/mcp_config.rs`** - Added `QaMock` handling
4. **`crates/services/src/services/filesystem.rs`** - Override `list_git_repos` and `list_common_git_repos` in QA mode
5. **`crates/services/src/services/container.rs`** - Override `normalize_logs` executor lookup in QA mode
6. **`crates/executors/src/actions/coding_agent_initial.rs`** - Override spawn in QA mode
7. **`crates/executors/src/actions/coding_agent_follow_up.rs`** - Override spawn in QA mode
8. **`vibe-kanban/package.json`** - Added QA build scripts:
- `backend:dev:qa`
- `backend:dev:watch:qa`
- `dev:qa`
### Usage
```bash
# Run backend in QA mode
cargo run --features qa-mode
# Or with pnpm
pnpm run dev:qa
```
When QA mode is enabled:
- `GitPanelCreate` will show only `internal-qa-1` and `internal-qa-2` as recent repos
- Starting any task will perform mock file operations and stream 10 logs over 10 seconds
- Logs follow the ClaudeJson format for compatibility with the existing log processor
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* The TLS error fix is complete. I've replaced the `git2::Repository::clone` call with the `git` CLI approach in `qa_repos.rs`:
**Changes made:**
- Updated `clone_qa_repos_if_needed` function to use `Command::new("git")` with `["clone", "--depth", "1", url, path]` arguments instead of `git2::Repository::clone`
- Added `--depth 1` for shallow cloning (faster)
- Updated error handling to capture stderr output from the git command
The fix uses the git CLI which has reliable TLS support, avoiding the TLS configuration issues that git2 can have on some systems. This matches patterns used elsewhere in the codebase (e.g., `crates/remote/src/github_app/service.rs`).
You can now run `pnpm run backend:dev:qa` or `pnpm run dev:qa` and the QA repos should clone successfully.
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* Done! I've made the mock logs strongly typed by:
1. **Added imports** for `ClaudeJson`, `ClaudeMessage`, `ClaudeContentItem`, and `ClaudeToolData` from the Claude executor
2. **Replaced `generate_mock_logs()`** to use strongly-typed structs:
- Each log entry is now a proper `ClaudeJson` enum variant
- Uses `ClaudeMessage` with proper fields (`id`, `message_type`, `role`, `model`, `content`, `stop_reason`)
- Uses `ClaudeContentItem` variants (`Thinking`, `ToolUse`, `ToolResult`, `Text`)
- Uses `ClaudeToolData` variants (`Read`, `Write`, `Bash`)
- Serializes to JSON using `serde_json::to_string()` for correct escaping
3. **Updated tests** to verify the logs deserialize back to `ClaudeJson` types
This ensures:
- All fields match what `ClaudeLogProcessor::process_logs()` expects
- No manual JSON escaping needed (serde handles it)
- Compile-time type checking prevents malformed logs
- Session IDs are consistent across all entries
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* Done! I've fixed the log display issue by replacing the shell echo approach with a temp file approach:
**Changes made to `crates/executors/src/executors/qa_mock.rs`:**
1. **Write logs to a temp file** instead of embedding them in a shell script:
- Creates a temp file at `$TMPDIR/qa_mock_logs_{uuid}.jsonl`
- Writes all logs as newline-delimited JSON
2. **Use `IFS= read -r` to read the file** - this preserves exact content:
- `IFS=` prevents word splitting
- `-r` prevents backslash interpretation
- `echo "$line"` outputs the exact line content
3. **Clean up the temp file** after reading with `rm -f`
**Benefits:**
- No shell escaping needed - file contents are read verbatim
- Each line is output exactly as serialized by serde_json
- Avoids issues with single quotes, backslashes, and escape sequences
- Temp file is automatically cleaned up after use
This should fix the issue where logs were appearing as raw JSON or with corrupted content due to shell escaping issues.
* fix formatting
* Build succeeds. I've applied the same fix to the two remaining locations that had newlines in their content:
1. **Line 234** - README tool result: Changed `\n\n` to `\\n\\n`
2. **Line 302** - Bash tool result: Changed `\n` to `\\n`
This matches the pattern the user established in the assistant final message (line 318) where `\\n` is used instead of `\n` to ensure newlines are properly preserved through the serialization and display pipeline.
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* simplify scripts
* update agents.md
* fix: update font-feature-settings in diff-style-overrides.css (#1827)
* fix: update font-feature-settings in diff-style-overrides.css
Changed the font-feature-settings property for the diff-tailwindcss-wrapper to disable ligatures by setting it to "liga" off, ensuring consistent text rendering across different components.
* chore: run formatter
---------
Co-authored-by: Pedro <>
* feat: remove `agent_working_dir` from settings (#1874)
* remove configurable agent_working_dir
(cherry picked from commit 285b3e04abceeb8e4a4ee1be16e3de97a8f32299)
* calculate agent_working_dir on create and start task
* i18n
* Fix gh CLI compatibility for older versions missing baseRefOid field
**Changes:**
1. Added `GhApiPr` and `GhApiRef` structs (lines 31-46) to deserialize the GitHub REST API response
2. Added `get_pr_info_via_api()` function (lines 103-141) as a fallback that uses `gh api repos/{owner}/{repo}/pulls/{number}`
3. Modified `get_pr_info()` (lines 166-170) to detect "unknown json field" errors and fall back to the API method
**How it works:**
- Modern `gh` CLI versions continue to use the faster `gh pr view --json` approach
- When an older `gh` CLI returns "Unknown JSON field: baseRefOid", the code catches this error and falls back to `gh api` which uses the stable REST API
- The REST API fields (`base.sha`, `head.sha`, `head.ref`) have been stable for years and work with all `gh` CLI versions
* Make local build script work across more platforms (#1681)
* Enhance local build script and frontend package configuration
- Updated `local-build.sh` to detect OS and architecture, setting the target directory dynamically based on the platform.
- Modified build and lint scripts in `frontend/package.json` to include `NODE_OPTIONS=--max-old-space-size=4096` for improved memory management during builds and linting.
* Enhance local build script and frontend package configuration
- Updated `local-build.sh` to detect OS and architecture, setting the target directory dynamically based on the platform.
- Modified build and lint scripts in `frontend/package.json` to include `NODE_OPTIONS=--max-old-space-size=4096` for improved memory management during builds and linting.
* Solve task follow up section infinite loop (#1955)
**Root cause:** The `switch` statement was missing a `default` case. When `typ.type` didn't match any handled case, the loop continued forever because `curr` was never updated.
**Changes made:**
1. **`vibe-kanban/frontend/src/utils/executor.ts`** (line 59-60): Added `default:` to fall through with `ScriptRequest`, advancing to the next action for any unhandled types.
2. **`vibe-kanban/frontend/src/components/tasks/TaskFollowUpSection.tsx`**:
- Removed duplicate local `extractProfile` function (17 lines)
- Added import from `@/utils/executor`
- Updated usage to `extractProfileFromAction`
3. **`vibe-kanban/frontend/src/components/NormalizedConversation/RetryEditorInline.tsx`**:
- Removed duplicate local `extractProfile` function (17 lines)
- Added import from `@/utils/executor`
- Updated usage to `extractProfileFromAction`
Both type checks (TypeScript and Rust/cargo) pass successfully.
* Add accelerated 1-hour cleanup for archived workspaces or inactive tasks (Vibe Kanban) (#1952)
* The implementation is complete. Here's a summary of the changes:
## Summary
Modified `crates/db/src/models/workspace.rs` in the `find_expired_for_cleanup()` function:
1. **Added task join** - `JOIN tasks t ON w.task_id = t.id` to access the task's status
2. **Conditional expiration threshold** in the `HAVING` clause:
- **1 hour** if workspace is archived AND task status is NOT `inprogress` or `inreview`
- **72 hours** otherwise (preserves existing behavior)
```sql
HAVING datetime('now',
CASE
WHEN w.archived = 1 AND t.status NOT IN ('inprogress', 'inreview')
THEN '-1 hours'
ELSE '-72 hours'
END
) > datetime(...)
```
This means archived workspaces for completed/cancelled/todo tasks will be cleaned up much faster (1 hour vs 72 hours), while active work remains protected.
* Done! I've:
1. **Fixed the condition** from `AND` to `OR` in `crates/db/src/models/workspace.rs:350`
2. **Updated the doc comment** to reflect the correct logic
3. **Regenerated the SQLx cache** with `pnpm run prepare-db`
4. **Updated the PR** with the corrected title and description
The accelerated cleanup now triggers when:
- The workspace is archived (regardless of task status), **OR**
- The task is not actively being worked on (todo/done/cancelled)
* Fix comparison between EP and Workspace during cleanup (#1959)
* Increase max height of chat box (#1957)
I've successfully implemented the change to allow the `ChatBoxBase.tsx` to expand vertically up to 50% of the window height.
**Change made in** `vibe-kanban/frontend/src/components/ui-new/primitives/ChatBoxBase.tsx:144`:
```tsx
// Before:
className="min-h-0 max-h-[min(15rem,20vh)] overflow-y-auto"
// After:
className="min-h-0 max-h-[50vh] overflow-y-auto"
```
**What this does:**
- The old constraint `max-h-[min(15rem,20vh)]` limited the editor to whichever was smaller: 15rem or 20% of viewport height
- The new constraint `max-h-[50vh]` allows the editor to grow up to 50% of the viewport height
- The editor still starts small and only expands as content is added (due to `min-h-0`)
- `overflow-y-auto` ensures scrolling when content exceeds the max height
**Verification:**
- ✅ TypeScript check passes (`pnpm run check`)
- ✅ ESLint passes (`pnpm run lint`)
- The dev server was started and the change was tested in the browser (though the browser MCP encountered an issue during extended testing)
* Done. I've updated the agent install hints across all 6 locales: (#1960)
**Changes made:**
- `notFound`: Changed from "Not Found" → "Unknown" (and equivalent in other languages)
- `notFoundTooltip`: Changed from "No previous usage detected. Agent may require installation and/or login." → "We couldn't verify this agent is set up, but go ahead and try it."
**Files modified:**
- `frontend/src/i18n/locales/en/settings.json`
- `frontend/src/i18n/locales/es/settings.json`
- `frontend/src/i18n/locales/ja/settings.json`
- `frontend/src/i18n/locales/ko/settings.json`
- `frontend/src/i18n/locales/zh-Hans/settings.json`
- `frontend/src/i18n/locales/zh-Hant/settings.json`
The new wording is softer and encourages users to just try the agent rather than assuming it's not installed.
* Fix QA mode lint warnings with conditional compilation attributes (Vibe Kanban) (#1958)
* All lint checks pass. Here's a summary of the fixes I made:
**Fixed files:**
1. **`crates/executors/src/actions/coding_agent_follow_up.rs`**:
- Made `ExecutorConfigs` import conditional with `#[cfg(not(feature = "qa-mode"))]`
- Added `let _ = &approvals;` in qa-mode block to silence unused variable warning
2. **`crates/executors/src/actions/coding_agent_initial.rs`**:
- Same fixes as above
3. **`crates/executors/src/executors/qa_mock.rs`**:
- Changed `std::io::Error::new(std::io::ErrorKind::Other, e)` to `std::io::Error::other(e)` (clippy `io_other_error` lint)
4. **`crates/services/src/services/container.rs`**:
- Made `ExecutorConfigs` import conditional with `#[cfg(not(feature = "qa-mode"))]`
- Renamed `executor_profile_id` to `_executor_profile_id` to indicate it's conditionally used
5. **`crates/services/src/services/filesystem.rs`**:
- Made imports conditional: `HashSet`, `WalkBuilder`, and `CancellationToken` are only needed in non-qa-mode
- Added `#[cfg(not(feature = "qa-mode"))]` to helper functions: `get_directories_to_skip`, `list_git_repos_with_timeout`, `list_git_repos_inner`
- Renamed parameters to `_path`, `_timeout_ms`, `_hard_timeout_ms`, `_max_depth` since they're not used in qa-mode
- Removed needless `return` statements in qa-mode blocks
6. **`crates/services/src/services/qa_repos.rs`**:
- Changed `&PathBuf` to `&std::path::Path` in function parameter (clippy `ptr_arg` lint)
* Cleanup script changes for workspace 6fcb2b78-f418-451f-9a22-8d4381a538f0
* All lint checks pass. The fix now uses `#[cfg_attr(feature = "qa-mode", allow(unused_variables))]` which cleanly communicates that the variables are intentionally unused only in qa-mode, while keeping the normal parameter names.
* All lint checks pass. Fixed by using `#[cfg_attr(feature = "qa-mode", allow(unused_variables))]` and keeping the proper variable name `executor_profile_id` (which is used in non-qa-mode).
* All lint checks pass. The changes are now cleaner - using `#[cfg_attr(feature = "qa-mode", allow(unused_variables))]` on the function instead of `let _ = &approvals;` inside the qa-mode block.
To summarize the cleanup: I replaced the inline `let _ = &approvals;` workaround in `coding_agent_initial.rs` and `coding_agent_follow_up.rs` with the cleaner `#[cfg_attr]` attribute on the function, which is consistent with how we handled it in `filesystem.rs` and `container.rs`.
* I've made both changes: (#1962)
1. **Moved the Dev Server Script input** to be the first field in the Scripts & Configuration section (in `ReposSettings.tsx`)
2. **Updated the section description** in the English locale to mention "dev server" scripts: the description now reads "Configure dev server, setup, cleanup, and copy files for this repository..."
* feat(notifications): include task name in approval needed notification (#1879)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <[email protected]>
* Add Push button to Git panel when PR is open with unpushed commits (Vibe Kanban) (#1951)
* The implementation is complete. Here's a summary of what I changed:
## Summary
Added a "Push" button to the workspaces UI Git panel. The changes allow users to push changes when a PR is already open.
### Files Modified:
1. **`frontend/src/components/ui-new/primitives/RepoCard.tsx`** (lines 27-42)
- Added `'push'` to the `RepoAction` type union
- Added a new option to `repoActionOptions` array with the Push button configuration using `ArrowUpIcon`
2. **`frontend/src/components/ui-new/actions/index.ts`** (lines 33, 691-707)
- Imported `ArrowUpIcon` from phosphor-icons
- Added `GitPush` action definition that:
- Calls `attemptsApi.push()` with the workspace and repo IDs
- Handles the `force_push_required` error case
- Invalidates workspace queries on success to refresh the UI
3. **`frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`** (line 103)
- Added mapping from `'push'` action to `Actions.GitPush` in the action handler
The Push button now appears in the Git panel dropdown alongside "Open pull request" and "Merge" options.
* The type check passes. Here's a summary of the updated changes:
## Summary
The Push button now appears **next to the PR number** when:
1. A PR is already open (`prStatus === 'open'`)
2. There are new commits ahead (`commitsAhead > 0`)
### Changes Made:
**`frontend/src/components/ui-new/primitives/RepoCard.tsx`**:
- Removed `push` from the `repoActionOptions` dropdown (lines 34-41)
- Added a dedicated Push button in the PR status row (lines 213-222) that:
- Only appears when `prStatus === 'open'` AND `commitsAhead > 0`
- Uses brand primary styling (`bg-brand-primary`) to make it prominent
- Displays with an up arrow icon and "Push" label using existing translation
- Calls `onActionsClick?.('push')` when clicked
The `GitPush` action and handler mapping from the previous changes remain in place to handle the push operation.
* Done. The Push button now uses the same styling as the "Open PR" button: `bg-panel text-normal hover:bg-tertiary`.
* The type check passes. Here's a summary of the fix:
## Summary
The Push button now correctly uses `remoteCommitsAhead` (unpushed commits to remote) instead of `commitsAhead` (total commits ahead of target branch) to determine when to show.
### Changes Made:
1. **`frontend/src/components/ui-new/views/GitPanel.tsx`**:
- Added `remoteCommitsAhead: number` to the `RepoInfo` interface
- Pass `remoteCommitsAhead` to `RepoCard`
2. **`frontend/src/components/ui-new/primitives/RepoCard.tsx`**:
- Added `remoteCommitsAhead?: number` to `RepoCardProps`
- Changed the push button condition from `commitsAhead > 0` to `remoteCommitsAhead > 0`
3. **`frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`**:
- Added `remoteCommitsAhead: repoStatus?.remote_commits_ahead ?? 0` to the `repoInfos` mapping
Now the Push button will:
- Only appear when there's an open PR AND there are unpushed commits (`remote_commits_ahead > 0`)
- Disappear after a successful push (when `remote_commits_ahead` becomes 0)
- Reappear when new commits are made locally that haven't been pushed
* The type check passes. Here's a summary of the changes:
## Summary
The Push button now hides immediately when clicked and only reappears when new commits are available:
### Changes to `RepoCard.tsx`:
- Added `useState` and `useRef` imports
- Added `isPushHidden` state to track when the button should be hidden
- Added `lastRemoteCommitsAhead` ref to track the previous value
- Added `useEffect` that resets `isPushHidden` to `false` when `remoteCommitsAhead` increases (meaning new commits are available)
- Added `handlePushClick` function that hides the button immediately and triggers the push action
- Updated the button condition to include `!isPushHidden`
The button will:
1. Hide immediately when clicked (no double-clicking possible)
2. Stay hidden until `remoteCommitsAhead` increases above the last known value
3. Reappear when new local commits are made that need to be pushed
* Both the linter and type check pass. The linter errors are fixed. Here's a summary of the changes:
## Summary of Linter Fixes
The linter was flagging that `RepoCard` (a presentational component) should not manage state or have side effects. I refactored the code to lift the state up to the container component:
### Changes:
1. **`RepoCard.tsx`** - Made purely presentational:
- Removed `useState`, `useRef`, `useEffect` imports
- Removed `remoteCommitsAhead` prop
- Added `showPushButton` prop (boolean, controlled by parent)
- Added `onPushClick` callback prop
- The button now just renders based on `showPushButton` and calls `onPushClick`
2. **`GitPanel.tsx`** - Updated interface and props:
- `RepoInfo` now has optional `remoteCommitsAhead` and `showPushButton` fields
- Added `onPushClick` callback to `GitPanelProps`
- Passes `showPushButton` and `onPushClick` to `RepoCard`
3. **`WorkspacesLayout.tsx`** - State management moved here:
- Added `hiddenPushRepos` state (Set of repo IDs where push was clicked)
- Added `lastRemoteCommitsAhead` ref to track previous values
- Added `useEffect` to reset hidden state when `remoteCommitsAhead` increases
- Added `repoInfosWithPushButton` memo that computes `showPushButton` for each repo
- Added `handlePushClick` that hides button immediately and executes push action
* prettier fix
* Done. I've added `GitPush` to the Git actions list in the command bar. It now appears between "Merge" and "Rebase" in the Git Actions menu.
* Both type check and lint pass.
Done! The Push action in the command bar now has the same visibility conditions as in the Git panel - it only appears when:
1. There's a workspace
2. There are git repos
3. There's an open PR (`hasOpenPR`)
4. There are unpushed commits (`hasUnpushedCommits`)
### Summary of changes:
1. **`frontend/src/components/ui-new/actions/index.ts`**:
- Added `hasOpenPR` and `hasUnpushedCommits` to `ActionVisibilityContext`
- Updated `GitPush.isVisible` to check these new context properties
2. **`frontend/src/components/ui-new/actions/useActionVisibility.ts`**:
- Added `useBranchStatus` hook to get branch status data
- Computed `hasOpenPR` by checking if any repo has an open PR in merges
- Computed `hasUnpushedCommits` by checking if any repo has `remote_commits_ahead > 0`
- Added these values to the returned context
* The refactoring is complete. Here's a summary of the changes:
## Summary of Changes
The push button logic has been simplified by using React Query's mutation state instead of manually tracking hidden state with refs and effects.
### Key Changes:
1. **WorkspacesLayout.tsx (`GitPanelContainer`)**:
- Removed the complex `useEffect` that tracked `lastRemoteCommitsAhead` and managed `hiddenPushRepos` state
- Removed `hiddenPushRepos` state and `lastRemoteCommitsAhead` ref
- Added `usePush` hook with callbacks that:
- On success: awaits query invalidation before clearing the loading state
- On error: clears the loading state
- Added simple `pushingRepoId` state to track which repo is being pushed
- The button now shows loading state during push and automatically disappears after refetch if `remoteCommitsAhead` becomes 0
2. **GitPanel.tsx**:
- Added `isPushPending?: boolean` to `RepoInfo` interface
- Passes `isPushPending` to `RepoCard`
3. **RepoCard.tsx**:
- Added `isPushPending` prop
- Button shows while either `showPushButton` or `isPushPending` is true
- Button is disabled and shows spinner with "Pushing..." text when pending
- Uses existing translation key `git.states.pushing`
### How it works now:
1. User clicks push button
2. Button immediately shows loading state (spinner + "Pushing...")
3. Button is disabled to prevent multiple clicks
4. Push mutation runs
5. On success, query invalidation completes before clearing loading state
6. Once `branchStatus` refetches, if `remoteCommitsAhead` is 0, `showPushButton` becomes false and button disappears
7. On error, loading state clears and button returns to normal
This approach is simpler and more predictable than manually tracking previous values.
* Done. The push button now shows success feedback like the old UI:
## Summary of Changes
The push button now has three states:
1. **Normal**: Shows "Push" with an up arrow icon
2. **Pending**: Shows "Pushing..." with a spinning icon, button is disabled
3. **Success**: Shows "Pushed!" with a green checkmark icon and green background for 2 seconds
The flow is:
1. User clicks "Push"
2. Button immediately shows "Pushing..." with spinner
3. Push completes, queries are invalidated and refetched
4. Button shows green "Pushed!" for 2 seconds
5. Button disappears (if no more commits to push) or returns to normal state
* All code review issues have been addressed:
## Summary of Changes
1. **Unified push logic** - Now uses `executeAction(Actions.GitPush, ...)` instead of calling `usePush` hook directly. This ensures consistent error handling between the button and command bar.
2. **Proper setTimeout cleanup** - Added `successTimeoutRef` with a cleanup effect that clears the timeout when the component unmounts:
```typescript
const successTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
useEffect(() => {
return () => {
if (successTimeoutRef.current) {
clearTimeout(successTimeoutRef.current);
}
};
}, []);
```
3. **Error feedback** - Added error state handling:
- New `isPushError` prop flows through GitPanel to RepoCard
- Button shows red "Failed" with warning icon when push fails
- Error state clears after 3 seconds
- Added `git.states.pushFailed` translation key
4. **Simplified state management** - Changed from separate `pushingRepoId` and `pushSuccessRepoId` to a single `pushStates` record with `PushState` type (`'idle' | 'pending' | 'success' | 'error'`)
* All i18n checks pass now.
* Both code review issues have been addressed:
## Summary of Changes
### 1. Fixed stale closure issue
- Added a `pushStatesRef` that mirrors the `pushStates` state
- Changed the check from `pushStates[repoId]` to `pushStatesRef.current[repoId]`
- Removed `pushStates` from the dependency array
### 2. Added proper error logging and user-facing error message
- Modified `ActionsContext.tsx` to re-throw errors after showing the dialog, so callers can handle them
- Added `console.error('Push failed:', error)` for debugging purposes
- The error dialog is already shown by `executeAction` via `ConfirmDialog`
- The button now properly shows the error state when push fails
* fmt
* The fix is in place. The key change is:
- When we're in a "push flow" (state is `pending`, `success`, or `error`), we set `showPushButton: false` but the button remains visible because of the `isPushPending || isPushSuccess || isPushError` condition in RepoCard
- This prevents the race condition where the query refetch could hide the button before we set the success state
* All checks pass. The changes now:
1. **Reverted ActionsContext** - Removed the re-throw to maintain backwards compatibility
2. **Use `usePush` hook directly** - For proper success/error detection instead of going through `executeAction`
3. **Show error dialog manually** - Using `ConfirmDialog.show()` when push fails
4. **Track current repo with ref** - `currentPushRepoRef` tracks which repo is being pushed so callbacks can update the correct state
* All checks pass. Here's a summary of the force push handling:
## Force Push Functionality
Yes, force push is fully supported. Here's how it works:
**Old UI (`useGitOperations.ts`):**
1. When `usePush` fails with `errorData.type === 'force_push_required'`
2. It automatically shows `ForcePushDialog`
3. The dialog warns the user about the consequences and lets them confirm
4. If confirmed, it calls `useForcePush` to execute the force push
**New UI (now updated):**
1. When the push button is clicked and fails with `force_push_required`
2. The push state is reset to `idle` (so the button returns to normal)
3. `ForcePushDialog` is shown with the attemptId and repoId
4. User can confirm or cancel the force push from the dialog
The `ForcePushDialog` handles its own loading state, success/error feedback, and API call internally via `useForcePush` hook.
* clear pushStates on workspace change
Co-authored-by: Copilot <[email protected]>
---------
Co-authored-by: Copilot <[email protected]>
* Fix workspace sidebar ordering to use updated_at instead of created_at (Vibe Kanban) (#1965)
* Done. I've updated the workspace sorting in `frontend/src/components/ui-new/hooks/useWorkspaces.ts` to use `updated_at` instead of `created_at`. Both active and archived workspaces will now be sorted by their most recent update time (with pinned workspaces still appearing first). All type checks and lint pass.
* Cleanup script changes for workspace 37e99d73-8ab0-4501-990e-1007d78e44aa
* Fix search input losing focus when hovering over dropdown items (Vibe Kanban) (#1966)
* Done! Here's a summary of the changes:
## Changes Made
### 1. `Dropdown.tsx` (lines 140-190)
- Added `preventFocusOnHover?: boolean` prop to `DropdownMenuItemProps` interface
- Added `onPointerMove` handler that calls `e.preventDefault()` when `preventFocusOnHover` is true, which stops Radix from stealing focus on hover
### 2. `SearchableDropdown.tsx` (line 110)
- Added `preventFocusOnHover` prop to `DropdownMenuItem`
### 3. `ProjectSelectorContainer.tsx` (lines 181, 208)
- Added `preventFocusOnHover` prop to both `DropdownMenuItem` components (the "Create new project" button and the virtualized project items)
The fix uses `e.preventDefault()` on `onPointerMove` to disable Radix's hover-to-focus behavior, as documented in [Radix UI Issue #2193](https://github.com/radix-ui/primitives/issues/2193). This preserves all other functionality (click, keyboard navigation, selection) while allowing the search input to retain focus when hovering over items.
* Done! I've added the `onPointerLeave` handler to `DropdownMenuItem` alongside the existing `onPointerMove` handler. Both now call `e.preventDefault()` when `preventFocusOnHover` is true.
**Summary of the fix:**
- Added `onPointerLeave` destructuring from props (line 161)
- Added `onPointerLeave` handler that calls `e.preventDefault()` when `preventFocusOnHover` is true (lines 187-194)
Per the [Radix UI Issue #2193](https://github.com/radix-ui/primitives/issues/2193), **both** `onPointerMove` and `onPointerLeave` need `preventDefault()` to fully disable hover-to-focus behavior.
* Script Fixer Dialog (Vibe Kanban) (#1968)
* All checks pass. Let me provide a summary of what was implemented:
## Summary
I've implemented the Script Fixer Dialog feature. Here's what was created and modified:
### New File Created:
1. **`frontend/src/components/dialogs/scripts/ScriptFixerDialog.tsx`** - A new dialog component that:
- Shows the current script content in an editable textarea
- Displays the last execution logs using `VirtualizedProcessLogs`
- Provides "Save" and "Save and Test" buttons
- Supports both setup scripts and dev server scripts
- Handles multi-repo scenarios with a repo selector dropdown
### Files Modified:
**New UI (Setup Script):**
1. **`ChatScriptEntry.tsx`** - Added `onFix` prop and a "Fix Script" button that appears when a script fails
2. **`NewDisplayConversationEntry.tsx`** - Added `ScriptEntryWithFix` wrapper component that provides the fix handler to `ChatScriptEntry`
**Legacy UI (Setup Script):**
3. **`DisplayConversationEntry.tsx`** - Added `ScriptFixButton` component that renders a fix button for failed scripts in the legacy conversation view
**Preview/Dev Server:**
4. **`PreviewPanel.tsx`** - Added "Fix Script" button to the troubleshooting alert when dev server has issues
5. **`PreviewBrowser.tsx`** - Added optional `handleFixDevScript` prop and "Fix Script" button alongside "Start Server"
6. **`PreviewBrowserContainer.tsx`** - Wired up the dialog opening for dev server script fixes
7. **`PreviewControls.tsx`** - Added `onFixScript` prop and "Fix Script" button in the dev server controls
8. **`PreviewControlsContainer.tsx`** - Wired up the dialog opening for the controls
**Translations:**
9. **`tasks.json` (English)** - Added `scriptFixer` translation keys
* Cleanup script changes for workspace 5496d4c0-d1d3-4e6a-b9d0-6a421270eeac
* Type check passes. I've updated the `ScriptFixerDialog` to also start the dev server when "Save and Test" is clicked for dev_server script type.
* Done! I've updated the `ScriptFixerDialog` to:
1. **Keep the dialog open after "Save and Test"** - The dialog no longer closes after clicking "Save and Test", so the user can watch the logs update in real-time as the script executes
2. **Changed "Cancel" to "Close"** - The button now says "Close" (using `t('common:close')`) and is always enabled, making it clear the user can close the dialog at any time
3. **Logs update automatically** - The `useExecutionProcesses` and `useLogStream` hooks will automatically pick up the new execution process and stream its logs in real-time
* Cleanup script changes for workspace 5496d4c0-d1d3-4e6a-b9d0-6a421270eeac
* Done! I've fixed the horizontal overflow by adding `min-w-0` to all flex containers and `overflow-hidden` to the `DialogContent`. This prevents flex children from overflowing their container horizontally.
* The type check passes. The fix has been applied - the width constraints (`max-w-4xl w-[90vw]`) are now on the `Dialog` component instead of `DialogContent`. This will override the default `max-w-xl` from the Dialog component's base className, allowing the dialog to be wider and preventing horizontal overflow.
* Done! I've added the status indicator to the ScriptFixerDialog. Here's what was implemented:
**Changes made:**
1. **`ScriptFixerDialog.tsx`:**
- Added import for `RunningDots` component
- Added status computation logic to determine if the process is running, succeeded, failed, or killed
- Added status indicator UI next to the "Last Execution Logs" label showing:
- Animated dots + "Running..." when the script is executing
- Green dot + "Completed successfully" when script succeeded (exit code 0)
- Red dot + "Failed with exit code X" when script failed
- Gray dot + "Process was killed" when killed
2. **`tasks.json` (translations):**
- Added `statusRunning`, `statusSuccess`, `statusFailed`, and `statusKilled` translation keys
The status indicator will update in real-time as the script executes since it's computed from `latestProcess` which is updated via the `useExecutionProcesses` hook.
* Fixed! The issue was that `exit_code` can be `null` when the process completes successfully, and comparing `null !== BigInt(0)` returns `true`, which incorrectly triggered the error state.
The fix:
- Treat `exit_code === null` as success (same as exit code 0)
- Only show error when `exit_code` is explicitly a non-zero value
* Fixed. The issue was that `exit_code` comes back as a regular number `0` from the API, but the TypeScript type says `bigint`. Using `Number(exitCode) === 0` handles both cases correctly and satisfies the type checker.
* Fixed! The translation key was missing the `buttons.` namespace prefix. It now uses `t('common:buttons.close')` which maps to "Close".
* Done. Added `bg-error` and `text-error` classes alongside the `destructive` classes for the error state.
* styles
* Done! I've fixed the issue by passing `sessionId` to the `ScriptFixerDialog` in all three files:
1. **`PreviewPanel.tsx`** - Gets `sessionId` from `devServerProcesses[0]?.session_id`
2. **`PreviewBrowserContainer.tsx`** - Added `devServerProcesses` to destructuring from `usePreviewDevServer` and passes `sessionId`
3. **`PreviewControlsContainer.tsx`** - Already had `devServerProcesses`, just added `sessionId` to the dialog call
Now when you click "Save and Test" for a dev server script, the dialog will receive the session ID, connect to the WebSocket stream, and show the execution logs in real-time.
* rollback trigger the ScriptFixer for old UI
* Done! I've extended the ScriptFixerDialog to support cleanup scripts. Here's a summary of the changes:
**1. `frontend/src/i18n/locales/en/tasks.json`**
- Added `cleanupScriptTitle: "Fix Cleanup Script"` translation key
**2. `frontend/src/components/dialogs/scripts/ScriptFixerDialog.tsx`**
- Updated `ScriptType` from `'setup' | 'dev_server'` to `'setup' | 'cleanup' | 'dev_server'`
- Updated `latestProcess` filter to use `'cleanupscript'` run_reason for cleanup scripts
- Updated script fetching logic to read `cleanup_script` field
- Updated both `handleSave` and `handleSaveAndTest` to save `cleanup_script` field
- Updated execution logic to call `attemptsApi.runCleanupScript(workspaceId)` for cleanup scripts
- Updated dialog title to show "Fix Cleanup Script" for cleanup type
- Updated placeholder text to show `#!/bin/bash\nrm -rf node_modules` for cleanup scripts
**3. `frontend/src/components/ui-new/NewDisplayConversationEntry.tsx`**
- Fixed the scriptType mapping so "Cleanup Script" maps to `'cleanup'` instead of incorrectly mapping to `'setup'`
* All tasks are complete. Here's a summary of the changes I made:
## Summary
I've implemented the ScriptFixerDialog in the old UI for both `DisplayConversationEntry.tsx` and `PreviewPanel.tsx`.
### Changes Made:
**1. `DisplayConversationEntry.tsx`** (`frontend/src/components/NormalizedConversation/DisplayConversationEntry.tsx`):
- Added imports for `ScriptFixerDialog`, `ScriptType`, `useAttemptRepo`, `Button`, and `Wrench` icon
- Added `SCRIPT_TOOL_NAMES` constant to identify script entries
- Added `getScriptType()` helper function to map tool names to script types
- Created `ScriptToolCallCard` component that wraps `ToolCallCard` and adds a "Fix Script" button for failed scripts
- Modified `renderToolUse()` to detect script entries and render them with `ScriptToolCallCard`
**2. `PreviewPanel.tsx`** (`frontend/src/components/panels/PreviewPanel.tsx`):
- Added imports for `ScriptFixerDialog`, `useAttemptRepo`, and `Wrench` icon
- Added `useAttemptRepo(attemptId)` hook to get repos
- Added `handleFixDevScript()` function that opens the ScriptFixerDialog
- Added `canFixDevScript` computed value
- Added "Fix Dev Script" button in the troubleshooting alert next to the "Stop and Edit" button
**3. Translation Keys**:
- Added `conversation.fixScript: "Fix Script"` in `en/common.json`
- Added `preview.troubleAlert.fixScript: "Fix Dev Script"` in `en/tasks.json`
The implementation follows the same pattern as the new UI's `ScriptEntryWithFix` component in `NewDisplayConversationEntry.tsx`, using `useAttemptRepo` hook to fetch repos instead of `useWorkspaceContext` (which is only available in the new design scope).
* Cleanup script changes for workspace 5496d4c0-d1d3-4e6a-b9d0-6a421270eeac
* All tasks are complete. Here's a summary of the fixes made:
## Summary of Changes
### Problem
The "Fix Dev Script" button was only showing in the troubleshooting alert, which only appears when a dev server is **running** but slow to respond. When the dev server script **fails to start** (exits with error), there are no running dev servers, so the user saw `NoServerContent` without any fix option.
### Solution
**1. `PreviewPanel.tsx`** - Added failed dev server detection:
```typescript
const failedDevServerProcess = devServerProcesses.find(
(p) =>
p.status === 'failed' ||
(p.status === 'completed' && p.exit_code !== null && p.exit_code !== 0n)
);
const hasFailedDevServer = Boolean(failedDevServerProcess);
```
And passed `hasFailedDevServer` and `onFixDevScript` to `NoServerContent`.
**2. `NoServerContent.tsx`** - Added new props and "Fix Dev Script" button:
- Added `hasFailedDevServer?: boolean` and `onFixDevScript?: () => void` props
- Added fix button that shows when dev server has failed
**3. Translation Keys** - Added `preview.noServer.fixScript: "Fix Dev Script"` to `en/tasks.json`
Now when a user tries to start a dev server and it fails, they'll see the "Fix Dev Script" button in the `NoServerContent` view, allowing them to open the ScriptFixerDialog to fix the script.
* Done! I've successfully added all the Script Fixer i18n translations to the 5 non-English locale files:
**Summary of changes:**
### common.json files (5 files updated)
Added `fixScript` key to the `conversation` section:
- **es**: `"Corregir Script"`
- **ja**: `"スクリプトを修正"`
- **ko**: `"스크립트 수정"`
- **zh-Hans**: `"修复脚本"`
- **zh-Hant**: `"修復腳本"`
### tasks.json files (5 files updated)
1. Added `fixScript` to `preview.noServer` section
2. Added `fixScript` to `preview.troubleAlert` section
3. Added the entire `scriptFixer` section with 17 keys including:
- `title`, `setupScriptTitle`, `cleanupScriptTitle`, `devServerTitle`
- `scriptLabel`, `logsLabel`
- `saveButton`, `saveAndTestButton`, `saving`, `testing`
- `noLogs`, `selectRepo`, `fixScript`
- `statusRunning`, `statusSuccess`, `statusFailed`, `statusKilled`
All type checks (`pnpm run check`) passed successfully.
* Both lint and type check pass now. Here's a summary of the lint fixes I made:
**Fixed lint issues in:**
1. **`ScriptFixerDialog.tsx`** (lines 198 and 253):
- Added missing `repos` dependency to both `handleSave` and `handleSaveAndTest` useCallback hooks
- Removed unnecessary `modal` dependency from `handleSaveAndTest`
2. **`NewDisplayConversationEntry.tsx`** (line 658):
- Used a `useRef` pattern to access `repos` inside the `handleFix` callback without including it in the dependency array, since the `repos` array is recreated on every render from context
* All checks pass. The fix is complete.
**Summary:** The "Fix Script" button in `PreviewControls` will now only appear when the latest dev server process has a status of `'failed'`. When the dev server is running, completed successfully, or was killed by the user, the button will be hidden.
* chore: bump version to 0.0.149
* Prevent WorkspacesSidebar re-render on workspace switch (Vibe Kanban) (#1973)
* The refactoring is complete. Here's a summary of what was changed:
## Summary
**File modified:** `vibe-kanban/frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`
**Change:** Restructured `renderContent()` so that `WorkspacesSidebar` is rendered **outside** the `ExecutionProcessesProvider`.
### Before:
```tsx
<ExecutionProcessesProvider key={`${selectedWorkspace?.id}-${selectedSessionId}`}>
<ReviewProvider>
<Allotment>
<Allotment.Pane>{renderSidebar()}</Allotment.Pane> // Inside provider
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
</Allotment>
</ReviewProvider>
</ExecutionProcessesProvider>
```
### After:
```tsx
<Allotment>
<Allotment.Pane>{renderSidebar()}</Allotment.Pane> // OUTSIDE provider - won't remount
<ExecutionProcessesProvider key={`${selectedWorkspace?.id}-${selectedSessionId}`}>
<ReviewProvider>
<>
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
</>
</ReviewProvider>
</ExecutionProcessesProvider>
</Allotment>
```
**Result:** When switching workspaces, the `ExecutionProcessesProvider`'s key changes, which unmounts/remounts only panes 2-4. The sidebar pane stays mounted and won't re-render unnecessarily.
* The implementation is complete. Here's a summary of what was changed:
## Summary
**File modified:** `vibe-kanban/frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`
### Changes:
1. **Created nested Allotments structure:**
- **Outer Allotment** (2 panes): Sidebar + Content container
- **Inner Allotment** (3 panes): Main + Changes/Logs + Git Panel
2. **Separated resize handlers:**
- `handleOuterPaneResize`: Handles sidebar width only
- `handleInnerPaneResize`: Handles main, changes/logs, and git panel widths
3. **Removed old `handlePaneResize`** which was designed for the flat 4-pane structure
### Result:
```
Outer Allotment
├── Sidebar Pane (OUTSIDE providers - won't remount)
└── Content Pane
└── ExecutionProcessesProvider (keyed)
└── ReviewProvider
└── Inner Allotment
├── Main Pane
├── Changes/Logs Pane
└── Git Panel Pane
```
Now when switching workspaces:
- The `ExecutionProcessesProvider` with its key will remount the inner Allotment (ensuring clean state)
- The sidebar stays mounted because it's outside the keyed provider
- Layout looks the same as before (sidebar on left, 3 panes on right)
* Revert "Fix workspace sidebar ordering to use updated_at instead of created_at (Vibe Kanban) (#1965)" (#1974)
This reverts commit 8dc07ee2b2cabc1326f0aad5a8977c66f98b6f75.
* update cursor-agent models (#1977)
* The frontend TypeScript check passed without errors. (#1978)
The implementation is complete. The change removes the Bash-only restriction so that any tool with output (including MCP tools like `mcp:dev-manager:stop`) can now be clicked to view their results in the logs panel.
**Summary of changes:**
- **File:** `vibe-kanban/frontend/src/components/ui-new/NewDisplayConversationEntry.tsx`
- **Change:** Simplified `hasOutput` check in `ToolSummaryEntry` from `isBash && content && content.trim().length > 0` to just `content && content.trim().length > 0`
- **Effect:** MCP tool entries (and any other tool with output) are now clickable to view their JSON results in the logs panel
* Add session-level review endpoint with StartReviewDialog (Vibe Kanban) (#1849)
* All checks pass. Let me provide a summary of what was implemented:
I've implemented the review endpoint as planned. Here's what was created:
1. **`crates/executors/src/actions/review.rs`** - New action type with:
- `RepoReviewContext` struct (repo_id + commit_hashes)
- `ReviewRequest` struct (executor_profile_id, context, additional_prompt, working_dir)
- `Executable` trait impl that calls `executor.spawn_review()`
2. **`crates/server/src/routes/task_attempts/review.rs`** - Endpoint handler with:
- `StartReviewRequest` for the API
- `RepoReviewContext` (endpoint-specific copy)
- `ReviewError::ProcessAlreadyRunning`
- `start_review` handler that:
- Verifies no running processes on workspace
- Creates fresh session
- Builds ReviewRequest action
- Starts execution with `ExecutionProcessRunReason::CodingAgent`
1. **`crates/executors/src/executors/mod.rs`**:
- Added `spawn_review()` to `StandardCodingAgentExecutor` trait with default prompt-based implementation
- Added `build_review_prompt()` helper function
2. **`crates/executors/src/actions/mod.rs`**:
- Added `pub mod review;`
- Added `ReviewRequest` to `ExecutorActionType` enum
- Updated `base_executor()` match
3. **`crates/services/src/services/container.rs`**:
- Updated match in `try_start_next_action` to handle `ReviewRequest`
4. **`crates/server/src/routes/task_attempts.rs`**:
- Added `pub mod review;`
- Added `.route("/review", post(review::start_review))`
5. **`crates/server/src/bin/generate_types.rs`**:
- Added new types to export list
**`POST /task-attempts/{id}/review`**
Request:
```json
{
"executor_profile_id": { "executor": "CLAUDE_CODE", "variant": null },
"context": [{ "repo_id": "uuid", "commit_hashes": ["abc123"] }],
"additional_prompt": "Focus on security issues"
}
```
Response: `ExecutionProcess` on success, `ReviewError` on failure.
To add native review for an executor (e.g., Codex), just override `spawn_review()` in that executor's `StandardCodingAgentExecutor` impl. No changes needed to action or endpoint.
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
All checks pass now. The duplicate type issue is fixed - we're using a single `RepoReviewContext` type from the executors crate.
All checks pass now. Both frontend lint (ESLint) and backend lint (Clippy) are passing.
Found and fixed the real issue. The problem was in `crates/services/src/services/container.rs` - the log normalization was only set up for `CodingAgentInitialRequest` and `CodingAgentFollowUpRequest`. `ReviewRequest` was falling through to the default case and returning `None`, so no normalizer was started for review processes.
Fixed in two places:
1. **Line 787-791**: Added `ReviewRequest` handling in `stream_normalized_logs` (for historic logs)
2. **Line 1149-1151**: Added `ReviewRequest` handling in `start_execution` (for live logs)
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Backend changes for the `use_all_workspace_commits` flag are complete. Here's what was implemented:
Added `use_all_workspace_commits` flag to `StartReviewRequest` for automatically populating review context.
1. **`crates/db/src/models/execution_process_repo_state.rs`**
- Added `find_initial_commits_for_workspace()` - query to get the earliest `before_head_commit` for each repo in a workspace
2. **`crates/server/src/routes/task_attempts/review.rs`**
- Added `use_all_workspace_commits: bool` field to `StartReviewRequest` (defaults to `false`)
- When flag is `true` and `context` is `None`, auto-populates context with initial commits from workspace execution processes
3. **`crates/executors/src/executors/mod.rs`**
- Updated `build_review_prompt()` to detect single-commit context (indicating initial commit)
- When single commit per repo, prompts agent to "Review all changes made since the following base commit(s)" with git diff hint
4. **`crates/services/src/services/git.rs`**
- Added `get_commits_since_branch()` method (may be useful for future use)
5. **`shared/types.ts`**
- Generated TypeScript type includes `use_all_workspace_commits: boolean`
When frontend calls `POST /task-attempts/{id}/review` with:
```json
{
"executor_profile_id": { "executor": "CLAUDE_CODE", "variant": null },
"use_all_workspace_commits": true
}
```
The backend will:
1. Find the earliest execution process for the workspace
2. Get the `before_head_commit` for each repo (the commit before agents started making changes)
3. Pass that to the prompt builder which tells the agent to review all changes since that commit
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Frontend UI implementation is complete. Here's a summary of what was added:
Added simple frontend UI to test the review endpoint.
1. **`frontend/src/lib/api.ts`**
- Added `startReview` method to `attemptsApi`
- Imports `StartReviewRequest`, `ReviewError` types
2. **`frontend/src/hooks/useStartReview.ts`** (NEW)
- Hook that calls `attemptsApi.startReview` with `use_all_workspace_commits: true`
- Invalidates `processes` and `branchStatus` queries on success
3. **`frontend/src/hooks/index.ts`**
- Exports `useStartReview`
4. **`frontend/src/components/ui/actions-dropdown.tsx`**
- Added "Start Review" menu item in the attempt actions section
- Uses the user's default executor profile from config
- Shows loading state while starting review
5. **`frontend/src/i18n/locales/en/tasks.json`**
- Added translation keys: `startReview`, `startingReview`
From the workspace actions dropdown (three dots menu), click "Start Review" to start a code review session using all workspace commits as context.
Done! The fix has been implemented. The review endpoint now uses `Session::find_latest_by_workspace_id` to find an existing session for the workspace, and only creates a new session if none exists. This means review logs will now appear in the same conversation view as other coding agent runs.
**Change summary:**
- Modified `crates/server/src/routes/task_attempts/review.rs` (lines 79-93)
- Instead of always creating a new session, it now checks for an existing session first using `Session::find_latest_by_workspace_id`
- This matches the pattern used by dev server, setup scripts, and other similar endpoints
Done! The fix is now in place. The change adds `ReviewRequest` to the action type filter in `useConversationHistory.ts` so review processes are included in the conversation view, and handles the content extraction appropriately (using `additional_prompt` for reviews instead of `prompt`).
**Change summary:**
- Modified `frontend/src/hooks/useConversationHistory.ts` (lines 226-244)
- Added `ReviewRequest` to the action type filter
- Used conditional to extract content from `additional_prompt` for reviews (with fallback "Review the code changes") vs `prompt` for coding agent requests
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
Done! All fixes are now in place:
1. **`useConversationHistory.ts` - `flattenEntries()`** (line 177-184): Added `ReviewRequest` to the filter so review processes are included in the flattened entries
2. **`useConversationHistory.ts` - `flattenEntriesForEmit()`** (line 226-244): Already fixed earlier - handles `ReviewRequest` and extracts `additional_prompt` for user message content
3. **`ProcessesTab.tsx`** (line 223-228): Added `ReviewRequest` to the ProfileVariantBadge conditional so the agent badge shows for review processes
* Done. Changes made:
1. **`crates/executors/src/actions/review.rs`**: Added `prompt: String` field to `ReviewRequest`
2. **`crates/server/src/routes/task_attempts/review.rs`**:
- Import `build_review_prompt`
- Build the full prompt from context and additional_prompt before creating the action
3. **`frontend/src/hooks/useConversationHistory.ts`**: Simplified content extraction to just use `actionType.prompt` for all action types (since `ReviewRequest` now has a prompt field too)
4. **Regenerated TypeScript types** - `ReviewRequest` in `shared/types.ts` now includes the `prompt` field
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Done. Here's a summary of the changes:
**Backend:**
1. **`crates/executors/src/actions/review.rs`**:
- Added `CommitRange` enum with three variants: `FromBase`, `Specific`, and `Range`
- Updated `RepoReviewContext` to use `repo_name: String` and `commits: CommitRange` instead of `commit_hashes`
2. **`crates/executors/src/executors/mod.rs`**:
- Updated `build_review_prompt` to format output with repo names and handle all `CommitRange` variants
3. **`crates/server/src/routes/task_attempts/review.rs`**:
- Simplified `StartReviewRequest` (removed `context` field, kept `use_all_workspace_commits`)
- Updated handler to look up repo names via `Repo::find_by_ids` and use `CommitRange::FromBase`
4. **`crates/server/src/bin/generate_types.rs`**: Added `CommitRange` to exported types
**Frontend:**
- **`frontend/src/hooks/useStartReview.ts`**: Removed `context: null` since that field no longer exists
The prompt will now look like:
```
Please review the code changes.
Repository: vibe-kanban
Review all changes from base commit abc123 to HEAD.
Use `git diff abc123..HEAD` to see the changes.
```
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Codex review support (vibe-kanban e7996a18)
## Context
We've added a review endpoint (\`POST /task-attempts/{id}/review\`) that starts a code review session. Currently it uses a default prompt-based implementation via \`spawn\_review()\` on \`StandardCodingAgentExecutor\`, which builds a prompt and delegates to \`spawn()\`.
## Goal
Implement native Codex review support by overriding \`spawn\_review()\` in the Codex executor to use Codex's native review mechanism instead of the prompt-based approach.
## Current Implementation
### Backend Types
\*\*\`CommitRange\` enum\*\* (\`crates/executors/src/actions/review.rs\`):
\`\`\`rust
pub enum CommitRange {
FromBase { commit: String },
Specific { commits: Vec<String> },
Range { from: String, to: String },
}
\`\`\`
\*\*\`RepoReviewContext\`\*\*:
\`\`\`rust
pub struct RepoReviewContext {
pub repo\_id: Uuid,
pub repo\_name: String,
pub commits: CommitRange,
}
\`\`\`
### Trait Method
\*\*\`spawn\_review()\`\*\* in \`StandardCodingAgentExecutor\` trait (\`crates/executors/src/executors/mod.rs\`):
\`\`\`rust
async fn spawn\_review(
&self,
current\_dir: &Path,
context: Option<&[RepoReviewContext]>,
additional\_prompt: Option<&str>,
env: &ExecutionEnv,
) -> Result<SpawnedChild, ExecutorError> {
// Default: build prompt and delegate to spawn()
let prompt = build\_review\_prompt(context, additional\_prompt);
self.spawn(current\_dir, &prompt, env).await
}
\`\`\`
## Tasks
1. Research Codex's native review API/mechanism (if it has one)
2. Override \`spawn\_review()\` in \`CodexExecutor\` to use native review if available
3. Fall back to prompt-based approach if native review isn't supported
* Done. Here's a summary of the changes:
1. **Removed dead code** from `crates/executors/src/executors/codex/review.rs`:
- Deleted the `map_to_review_target()` function (was ~120 lines)
- Removed unused imports (`CommitRange`, `RepoReviewContext`)
2. **Codex now uses `ReviewTarget::Custom`** with the pre-built prompt, which ensures the displayed prompt matches what Codex actually receives.
The build passes and TypeScript types have been regenerated.
* Use custom review target for codex
* Done. Here's a summary of the changes:
## Summary
Moved the review endpoint from workspace-level to session-level:
### Changes
1. **Created `crates/server/src/routes/sessions/review.rs`**
- New review endpoint at `POST /sessions/{id}/review`
- Takes `Extension<Session>` instead of `Extension<Workspace>`
- Looks up `agent_session_id` from previous executions using `find_latest_coding_agent_turn_session_id()`
- Passes `agent_session_id` to `ReviewAction` for session resumption
2. **Updated `crates/server/src/routes/sessions/mod.rs`**
- Added `pub mod review;`
- Added route `.route("/review", post(review::start_review))`
3. **Updated `crates/server/src/routes/task_attempts.rs`**
- Removed `pub mod review;`
- Removed `.route("/review", post(review::start_review))`
4. **Deleted `crates/server/src/routes/task_attempts/review.rs`**
5. **Updated `crates/server/src/bin/generate_types.rs`**
- Changed path from `task_attempts::review` to `sessions::review`
### API Change
- **Old**: `POST /api/task-attempts/{workspace_id}/review`
- **New**: `POST /api/sessions/{session_id}/review`
This ensures vk sessions and agent sessions are 1:1:
- Existing session → resumes agent session if available
- New session → fresh agent session
* Done! Here's a summary of all the frontend changes:
- Added `startReview` to `sessionsApi` using new endpoint `POST /api/sessions/${sessionId}/review`
- Removed `startReview` from `attemptsApi`
- Changed parameter from `attemptId` to `sessionId` and added optional `workspaceId` for query invalidation
- Changed API call from `attemptsApi.startReview` to `sessionsApi.startReview`
- Added `MagnifyingGlassIcon` import
- Added `onStartReview` and `isReviewStarting` to `SessionProps` interface
- Added "Start Review" menu item in the session dropdown
- Added `useStartReview` hook import and usage
- Added `handleStartReview` callback function
- Passed `onStartReview` and `isReviewStarting` to `SessionChatBox`
- Removed `useStartReview` import
- Removed `useUserSystem` import (now unused)
- Removed `startReview` hook usage
- Removed `handleStartReview` function
- Removed "Start Review" menu item from the dropdown
* Done. The fix adds the `ReviewRequest` case to `latest_executor_profile_for_session()` in `crates/db/src/models/execution_process.rs:688-690`.
The backend check passes. Follow-ups after reviews should now work correctly since the executor profile can be extracted from `ReviewRequest` just like from the other request types.
* Done. Removed `CommitRange` enum entirely. Changes:
1. **`crates/executors/src/actions/review.rs`** - Deleted `CommitRange` enum, changed `RepoReviewContext.commits` to `RepoReviewContext.base_commit: String`
2. **`crates/server/src/routes/sessions/review.rs`** - Updated construction to use `base_commit: initial_commit` instead of `commits: CommitRange::FromBase { commit: initial_commit }`
3. **`crates/executors/src/executors/mod.rs`** - Simplified `build_review_prompt()` to directly use `repo.base_commit` instead of matching on the enum
4. **`crates/server/src/bin/generate_types.rs`** - Removed `CommitRange::decl()` from type exports
5. **`shared/types.ts`** - Regenerated, `CommitRange` type is now gone
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Done. Simplified the review context building:
**Changes:**
1. **`crates/db/src/models/execution_process_repo_state.rs`** - Replaced `find_initial_commits_for_workspace` with `find_initial_commit_for_repo` that takes a specific repo_id and uses ORDER BY + LIMIT 1 instead of GROUP BY/HAVING.
2. **`crates/server/src/routes/sessions/review.rs`** - Simplified the context building:
- Get workspace repos first (has repo names via `display_name`)
- For each repo, get initial commit
- Build context directly - no more HashMap joining, no more separate `Repo::find_by_ids` call
The new code is much easier to follow: get repos → for each, get initial commit → build context.
* Done. Addressed all 23 review comments:
1. Removed comment from `SessionChatBoxContainer.tsx` (line 161)
2. Removed doc comments from `RepoReviewContext` and `ReviewRequest` structs in `review.rs`
3. Removed module doc comment from `codex/review.rs`
4. Removed comment from `codex.rs` about Custom review target
5. Removed doc comments from `spawn_review` trait method in `mod.rs`
6. Removed doc comment from `build_review_prompt` function
7. Removed all comments from `sessions/review.rs` (doc comments and inline comments)
8. Removed unused `get_commits_since_branch` function from `git.rs` (~45 lines of dead code)
* Done. Added the review toggle button:
**Changes:**
1. **`SessionChatBox.tsx`**
- Added `ReviewModeProps` interface with `isActive`, `onToggle`, `isSubmitting`
- Added `reviewMode` prop to `SessionChatBoxProps`
- Added toggle button next to attach button (MagnifyingGlassIcon) - highlighted when active
- Updated placeholder to show "Enter review instructions..." when in review mode
- Removed old `onStartReview` and `isReviewStarting` from SessionProps
- Removed "Start Review" dropdown menu item
2. **`SessionChatBoxContainer.tsx`**
- Added `useState` for `isReviewMode`
- Updated `handleSend` to call `startReviewMutation` with `additionalPrompt` when in review mode
- Reset review mode after successful review start
- Pass `reviewMode` props to SessionChatBox
- Removed old `handleStartReview` callback
Now the user can:
1. Click the magnifying glass toggle next to attach
2. Enter review instructions in the text area
3. Click send → starts review with the prompt
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
TypeScript and Rust both compile. The changes are:
1. Button shows "Review" when review mode is active
2. Toggle icon uses `!text-accent-foreground` to force override the `text-low` class from the base component, along with `bg-accent rounded-sm` for the background highlight
Done. Changed `!text-accent-foreground` to `!text-normal` which uses the design system's proper text color for active/selected states. The `!` prefix forces the override of the base `text-low` class. Both TypeScript and Rust compile successfully.
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
All done. TypeScript and Rust compile successfully. Here's a summary of the changes:
**Created:**
- `frontend/src/components/dialogs/tasks/StartReviewDialog.tsx` - New dialog with:
- Agent/variant selection (using ExecutorProfileSelector)
- Review comments preview (if any)
- Additional instructions textarea
- Start Review / Cancel buttons
**Modified:**
- `frontend/src/components/dialogs/index.ts` - Added export for StartReviewDialog
- `frontend/src/components/ui-new/primitives/SessionChatBox.tsx`:
- Changed `ReviewModeProps` from toggle state to simple callback (`onReviewClick`, `isDisabled`)
- Removed toggle styling and review mode button text
- Button now just opens the dialog
- `frontend/src/components/ui-new/containers/SessionChatBoxContainer.tsx`:
- Removed `isReviewMode` state and `startReviewMutation`
- Added `handleReviewClick` callback that opens `StartReviewDialog`
- Disabled review button when in new session mode or no session exists
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
Done. TypeScript and Rust compile successfully. Summary of changes:
**`StartReviewDialog.tsx`:**
- Added "New Session" toggle (defaults ON when no session exists, disabled when no session to toggle from)
- Added conditional `AgentSelector` - only shown when creating a new session
- Always shows `ConfigSelector` for variant selection
- Handles session creation inline when toggle is on or no session exists
- Updated `onSuccess` callback to return new session ID when created
**`SessionChatBox.tsx`:**
- Removed `isDisabled` from `ReviewModeProps` interface
- Removed `reviewMode.isDisabled` from button disabled logic
**`SessionChatBoxContainer.tsx`:**
- Updated `handleReviewClick` to allow opening dialog without sessionId
- Updated `onSuccess` callback to select the new session if one was created
- Removed `isDisabled` from reviewMode prop
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
Done. Made `reviewMode` re…
mxyhi
added a commit
to mxyhi/vibe-kanban
that referenced
this pull request
Jan 18, 2026
* Add QA mode for automated testing with mock executor and hardcoded repos (Vibe Kanban) (#1940)
* The QA mode implementation is complete. Here's a summary of what was implemented:
## Summary
I've successfully implemented the QA mode feature for the vibe-kanban application. Here's what was created/modified:
### New Files
1. **`crates/services/src/services/qa_repos.rs`** - QA repos module that:
- Defines two hardcoded QA repo URLs (`internal-qa-1` and `internal-qa-2`)
- Clones repos to a persistent temp directory on first access using `git2`
- Returns `DirectoryEntry` compatible with existing API
2. **`crates/executors/src/executors/qa_mock.rs`** - Mock executor that:
- Implements `StandardCodingAgentExecutor` trait
- Performs random file operations (create, delete, modify)
- Streams 10 mock log entries in ClaudeJson format over 10 seconds
- Reuses Claude's log processor for normalization
### Modified Files
1. **Cargo.toml files** - Added `qa-mode` feature flags to:
- `crates/executors/Cargo.toml`
- `crates/services/Cargo.toml`
- `crates/server/Cargo.toml`
2. **`crates/executors/src/executors/mod.rs`** - Added:
- Conditional `qa_mock` module export
- `QaMock` variant to `CodingAgent` enum
- Updated `capabilities()` match arm
3. **`crates/executors/src/mcp_config.rs`** - Added `QaMock` handling
4. **`crates/services/src/services/filesystem.rs`** - Override `list_git_repos` and `list_common_git_repos` in QA mode
5. **`crates/services/src/services/container.rs`** - Override `normalize_logs` executor lookup in QA mode
6. **`crates/executors/src/actions/coding_agent_initial.rs`** - Override spawn in QA mode
7. **`crates/executors/src/actions/coding_agent_follow_up.rs`** - Override spawn in QA mode
8. **`vibe-kanban/package.json`** - Added QA build scripts:
- `backend:dev:qa`
- `backend:dev:watch:qa`
- `dev:qa`
### Usage
```bash
# Run backend in QA mode
cargo run --features qa-mode
# Or with pnpm
pnpm run dev:qa
```
When QA mode is enabled:
- `GitPanelCreate` will show only `internal-qa-1` and `internal-qa-2` as recent repos
- Starting any task will perform mock file operations and stream 10 logs over 10 seconds
- Logs follow the ClaudeJson format for compatibility with the existing log processor
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* The TLS error fix is complete. I've replaced the `git2::Repository::clone` call with the `git` CLI approach in `qa_repos.rs`:
**Changes made:**
- Updated `clone_qa_repos_if_needed` function to use `Command::new("git")` with `["clone", "--depth", "1", url, path]` arguments instead of `git2::Repository::clone`
- Added `--depth 1` for shallow cloning (faster)
- Updated error handling to capture stderr output from the git command
The fix uses the git CLI which has reliable TLS support, avoiding the TLS configuration issues that git2 can have on some systems. This matches patterns used elsewhere in the codebase (e.g., `crates/remote/src/github_app/service.rs`).
You can now run `pnpm run backend:dev:qa` or `pnpm run dev:qa` and the QA repos should clone successfully.
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* Done! I've made the mock logs strongly typed by:
1. **Added imports** for `ClaudeJson`, `ClaudeMessage`, `ClaudeContentItem`, and `ClaudeToolData` from the Claude executor
2. **Replaced `generate_mock_logs()`** to use strongly-typed structs:
- Each log entry is now a proper `ClaudeJson` enum variant
- Uses `ClaudeMessage` with proper fields (`id`, `message_type`, `role`, `model`, `content`, `stop_reason`)
- Uses `ClaudeContentItem` variants (`Thinking`, `ToolUse`, `ToolResult`, `Text`)
- Uses `ClaudeToolData` variants (`Read`, `Write`, `Bash`)
- Serializes to JSON using `serde_json::to_string()` for correct escaping
3. **Updated tests** to verify the logs deserialize back to `ClaudeJson` types
This ensures:
- All fields match what `ClaudeLogProcessor::process_logs()` expects
- No manual JSON escaping needed (serde handles it)
- Compile-time type checking prevents malformed logs
- Session IDs are consistent across all entries
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* Done! I've fixed the log display issue by replacing the shell echo approach with a temp file approach:
**Changes made to `crates/executors/src/executors/qa_mock.rs`:**
1. **Write logs to a temp file** instead of embedding them in a shell script:
- Creates a temp file at `$TMPDIR/qa_mock_logs_{uuid}.jsonl`
- Writes all logs as newline-delimited JSON
2. **Use `IFS= read -r` to read the file** - this preserves exact content:
- `IFS=` prevents word splitting
- `-r` prevents backslash interpretation
- `echo "$line"` outputs the exact line content
3. **Clean up the temp file** after reading with `rm -f`
**Benefits:**
- No shell escaping needed - file contents are read verbatim
- Each line is output exactly as serialized by serde_json
- Avoids issues with single quotes, backslashes, and escape sequences
- Temp file is automatically cleaned up after use
This should fix the issue where logs were appearing as raw JSON or with corrupted content due to shell escaping issues.
* fix formatting
* Build succeeds. I've applied the same fix to the two remaining locations that had newlines in their content:
1. **Line 234** - README tool result: Changed `\n\n` to `\\n\\n`
2. **Line 302** - Bash tool result: Changed `\n` to `\\n`
This matches the pattern the user established in the assistant final message (line 318) where `\\n` is used instead of `\n` to ensure newlines are properly preserved through the serialization and display pipeline.
* Cleanup script changes for workspace 15499061-ec87-4c1c-81b9-994e84d0e75b
* simplify scripts
* update agents.md
* fix: update font-feature-settings in diff-style-overrides.css (#1827)
* fix: update font-feature-settings in diff-style-overrides.css
Changed the font-feature-settings property for the diff-tailwindcss-wrapper to disable ligatures by setting it to "liga" off, ensuring consistent text rendering across different components.
* chore: run formatter
---------
Co-authored-by: Pedro <>
* feat: remove `agent_working_dir` from settings (#1874)
* remove configurable agent_working_dir
(cherry picked from commit 285b3e04abceeb8e4a4ee1be16e3de97a8f32299)
* calculate agent_working_dir on create and start task
* i18n
* Fix gh CLI compatibility for older versions missing baseRefOid field
**Changes:**
1. Added `GhApiPr` and `GhApiRef` structs (lines 31-46) to deserialize the GitHub REST API response
2. Added `get_pr_info_via_api()` function (lines 103-141) as a fallback that uses `gh api repos/{owner}/{repo}/pulls/{number}`
3. Modified `get_pr_info()` (lines 166-170) to detect "unknown json field" errors and fall back to the API method
**How it works:**
- Modern `gh` CLI versions continue to use the faster `gh pr view --json` approach
- When an older `gh` CLI returns "Unknown JSON field: baseRefOid", the code catches this error and falls back to `gh api` which uses the stable REST API
- The REST API fields (`base.sha`, `head.sha`, `head.ref`) have been stable for years and work with all `gh` CLI versions
* Make local build script work across more platforms (#1681)
* Enhance local build script and frontend package configuration
- Updated `local-build.sh` to detect OS and architecture, setting the target directory dynamically based on the platform.
- Modified build and lint scripts in `frontend/package.json` to include `NODE_OPTIONS=--max-old-space-size=4096` for improved memory management during builds and linting.
* Enhance local build script and frontend package configuration
- Updated `local-build.sh` to detect OS and architecture, setting the target directory dynamically based on the platform.
- Modified build and lint scripts in `frontend/package.json` to include `NODE_OPTIONS=--max-old-space-size=4096` for improved memory management during builds and linting.
* Solve task follow up section infinite loop (#1955)
**Root cause:** The `switch` statement was missing a `default` case. When `typ.type` didn't match any handled case, the loop continued forever because `curr` was never updated.
**Changes made:**
1. **`vibe-kanban/frontend/src/utils/executor.ts`** (line 59-60): Added `default:` to fall through with `ScriptRequest`, advancing to the next action for any unhandled types.
2. **`vibe-kanban/frontend/src/components/tasks/TaskFollowUpSection.tsx`**:
- Removed duplicate local `extractProfile` function (17 lines)
- Added import from `@/utils/executor`
- Updated usage to `extractProfileFromAction`
3. **`vibe-kanban/frontend/src/components/NormalizedConversation/RetryEditorInline.tsx`**:
- Removed duplicate local `extractProfile` function (17 lines)
- Added import from `@/utils/executor`
- Updated usage to `extractProfileFromAction`
Both type checks (TypeScript and Rust/cargo) pass successfully.
* Add accelerated 1-hour cleanup for archived workspaces or inactive tasks (Vibe Kanban) (#1952)
* The implementation is complete. Here's a summary of the changes:
## Summary
Modified `crates/db/src/models/workspace.rs` in the `find_expired_for_cleanup()` function:
1. **Added task join** - `JOIN tasks t ON w.task_id = t.id` to access the task's status
2. **Conditional expiration threshold** in the `HAVING` clause:
- **1 hour** if workspace is archived AND task status is NOT `inprogress` or `inreview`
- **72 hours** otherwise (preserves existing behavior)
```sql
HAVING datetime('now',
CASE
WHEN w.archived = 1 AND t.status NOT IN ('inprogress', 'inreview')
THEN '-1 hours'
ELSE '-72 hours'
END
) > datetime(...)
```
This means archived workspaces for completed/cancelled/todo tasks will be cleaned up much faster (1 hour vs 72 hours), while active work remains protected.
* Done! I've:
1. **Fixed the condition** from `AND` to `OR` in `crates/db/src/models/workspace.rs:350`
2. **Updated the doc comment** to reflect the correct logic
3. **Regenerated the SQLx cache** with `pnpm run prepare-db`
4. **Updated the PR** with the corrected title and description
The accelerated cleanup now triggers when:
- The workspace is archived (regardless of task status), **OR**
- The task is not actively being worked on (todo/done/cancelled)
* Fix comparison between EP and Workspace during cleanup (#1959)
* Increase max height of chat box (#1957)
I've successfully implemented the change to allow the `ChatBoxBase.tsx` to expand vertically up to 50% of the window height.
**Change made in** `vibe-kanban/frontend/src/components/ui-new/primitives/ChatBoxBase.tsx:144`:
```tsx
// Before:
className="min-h-0 max-h-[min(15rem,20vh)] overflow-y-auto"
// After:
className="min-h-0 max-h-[50vh] overflow-y-auto"
```
**What this does:**
- The old constraint `max-h-[min(15rem,20vh)]` limited the editor to whichever was smaller: 15rem or 20% of viewport height
- The new constraint `max-h-[50vh]` allows the editor to grow up to 50% of the viewport height
- The editor still starts small and only expands as content is added (due to `min-h-0`)
- `overflow-y-auto` ensures scrolling when content exceeds the max height
**Verification:**
- ✅ TypeScript check passes (`pnpm run check`)
- ✅ ESLint passes (`pnpm run lint`)
- The dev server was started and the change was tested in the browser (though the browser MCP encountered an issue during extended testing)
* Done. I've updated the agent install hints across all 6 locales: (#1960)
**Changes made:**
- `notFound`: Changed from "Not Found" → "Unknown" (and equivalent in other languages)
- `notFoundTooltip`: Changed from "No previous usage detected. Agent may require installation and/or login." → "We couldn't verify this agent is set up, but go ahead and try it."
**Files modified:**
- `frontend/src/i18n/locales/en/settings.json`
- `frontend/src/i18n/locales/es/settings.json`
- `frontend/src/i18n/locales/ja/settings.json`
- `frontend/src/i18n/locales/ko/settings.json`
- `frontend/src/i18n/locales/zh-Hans/settings.json`
- `frontend/src/i18n/locales/zh-Hant/settings.json`
The new wording is softer and encourages users to just try the agent rather than assuming it's not installed.
* Fix QA mode lint warnings with conditional compilation attributes (Vibe Kanban) (#1958)
* All lint checks pass. Here's a summary of the fixes I made:
**Fixed files:**
1. **`crates/executors/src/actions/coding_agent_follow_up.rs`**:
- Made `ExecutorConfigs` import conditional with `#[cfg(not(feature = "qa-mode"))]`
- Added `let _ = &approvals;` in qa-mode block to silence unused variable warning
2. **`crates/executors/src/actions/coding_agent_initial.rs`**:
- Same fixes as above
3. **`crates/executors/src/executors/qa_mock.rs`**:
- Changed `std::io::Error::new(std::io::ErrorKind::Other, e)` to `std::io::Error::other(e)` (clippy `io_other_error` lint)
4. **`crates/services/src/services/container.rs`**:
- Made `ExecutorConfigs` import conditional with `#[cfg(not(feature = "qa-mode"))]`
- Renamed `executor_profile_id` to `_executor_profile_id` to indicate it's conditionally used
5. **`crates/services/src/services/filesystem.rs`**:
- Made imports conditional: `HashSet`, `WalkBuilder`, and `CancellationToken` are only needed in non-qa-mode
- Added `#[cfg(not(feature = "qa-mode"))]` to helper functions: `get_directories_to_skip`, `list_git_repos_with_timeout`, `list_git_repos_inner`
- Renamed parameters to `_path`, `_timeout_ms`, `_hard_timeout_ms`, `_max_depth` since they're not used in qa-mode
- Removed needless `return` statements in qa-mode blocks
6. **`crates/services/src/services/qa_repos.rs`**:
- Changed `&PathBuf` to `&std::path::Path` in function parameter (clippy `ptr_arg` lint)
* Cleanup script changes for workspace 6fcb2b78-f418-451f-9a22-8d4381a538f0
* All lint checks pass. The fix now uses `#[cfg_attr(feature = "qa-mode", allow(unused_variables))]` which cleanly communicates that the variables are intentionally unused only in qa-mode, while keeping the normal parameter names.
* All lint checks pass. Fixed by using `#[cfg_attr(feature = "qa-mode", allow(unused_variables))]` and keeping the proper variable name `executor_profile_id` (which is used in non-qa-mode).
* All lint checks pass. The changes are now cleaner - using `#[cfg_attr(feature = "qa-mode", allow(unused_variables))]` on the function instead of `let _ = &approvals;` inside the qa-mode block.
To summarize the cleanup: I replaced the inline `let _ = &approvals;` workaround in `coding_agent_initial.rs` and `coding_agent_follow_up.rs` with the cleaner `#[cfg_attr]` attribute on the function, which is consistent with how we handled it in `filesystem.rs` and `container.rs`.
* I've made both changes: (#1962)
1. **Moved the Dev Server Script input** to be the first field in the Scripts & Configuration section (in `ReposSettings.tsx`)
2. **Updated the section description** in the English locale to mention "dev server" scripts: the description now reads "Configure dev server, setup, cleanup, and copy files for this repository..."
* feat(notifications): include task name in approval needed notification (#1879)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <[email protected]>
* Add Push button to Git panel when PR is open with unpushed commits (Vibe Kanban) (#1951)
* The implementation is complete. Here's a summary of what I changed:
## Summary
Added a "Push" button to the workspaces UI Git panel. The changes allow users to push changes when a PR is already open.
### Files Modified:
1. **`frontend/src/components/ui-new/primitives/RepoCard.tsx`** (lines 27-42)
- Added `'push'` to the `RepoAction` type union
- Added a new option to `repoActionOptions` array with the Push button configuration using `ArrowUpIcon`
2. **`frontend/src/components/ui-new/actions/index.ts`** (lines 33, 691-707)
- Imported `ArrowUpIcon` from phosphor-icons
- Added `GitPush` action definition that:
- Calls `attemptsApi.push()` with the workspace and repo IDs
- Handles the `force_push_required` error case
- Invalidates workspace queries on success to refresh the UI
3. **`frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`** (line 103)
- Added mapping from `'push'` action to `Actions.GitPush` in the action handler
The Push button now appears in the Git panel dropdown alongside "Open pull request" and "Merge" options.
* The type check passes. Here's a summary of the updated changes:
## Summary
The Push button now appears **next to the PR number** when:
1. A PR is already open (`prStatus === 'open'`)
2. There are new commits ahead (`commitsAhead > 0`)
### Changes Made:
**`frontend/src/components/ui-new/primitives/RepoCard.tsx`**:
- Removed `push` from the `repoActionOptions` dropdown (lines 34-41)
- Added a dedicated Push button in the PR status row (lines 213-222) that:
- Only appears when `prStatus === 'open'` AND `commitsAhead > 0`
- Uses brand primary styling (`bg-brand-primary`) to make it prominent
- Displays with an up arrow icon and "Push" label using existing translation
- Calls `onActionsClick?.('push')` when clicked
The `GitPush` action and handler mapping from the previous changes remain in place to handle the push operation.
* Done. The Push button now uses the same styling as the "Open PR" button: `bg-panel text-normal hover:bg-tertiary`.
* The type check passes. Here's a summary of the fix:
## Summary
The Push button now correctly uses `remoteCommitsAhead` (unpushed commits to remote) instead of `commitsAhead` (total commits ahead of target branch) to determine when to show.
### Changes Made:
1. **`frontend/src/components/ui-new/views/GitPanel.tsx`**:
- Added `remoteCommitsAhead: number` to the `RepoInfo` interface
- Pass `remoteCommitsAhead` to `RepoCard`
2. **`frontend/src/components/ui-new/primitives/RepoCard.tsx`**:
- Added `remoteCommitsAhead?: number` to `RepoCardProps`
- Changed the push button condition from `commitsAhead > 0` to `remoteCommitsAhead > 0`
3. **`frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`**:
- Added `remoteCommitsAhead: repoStatus?.remote_commits_ahead ?? 0` to the `repoInfos` mapping
Now the Push button will:
- Only appear when there's an open PR AND there are unpushed commits (`remote_commits_ahead > 0`)
- Disappear after a successful push (when `remote_commits_ahead` becomes 0)
- Reappear when new commits are made locally that haven't been pushed
* The type check passes. Here's a summary of the changes:
## Summary
The Push button now hides immediately when clicked and only reappears when new commits are available:
### Changes to `RepoCard.tsx`:
- Added `useState` and `useRef` imports
- Added `isPushHidden` state to track when the button should be hidden
- Added `lastRemoteCommitsAhead` ref to track the previous value
- Added `useEffect` that resets `isPushHidden` to `false` when `remoteCommitsAhead` increases (meaning new commits are available)
- Added `handlePushClick` function that hides the button immediately and triggers the push action
- Updated the button condition to include `!isPushHidden`
The button will:
1. Hide immediately when clicked (no double-clicking possible)
2. Stay hidden until `remoteCommitsAhead` increases above the last known value
3. Reappear when new local commits are made that need to be pushed
* Both the linter and type check pass. The linter errors are fixed. Here's a summary of the changes:
## Summary of Linter Fixes
The linter was flagging that `RepoCard` (a presentational component) should not manage state or have side effects. I refactored the code to lift the state up to the container component:
### Changes:
1. **`RepoCard.tsx`** - Made purely presentational:
- Removed `useState`, `useRef`, `useEffect` imports
- Removed `remoteCommitsAhead` prop
- Added `showPushButton` prop (boolean, controlled by parent)
- Added `onPushClick` callback prop
- The button now just renders based on `showPushButton` and calls `onPushClick`
2. **`GitPanel.tsx`** - Updated interface and props:
- `RepoInfo` now has optional `remoteCommitsAhead` and `showPushButton` fields
- Added `onPushClick` callback to `GitPanelProps`
- Passes `showPushButton` and `onPushClick` to `RepoCard`
3. **`WorkspacesLayout.tsx`** - State management moved here:
- Added `hiddenPushRepos` state (Set of repo IDs where push was clicked)
- Added `lastRemoteCommitsAhead` ref to track previous values
- Added `useEffect` to reset hidden state when `remoteCommitsAhead` increases
- Added `repoInfosWithPushButton` memo that computes `showPushButton` for each repo
- Added `handlePushClick` that hides button immediately and executes push action
* prettier fix
* Done. I've added `GitPush` to the Git actions list in the command bar. It now appears between "Merge" and "Rebase" in the Git Actions menu.
* Both type check and lint pass.
Done! The Push action in the command bar now has the same visibility conditions as in the Git panel - it only appears when:
1. There's a workspace
2. There are git repos
3. There's an open PR (`hasOpenPR`)
4. There are unpushed commits (`hasUnpushedCommits`)
### Summary of changes:
1. **`frontend/src/components/ui-new/actions/index.ts`**:
- Added `hasOpenPR` and `hasUnpushedCommits` to `ActionVisibilityContext`
- Updated `GitPush.isVisible` to check these new context properties
2. **`frontend/src/components/ui-new/actions/useActionVisibility.ts`**:
- Added `useBranchStatus` hook to get branch status data
- Computed `hasOpenPR` by checking if any repo has an open PR in merges
- Computed `hasUnpushedCommits` by checking if any repo has `remote_commits_ahead > 0`
- Added these values to the returned context
* The refactoring is complete. Here's a summary of the changes:
## Summary of Changes
The push button logic has been simplified by using React Query's mutation state instead of manually tracking hidden state with refs and effects.
### Key Changes:
1. **WorkspacesLayout.tsx (`GitPanelContainer`)**:
- Removed the complex `useEffect` that tracked `lastRemoteCommitsAhead` and managed `hiddenPushRepos` state
- Removed `hiddenPushRepos` state and `lastRemoteCommitsAhead` ref
- Added `usePush` hook with callbacks that:
- On success: awaits query invalidation before clearing the loading state
- On error: clears the loading state
- Added simple `pushingRepoId` state to track which repo is being pushed
- The button now shows loading state during push and automatically disappears after refetch if `remoteCommitsAhead` becomes 0
2. **GitPanel.tsx**:
- Added `isPushPending?: boolean` to `RepoInfo` interface
- Passes `isPushPending` to `RepoCard`
3. **RepoCard.tsx**:
- Added `isPushPending` prop
- Button shows while either `showPushButton` or `isPushPending` is true
- Button is disabled and shows spinner with "Pushing..." text when pending
- Uses existing translation key `git.states.pushing`
### How it works now:
1. User clicks push button
2. Button immediately shows loading state (spinner + "Pushing...")
3. Button is disabled to prevent multiple clicks
4. Push mutation runs
5. On success, query invalidation completes before clearing loading state
6. Once `branchStatus` refetches, if `remoteCommitsAhead` is 0, `showPushButton` becomes false and button disappears
7. On error, loading state clears and button returns to normal
This approach is simpler and more predictable than manually tracking previous values.
* Done. The push button now shows success feedback like the old UI:
## Summary of Changes
The push button now has three states:
1. **Normal**: Shows "Push" with an up arrow icon
2. **Pending**: Shows "Pushing..." with a spinning icon, button is disabled
3. **Success**: Shows "Pushed!" with a green checkmark icon and green background for 2 seconds
The flow is:
1. User clicks "Push"
2. Button immediately shows "Pushing..." with spinner
3. Push completes, queries are invalidated and refetched
4. Button shows green "Pushed!" for 2 seconds
5. Button disappears (if no more commits to push) or returns to normal state
* All code review issues have been addressed:
## Summary of Changes
1. **Unified push logic** - Now uses `executeAction(Actions.GitPush, ...)` instead of calling `usePush` hook directly. This ensures consistent error handling between the button and command bar.
2. **Proper setTimeout cleanup** - Added `successTimeoutRef` with a cleanup effect that clears the timeout when the component unmounts:
```typescript
const successTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
useEffect(() => {
return () => {
if (successTimeoutRef.current) {
clearTimeout(successTimeoutRef.current);
}
};
}, []);
```
3. **Error feedback** - Added error state handling:
- New `isPushError` prop flows through GitPanel to RepoCard
- Button shows red "Failed" with warning icon when push fails
- Error state clears after 3 seconds
- Added `git.states.pushFailed` translation key
4. **Simplified state management** - Changed from separate `pushingRepoId` and `pushSuccessRepoId` to a single `pushStates` record with `PushState` type (`'idle' | 'pending' | 'success' | 'error'`)
* All i18n checks pass now.
* Both code review issues have been addressed:
## Summary of Changes
### 1. Fixed stale closure issue
- Added a `pushStatesRef` that mirrors the `pushStates` state
- Changed the check from `pushStates[repoId]` to `pushStatesRef.current[repoId]`
- Removed `pushStates` from the dependency array
### 2. Added proper error logging and user-facing error message
- Modified `ActionsContext.tsx` to re-throw errors after showing the dialog, so callers can handle them
- Added `console.error('Push failed:', error)` for debugging purposes
- The error dialog is already shown by `executeAction` via `ConfirmDialog`
- The button now properly shows the error state when push fails
* fmt
* The fix is in place. The key change is:
- When we're in a "push flow" (state is `pending`, `success`, or `error`), we set `showPushButton: false` but the button remains visible because of the `isPushPending || isPushSuccess || isPushError` condition in RepoCard
- This prevents the race condition where the query refetch could hide the button before we set the success state
* All checks pass. The changes now:
1. **Reverted ActionsContext** - Removed the re-throw to maintain backwards compatibility
2. **Use `usePush` hook directly** - For proper success/error detection instead of going through `executeAction`
3. **Show error dialog manually** - Using `ConfirmDialog.show()` when push fails
4. **Track current repo with ref** - `currentPushRepoRef` tracks which repo is being pushed so callbacks can update the correct state
* All checks pass. Here's a summary of the force push handling:
## Force Push Functionality
Yes, force push is fully supported. Here's how it works:
**Old UI (`useGitOperations.ts`):**
1. When `usePush` fails with `errorData.type === 'force_push_required'`
2. It automatically shows `ForcePushDialog`
3. The dialog warns the user about the consequences and lets them confirm
4. If confirmed, it calls `useForcePush` to execute the force push
**New UI (now updated):**
1. When the push button is clicked and fails with `force_push_required`
2. The push state is reset to `idle` (so the button returns to normal)
3. `ForcePushDialog` is shown with the attemptId and repoId
4. User can confirm or cancel the force push from the dialog
The `ForcePushDialog` handles its own loading state, success/error feedback, and API call internally via `useForcePush` hook.
* clear pushStates on workspace change
Co-authored-by: Copilot <[email protected]>
---------
Co-authored-by: Copilot <[email protected]>
* Fix workspace sidebar ordering to use updated_at instead of created_at (Vibe Kanban) (#1965)
* Done. I've updated the workspace sorting in `frontend/src/components/ui-new/hooks/useWorkspaces.ts` to use `updated_at` instead of `created_at`. Both active and archived workspaces will now be sorted by their most recent update time (with pinned workspaces still appearing first). All type checks and lint pass.
* Cleanup script changes for workspace 37e99d73-8ab0-4501-990e-1007d78e44aa
* Fix search input losing focus when hovering over dropdown items (Vibe Kanban) (#1966)
* Done! Here's a summary of the changes:
## Changes Made
### 1. `Dropdown.tsx` (lines 140-190)
- Added `preventFocusOnHover?: boolean` prop to `DropdownMenuItemProps` interface
- Added `onPointerMove` handler that calls `e.preventDefault()` when `preventFocusOnHover` is true, which stops Radix from stealing focus on hover
### 2. `SearchableDropdown.tsx` (line 110)
- Added `preventFocusOnHover` prop to `DropdownMenuItem`
### 3. `ProjectSelectorContainer.tsx` (lines 181, 208)
- Added `preventFocusOnHover` prop to both `DropdownMenuItem` components (the "Create new project" button and the virtualized project items)
The fix uses `e.preventDefault()` on `onPointerMove` to disable Radix's hover-to-focus behavior, as documented in [Radix UI Issue #2193](https://github.com/radix-ui/primitives/issues/2193). This preserves all other functionality (click, keyboard navigation, selection) while allowing the search input to retain focus when hovering over items.
* Done! I've added the `onPointerLeave` handler to `DropdownMenuItem` alongside the existing `onPointerMove` handler. Both now call `e.preventDefault()` when `preventFocusOnHover` is true.
**Summary of the fix:**
- Added `onPointerLeave` destructuring from props (line 161)
- Added `onPointerLeave` handler that calls `e.preventDefault()` when `preventFocusOnHover` is true (lines 187-194)
Per the [Radix UI Issue #2193](https://github.com/radix-ui/primitives/issues/2193), **both** `onPointerMove` and `onPointerLeave` need `preventDefault()` to fully disable hover-to-focus behavior.
* Script Fixer Dialog (Vibe Kanban) (#1968)
* All checks pass. Let me provide a summary of what was implemented:
## Summary
I've implemented the Script Fixer Dialog feature. Here's what was created and modified:
### New File Created:
1. **`frontend/src/components/dialogs/scripts/ScriptFixerDialog.tsx`** - A new dialog component that:
- Shows the current script content in an editable textarea
- Displays the last execution logs using `VirtualizedProcessLogs`
- Provides "Save" and "Save and Test" buttons
- Supports both setup scripts and dev server scripts
- Handles multi-repo scenarios with a repo selector dropdown
### Files Modified:
**New UI (Setup Script):**
1. **`ChatScriptEntry.tsx`** - Added `onFix` prop and a "Fix Script" button that appears when a script fails
2. **`NewDisplayConversationEntry.tsx`** - Added `ScriptEntryWithFix` wrapper component that provides the fix handler to `ChatScriptEntry`
**Legacy UI (Setup Script):**
3. **`DisplayConversationEntry.tsx`** - Added `ScriptFixButton` component that renders a fix button for failed scripts in the legacy conversation view
**Preview/Dev Server:**
4. **`PreviewPanel.tsx`** - Added "Fix Script" button to the troubleshooting alert when dev server has issues
5. **`PreviewBrowser.tsx`** - Added optional `handleFixDevScript` prop and "Fix Script" button alongside "Start Server"
6. **`PreviewBrowserContainer.tsx`** - Wired up the dialog opening for dev server script fixes
7. **`PreviewControls.tsx`** - Added `onFixScript` prop and "Fix Script" button in the dev server controls
8. **`PreviewControlsContainer.tsx`** - Wired up the dialog opening for the controls
**Translations:**
9. **`tasks.json` (English)** - Added `scriptFixer` translation keys
* Cleanup script changes for workspace 5496d4c0-d1d3-4e6a-b9d0-6a421270eeac
* Type check passes. I've updated the `ScriptFixerDialog` to also start the dev server when "Save and Test" is clicked for dev_server script type.
* Done! I've updated the `ScriptFixerDialog` to:
1. **Keep the dialog open after "Save and Test"** - The dialog no longer closes after clicking "Save and Test", so the user can watch the logs update in real-time as the script executes
2. **Changed "Cancel" to "Close"** - The button now says "Close" (using `t('common:close')`) and is always enabled, making it clear the user can close the dialog at any time
3. **Logs update automatically** - The `useExecutionProcesses` and `useLogStream` hooks will automatically pick up the new execution process and stream its logs in real-time
* Cleanup script changes for workspace 5496d4c0-d1d3-4e6a-b9d0-6a421270eeac
* Done! I've fixed the horizontal overflow by adding `min-w-0` to all flex containers and `overflow-hidden` to the `DialogContent`. This prevents flex children from overflowing their container horizontally.
* The type check passes. The fix has been applied - the width constraints (`max-w-4xl w-[90vw]`) are now on the `Dialog` component instead of `DialogContent`. This will override the default `max-w-xl` from the Dialog component's base className, allowing the dialog to be wider and preventing horizontal overflow.
* Done! I've added the status indicator to the ScriptFixerDialog. Here's what was implemented:
**Changes made:**
1. **`ScriptFixerDialog.tsx`:**
- Added import for `RunningDots` component
- Added status computation logic to determine if the process is running, succeeded, failed, or killed
- Added status indicator UI next to the "Last Execution Logs" label showing:
- Animated dots + "Running..." when the script is executing
- Green dot + "Completed successfully" when script succeeded (exit code 0)
- Red dot + "Failed with exit code X" when script failed
- Gray dot + "Process was killed" when killed
2. **`tasks.json` (translations):**
- Added `statusRunning`, `statusSuccess`, `statusFailed`, and `statusKilled` translation keys
The status indicator will update in real-time as the script executes since it's computed from `latestProcess` which is updated via the `useExecutionProcesses` hook.
* Fixed! The issue was that `exit_code` can be `null` when the process completes successfully, and comparing `null !== BigInt(0)` returns `true`, which incorrectly triggered the error state.
The fix:
- Treat `exit_code === null` as success (same as exit code 0)
- Only show error when `exit_code` is explicitly a non-zero value
* Fixed. The issue was that `exit_code` comes back as a regular number `0` from the API, but the TypeScript type says `bigint`. Using `Number(exitCode) === 0` handles both cases correctly and satisfies the type checker.
* Fixed! The translation key was missing the `buttons.` namespace prefix. It now uses `t('common:buttons.close')` which maps to "Close".
* Done. Added `bg-error` and `text-error` classes alongside the `destructive` classes for the error state.
* styles
* Done! I've fixed the issue by passing `sessionId` to the `ScriptFixerDialog` in all three files:
1. **`PreviewPanel.tsx`** - Gets `sessionId` from `devServerProcesses[0]?.session_id`
2. **`PreviewBrowserContainer.tsx`** - Added `devServerProcesses` to destructuring from `usePreviewDevServer` and passes `sessionId`
3. **`PreviewControlsContainer.tsx`** - Already had `devServerProcesses`, just added `sessionId` to the dialog call
Now when you click "Save and Test" for a dev server script, the dialog will receive the session ID, connect to the WebSocket stream, and show the execution logs in real-time.
* rollback trigger the ScriptFixer for old UI
* Done! I've extended the ScriptFixerDialog to support cleanup scripts. Here's a summary of the changes:
**1. `frontend/src/i18n/locales/en/tasks.json`**
- Added `cleanupScriptTitle: "Fix Cleanup Script"` translation key
**2. `frontend/src/components/dialogs/scripts/ScriptFixerDialog.tsx`**
- Updated `ScriptType` from `'setup' | 'dev_server'` to `'setup' | 'cleanup' | 'dev_server'`
- Updated `latestProcess` filter to use `'cleanupscript'` run_reason for cleanup scripts
- Updated script fetching logic to read `cleanup_script` field
- Updated both `handleSave` and `handleSaveAndTest` to save `cleanup_script` field
- Updated execution logic to call `attemptsApi.runCleanupScript(workspaceId)` for cleanup scripts
- Updated dialog title to show "Fix Cleanup Script" for cleanup type
- Updated placeholder text to show `#!/bin/bash\nrm -rf node_modules` for cleanup scripts
**3. `frontend/src/components/ui-new/NewDisplayConversationEntry.tsx`**
- Fixed the scriptType mapping so "Cleanup Script" maps to `'cleanup'` instead of incorrectly mapping to `'setup'`
* All tasks are complete. Here's a summary of the changes I made:
## Summary
I've implemented the ScriptFixerDialog in the old UI for both `DisplayConversationEntry.tsx` and `PreviewPanel.tsx`.
### Changes Made:
**1. `DisplayConversationEntry.tsx`** (`frontend/src/components/NormalizedConversation/DisplayConversationEntry.tsx`):
- Added imports for `ScriptFixerDialog`, `ScriptType`, `useAttemptRepo`, `Button`, and `Wrench` icon
- Added `SCRIPT_TOOL_NAMES` constant to identify script entries
- Added `getScriptType()` helper function to map tool names to script types
- Created `ScriptToolCallCard` component that wraps `ToolCallCard` and adds a "Fix Script" button for failed scripts
- Modified `renderToolUse()` to detect script entries and render them with `ScriptToolCallCard`
**2. `PreviewPanel.tsx`** (`frontend/src/components/panels/PreviewPanel.tsx`):
- Added imports for `ScriptFixerDialog`, `useAttemptRepo`, and `Wrench` icon
- Added `useAttemptRepo(attemptId)` hook to get repos
- Added `handleFixDevScript()` function that opens the ScriptFixerDialog
- Added `canFixDevScript` computed value
- Added "Fix Dev Script" button in the troubleshooting alert next to the "Stop and Edit" button
**3. Translation Keys**:
- Added `conversation.fixScript: "Fix Script"` in `en/common.json`
- Added `preview.troubleAlert.fixScript: "Fix Dev Script"` in `en/tasks.json`
The implementation follows the same pattern as the new UI's `ScriptEntryWithFix` component in `NewDisplayConversationEntry.tsx`, using `useAttemptRepo` hook to fetch repos instead of `useWorkspaceContext` (which is only available in the new design scope).
* Cleanup script changes for workspace 5496d4c0-d1d3-4e6a-b9d0-6a421270eeac
* All tasks are complete. Here's a summary of the fixes made:
## Summary of Changes
### Problem
The "Fix Dev Script" button was only showing in the troubleshooting alert, which only appears when a dev server is **running** but slow to respond. When the dev server script **fails to start** (exits with error), there are no running dev servers, so the user saw `NoServerContent` without any fix option.
### Solution
**1. `PreviewPanel.tsx`** - Added failed dev server detection:
```typescript
const failedDevServerProcess = devServerProcesses.find(
(p) =>
p.status === 'failed' ||
(p.status === 'completed' && p.exit_code !== null && p.exit_code !== 0n)
);
const hasFailedDevServer = Boolean(failedDevServerProcess);
```
And passed `hasFailedDevServer` and `onFixDevScript` to `NoServerContent`.
**2. `NoServerContent.tsx`** - Added new props and "Fix Dev Script" button:
- Added `hasFailedDevServer?: boolean` and `onFixDevScript?: () => void` props
- Added fix button that shows when dev server has failed
**3. Translation Keys** - Added `preview.noServer.fixScript: "Fix Dev Script"` to `en/tasks.json`
Now when a user tries to start a dev server and it fails, they'll see the "Fix Dev Script" button in the `NoServerContent` view, allowing them to open the ScriptFixerDialog to fix the script.
* Done! I've successfully added all the Script Fixer i18n translations to the 5 non-English locale files:
**Summary of changes:**
### common.json files (5 files updated)
Added `fixScript` key to the `conversation` section:
- **es**: `"Corregir Script"`
- **ja**: `"スクリプトを修正"`
- **ko**: `"스크립트 수정"`
- **zh-Hans**: `"修复脚本"`
- **zh-Hant**: `"修復腳本"`
### tasks.json files (5 files updated)
1. Added `fixScript` to `preview.noServer` section
2. Added `fixScript` to `preview.troubleAlert` section
3. Added the entire `scriptFixer` section with 17 keys including:
- `title`, `setupScriptTitle`, `cleanupScriptTitle`, `devServerTitle`
- `scriptLabel`, `logsLabel`
- `saveButton`, `saveAndTestButton`, `saving`, `testing`
- `noLogs`, `selectRepo`, `fixScript`
- `statusRunning`, `statusSuccess`, `statusFailed`, `statusKilled`
All type checks (`pnpm run check`) passed successfully.
* Both lint and type check pass now. Here's a summary of the lint fixes I made:
**Fixed lint issues in:**
1. **`ScriptFixerDialog.tsx`** (lines 198 and 253):
- Added missing `repos` dependency to both `handleSave` and `handleSaveAndTest` useCallback hooks
- Removed unnecessary `modal` dependency from `handleSaveAndTest`
2. **`NewDisplayConversationEntry.tsx`** (line 658):
- Used a `useRef` pattern to access `repos` inside the `handleFix` callback without including it in the dependency array, since the `repos` array is recreated on every render from context
* All checks pass. The fix is complete.
**Summary:** The "Fix Script" button in `PreviewControls` will now only appear when the latest dev server process has a status of `'failed'`. When the dev server is running, completed successfully, or was killed by the user, the button will be hidden.
* chore: bump version to 0.0.149
* Prevent WorkspacesSidebar re-render on workspace switch (Vibe Kanban) (#1973)
* The refactoring is complete. Here's a summary of what was changed:
## Summary
**File modified:** `vibe-kanban/frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`
**Change:** Restructured `renderContent()` so that `WorkspacesSidebar` is rendered **outside** the `ExecutionProcessesProvider`.
### Before:
```tsx
<ExecutionProcessesProvider key={`${selectedWorkspace?.id}-${selectedSessionId}`}>
<ReviewProvider>
<Allotment>
<Allotment.Pane>{renderSidebar()}</Allotment.Pane> // Inside provider
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
</Allotment>
</ReviewProvider>
</ExecutionProcessesProvider>
```
### After:
```tsx
<Allotment>
<Allotment.Pane>{renderSidebar()}</Allotment.Pane> // OUTSIDE provider - won't remount
<ExecutionProcessesProvider key={`${selectedWorkspace?.id}-${selectedSessionId}`}>
<ReviewProvider>
<>
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
<Allotment.Pane>...</Allotment.Pane>
</>
</ReviewProvider>
</ExecutionProcessesProvider>
</Allotment>
```
**Result:** When switching workspaces, the `ExecutionProcessesProvider`'s key changes, which unmounts/remounts only panes 2-4. The sidebar pane stays mounted and won't re-render unnecessarily.
* The implementation is complete. Here's a summary of what was changed:
## Summary
**File modified:** `vibe-kanban/frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`
### Changes:
1. **Created nested Allotments structure:**
- **Outer Allotment** (2 panes): Sidebar + Content container
- **Inner Allotment** (3 panes): Main + Changes/Logs + Git Panel
2. **Separated resize handlers:**
- `handleOuterPaneResize`: Handles sidebar width only
- `handleInnerPaneResize`: Handles main, changes/logs, and git panel widths
3. **Removed old `handlePaneResize`** which was designed for the flat 4-pane structure
### Result:
```
Outer Allotment
├── Sidebar Pane (OUTSIDE providers - won't remount)
└── Content Pane
└── ExecutionProcessesProvider (keyed)
└── ReviewProvider
└── Inner Allotment
├── Main Pane
├── Changes/Logs Pane
└── Git Panel Pane
```
Now when switching workspaces:
- The `ExecutionProcessesProvider` with its key will remount the inner Allotment (ensuring clean state)
- The sidebar stays mounted because it's outside the keyed provider
- Layout looks the same as before (sidebar on left, 3 panes on right)
* Revert "Fix workspace sidebar ordering to use updated_at instead of created_at (Vibe Kanban) (#1965)" (#1974)
This reverts commit 8dc07ee2b2cabc1326f0aad5a8977c66f98b6f75.
* update cursor-agent models (#1977)
* The frontend TypeScript check passed without errors. (#1978)
The implementation is complete. The change removes the Bash-only restriction so that any tool with output (including MCP tools like `mcp:dev-manager:stop`) can now be clicked to view their results in the logs panel.
**Summary of changes:**
- **File:** `vibe-kanban/frontend/src/components/ui-new/NewDisplayConversationEntry.tsx`
- **Change:** Simplified `hasOutput` check in `ToolSummaryEntry` from `isBash && content && content.trim().length > 0` to just `content && content.trim().length > 0`
- **Effect:** MCP tool entries (and any other tool with output) are now clickable to view their JSON results in the logs panel
* Add session-level review endpoint with StartReviewDialog (Vibe Kanban) (#1849)
* All checks pass. Let me provide a summary of what was implemented:
I've implemented the review endpoint as planned. Here's what was created:
1. **`crates/executors/src/actions/review.rs`** - New action type with:
- `RepoReviewContext` struct (repo_id + commit_hashes)
- `ReviewRequest` struct (executor_profile_id, context, additional_prompt, working_dir)
- `Executable` trait impl that calls `executor.spawn_review()`
2. **`crates/server/src/routes/task_attempts/review.rs`** - Endpoint handler with:
- `StartReviewRequest` for the API
- `RepoReviewContext` (endpoint-specific copy)
- `ReviewError::ProcessAlreadyRunning`
- `start_review` handler that:
- Verifies no running processes on workspace
- Creates fresh session
- Builds ReviewRequest action
- Starts execution with `ExecutionProcessRunReason::CodingAgent`
1. **`crates/executors/src/executors/mod.rs`**:
- Added `spawn_review()` to `StandardCodingAgentExecutor` trait with default prompt-based implementation
- Added `build_review_prompt()` helper function
2. **`crates/executors/src/actions/mod.rs`**:
- Added `pub mod review;`
- Added `ReviewRequest` to `ExecutorActionType` enum
- Updated `base_executor()` match
3. **`crates/services/src/services/container.rs`**:
- Updated match in `try_start_next_action` to handle `ReviewRequest`
4. **`crates/server/src/routes/task_attempts.rs`**:
- Added `pub mod review;`
- Added `.route("/review", post(review::start_review))`
5. **`crates/server/src/bin/generate_types.rs`**:
- Added new types to export list
**`POST /task-attempts/{id}/review`**
Request:
```json
{
"executor_profile_id": { "executor": "CLAUDE_CODE", "variant": null },
"context": [{ "repo_id": "uuid", "commit_hashes": ["abc123"] }],
"additional_prompt": "Focus on security issues"
}
```
Response: `ExecutionProcess` on success, `ReviewError` on failure.
To add native review for an executor (e.g., Codex), just override `spawn_review()` in that executor's `StandardCodingAgentExecutor` impl. No changes needed to action or endpoint.
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
All checks pass now. The duplicate type issue is fixed - we're using a single `RepoReviewContext` type from the executors crate.
All checks pass now. Both frontend lint (ESLint) and backend lint (Clippy) are passing.
Found and fixed the real issue. The problem was in `crates/services/src/services/container.rs` - the log normalization was only set up for `CodingAgentInitialRequest` and `CodingAgentFollowUpRequest`. `ReviewRequest` was falling through to the default case and returning `None`, so no normalizer was started for review processes.
Fixed in two places:
1. **Line 787-791**: Added `ReviewRequest` handling in `stream_normalized_logs` (for historic logs)
2. **Line 1149-1151**: Added `ReviewRequest` handling in `start_execution` (for live logs)
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Backend changes for the `use_all_workspace_commits` flag are complete. Here's what was implemented:
Added `use_all_workspace_commits` flag to `StartReviewRequest` for automatically populating review context.
1. **`crates/db/src/models/execution_process_repo_state.rs`**
- Added `find_initial_commits_for_workspace()` - query to get the earliest `before_head_commit` for each repo in a workspace
2. **`crates/server/src/routes/task_attempts/review.rs`**
- Added `use_all_workspace_commits: bool` field to `StartReviewRequest` (defaults to `false`)
- When flag is `true` and `context` is `None`, auto-populates context with initial commits from workspace execution processes
3. **`crates/executors/src/executors/mod.rs`**
- Updated `build_review_prompt()` to detect single-commit context (indicating initial commit)
- When single commit per repo, prompts agent to "Review all changes made since the following base commit(s)" with git diff hint
4. **`crates/services/src/services/git.rs`**
- Added `get_commits_since_branch()` method (may be useful for future use)
5. **`shared/types.ts`**
- Generated TypeScript type includes `use_all_workspace_commits: boolean`
When frontend calls `POST /task-attempts/{id}/review` with:
```json
{
"executor_profile_id": { "executor": "CLAUDE_CODE", "variant": null },
"use_all_workspace_commits": true
}
```
The backend will:
1. Find the earliest execution process for the workspace
2. Get the `before_head_commit` for each repo (the commit before agents started making changes)
3. Pass that to the prompt builder which tells the agent to review all changes since that commit
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Frontend UI implementation is complete. Here's a summary of what was added:
Added simple frontend UI to test the review endpoint.
1. **`frontend/src/lib/api.ts`**
- Added `startReview` method to `attemptsApi`
- Imports `StartReviewRequest`, `ReviewError` types
2. **`frontend/src/hooks/useStartReview.ts`** (NEW)
- Hook that calls `attemptsApi.startReview` with `use_all_workspace_commits: true`
- Invalidates `processes` and `branchStatus` queries on success
3. **`frontend/src/hooks/index.ts`**
- Exports `useStartReview`
4. **`frontend/src/components/ui/actions-dropdown.tsx`**
- Added "Start Review" menu item in the attempt actions section
- Uses the user's default executor profile from config
- Shows loading state while starting review
5. **`frontend/src/i18n/locales/en/tasks.json`**
- Added translation keys: `startReview`, `startingReview`
From the workspace actions dropdown (three dots menu), click "Start Review" to start a code review session using all workspace commits as context.
Done! The fix has been implemented. The review endpoint now uses `Session::find_latest_by_workspace_id` to find an existing session for the workspace, and only creates a new session if none exists. This means review logs will now appear in the same conversation view as other coding agent runs.
**Change summary:**
- Modified `crates/server/src/routes/task_attempts/review.rs` (lines 79-93)
- Instead of always creating a new session, it now checks for an existing session first using `Session::find_latest_by_workspace_id`
- This matches the pattern used by dev server, setup scripts, and other similar endpoints
Done! The fix is now in place. The change adds `ReviewRequest` to the action type filter in `useConversationHistory.ts` so review processes are included in the conversation view, and handles the content extraction appropriately (using `additional_prompt` for reviews instead of `prompt`).
**Change summary:**
- Modified `frontend/src/hooks/useConversationHistory.ts` (lines 226-244)
- Added `ReviewRequest` to the action type filter
- Used conditional to extract content from `additional_prompt` for reviews (with fallback "Review the code changes") vs `prompt` for coding agent requests
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
Done! All fixes are now in place:
1. **`useConversationHistory.ts` - `flattenEntries()`** (line 177-184): Added `ReviewRequest` to the filter so review processes are included in the flattened entries
2. **`useConversationHistory.ts` - `flattenEntriesForEmit()`** (line 226-244): Already fixed earlier - handles `ReviewRequest` and extracts `additional_prompt` for user message content
3. **`ProcessesTab.tsx`** (line 223-228): Added `ReviewRequest` to the ProfileVariantBadge conditional so the agent badge shows for review processes
* Done. Changes made:
1. **`crates/executors/src/actions/review.rs`**: Added `prompt: String` field to `ReviewRequest`
2. **`crates/server/src/routes/task_attempts/review.rs`**:
- Import `build_review_prompt`
- Build the full prompt from context and additional_prompt before creating the action
3. **`frontend/src/hooks/useConversationHistory.ts`**: Simplified content extraction to just use `actionType.prompt` for all action types (since `ReviewRequest` now has a prompt field too)
4. **Regenerated TypeScript types** - `ReviewRequest` in `shared/types.ts` now includes the `prompt` field
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Done. Here's a summary of the changes:
**Backend:**
1. **`crates/executors/src/actions/review.rs`**:
- Added `CommitRange` enum with three variants: `FromBase`, `Specific`, and `Range`
- Updated `RepoReviewContext` to use `repo_name: String` and `commits: CommitRange` instead of `commit_hashes`
2. **`crates/executors/src/executors/mod.rs`**:
- Updated `build_review_prompt` to format output with repo names and handle all `CommitRange` variants
3. **`crates/server/src/routes/task_attempts/review.rs`**:
- Simplified `StartReviewRequest` (removed `context` field, kept `use_all_workspace_commits`)
- Updated handler to look up repo names via `Repo::find_by_ids` and use `CommitRange::FromBase`
4. **`crates/server/src/bin/generate_types.rs`**: Added `CommitRange` to exported types
**Frontend:**
- **`frontend/src/hooks/useStartReview.ts`**: Removed `context: null` since that field no longer exists
The prompt will now look like:
```
Please review the code changes.
Repository: vibe-kanban
Review all changes from base commit abc123 to HEAD.
Use `git diff abc123..HEAD` to see the changes.
```
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Codex review support (vibe-kanban e7996a18)
## Context
We've added a review endpoint (\`POST /task-attempts/{id}/review\`) that starts a code review session. Currently it uses a default prompt-based implementation via \`spawn\_review()\` on \`StandardCodingAgentExecutor\`, which builds a prompt and delegates to \`spawn()\`.
## Goal
Implement native Codex review support by overriding \`spawn\_review()\` in the Codex executor to use Codex's native review mechanism instead of the prompt-based approach.
## Current Implementation
### Backend Types
\*\*\`CommitRange\` enum\*\* (\`crates/executors/src/actions/review.rs\`):
\`\`\`rust
pub enum CommitRange {
FromBase { commit: String },
Specific { commits: Vec<String> },
Range { from: String, to: String },
}
\`\`\`
\*\*\`RepoReviewContext\`\*\*:
\`\`\`rust
pub struct RepoReviewContext {
pub repo\_id: Uuid,
pub repo\_name: String,
pub commits: CommitRange,
}
\`\`\`
### Trait Method
\*\*\`spawn\_review()\`\*\* in \`StandardCodingAgentExecutor\` trait (\`crates/executors/src/executors/mod.rs\`):
\`\`\`rust
async fn spawn\_review(
&self,
current\_dir: &Path,
context: Option<&[RepoReviewContext]>,
additional\_prompt: Option<&str>,
env: &ExecutionEnv,
) -> Result<SpawnedChild, ExecutorError> {
// Default: build prompt and delegate to spawn()
let prompt = build\_review\_prompt(context, additional\_prompt);
self.spawn(current\_dir, &prompt, env).await
}
\`\`\`
## Tasks
1. Research Codex's native review API/mechanism (if it has one)
2. Override \`spawn\_review()\` in \`CodexExecutor\` to use native review if available
3. Fall back to prompt-based approach if native review isn't supported
* Done. Here's a summary of the changes:
1. **Removed dead code** from `crates/executors/src/executors/codex/review.rs`:
- Deleted the `map_to_review_target()` function (was ~120 lines)
- Removed unused imports (`CommitRange`, `RepoReviewContext`)
2. **Codex now uses `ReviewTarget::Custom`** with the pre-built prompt, which ensures the displayed prompt matches what Codex actually receives.
The build passes and TypeScript types have been regenerated.
* Use custom review target for codex
* Done. Here's a summary of the changes:
## Summary
Moved the review endpoint from workspace-level to session-level:
### Changes
1. **Created `crates/server/src/routes/sessions/review.rs`**
- New review endpoint at `POST /sessions/{id}/review`
- Takes `Extension<Session>` instead of `Extension<Workspace>`
- Looks up `agent_session_id` from previous executions using `find_latest_coding_agent_turn_session_id()`
- Passes `agent_session_id` to `ReviewAction` for session resumption
2. **Updated `crates/server/src/routes/sessions/mod.rs`**
- Added `pub mod review;`
- Added route `.route("/review", post(review::start_review))`
3. **Updated `crates/server/src/routes/task_attempts.rs`**
- Removed `pub mod review;`
- Removed `.route("/review", post(review::start_review))`
4. **Deleted `crates/server/src/routes/task_attempts/review.rs`**
5. **Updated `crates/server/src/bin/generate_types.rs`**
- Changed path from `task_attempts::review` to `sessions::review`
### API Change
- **Old**: `POST /api/task-attempts/{workspace_id}/review`
- **New**: `POST /api/sessions/{session_id}/review`
This ensures vk sessions and agent sessions are 1:1:
- Existing session → resumes agent session if available
- New session → fresh agent session
* Done! Here's a summary of all the frontend changes:
- Added `startReview` to `sessionsApi` using new endpoint `POST /api/sessions/${sessionId}/review`
- Removed `startReview` from `attemptsApi`
- Changed parameter from `attemptId` to `sessionId` and added optional `workspaceId` for query invalidation
- Changed API call from `attemptsApi.startReview` to `sessionsApi.startReview`
- Added `MagnifyingGlassIcon` import
- Added `onStartReview` and `isReviewStarting` to `SessionProps` interface
- Added "Start Review" menu item in the session dropdown
- Added `useStartReview` hook import and usage
- Added `handleStartReview` callback function
- Passed `onStartReview` and `isReviewStarting` to `SessionChatBox`
- Removed `useStartReview` import
- Removed `useUserSystem` import (now unused)
- Removed `startReview` hook usage
- Removed `handleStartReview` function
- Removed "Start Review" menu item from the dropdown
* Done. The fix adds the `ReviewRequest` case to `latest_executor_profile_for_session()` in `crates/db/src/models/execution_process.rs:688-690`.
The backend check passes. Follow-ups after reviews should now work correctly since the executor profile can be extracted from `ReviewRequest` just like from the other request types.
* Done. Removed `CommitRange` enum entirely. Changes:
1. **`crates/executors/src/actions/review.rs`** - Deleted `CommitRange` enum, changed `RepoReviewContext.commits` to `RepoReviewContext.base_commit: String`
2. **`crates/server/src/routes/sessions/review.rs`** - Updated construction to use `base_commit: initial_commit` instead of `commits: CommitRange::FromBase { commit: initial_commit }`
3. **`crates/executors/src/executors/mod.rs`** - Simplified `build_review_prompt()` to directly use `repo.base_commit` instead of matching on the enum
4. **`crates/server/src/bin/generate_types.rs`** - Removed `CommitRange::decl()` from type exports
5. **`shared/types.ts`** - Regenerated, `CommitRange` type is now gone
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
* Done. Simplified the review context building:
**Changes:**
1. **`crates/db/src/models/execution_process_repo_state.rs`** - Replaced `find_initial_commits_for_workspace` with `find_initial_commit_for_repo` that takes a specific repo_id and uses ORDER BY + LIMIT 1 instead of GROUP BY/HAVING.
2. **`crates/server/src/routes/sessions/review.rs`** - Simplified the context building:
- Get workspace repos first (has repo names via `display_name`)
- For each repo, get initial commit
- Build context directly - no more HashMap joining, no more separate `Repo::find_by_ids` call
The new code is much easier to follow: get repos → for each, get initial commit → build context.
* Done. Addressed all 23 review comments:
1. Removed comment from `SessionChatBoxContainer.tsx` (line 161)
2. Removed doc comments from `RepoReviewContext` and `ReviewRequest` structs in `review.rs`
3. Removed module doc comment from `codex/review.rs`
4. Removed comment from `codex.rs` about Custom review target
5. Removed doc comments from `spawn_review` trait method in `mod.rs`
6. Removed doc comment from `build_review_prompt` function
7. Removed all comments from `sessions/review.rs` (doc comments and inline comments)
8. Removed unused `get_commits_since_branch` function from `git.rs` (~45 lines of dead code)
* Done. Added the review toggle button:
**Changes:**
1. **`SessionChatBox.tsx`**
- Added `ReviewModeProps` interface with `isActive`, `onToggle`, `isSubmitting`
- Added `reviewMode` prop to `SessionChatBoxProps`
- Added toggle button next to attach button (MagnifyingGlassIcon) - highlighted when active
- Updated placeholder to show "Enter review instructions..." when in review mode
- Removed old `onStartReview` and `isReviewStarting` from SessionProps
- Removed "Start Review" dropdown menu item
2. **`SessionChatBoxContainer.tsx`**
- Added `useState` for `isReviewMode`
- Updated `handleSend` to call `startReviewMutation` with `additionalPrompt` when in review mode
- Reset review mode after successful review start
- Pass `reviewMode` props to SessionChatBox
- Removed old `handleStartReview` callback
Now the user can:
1. Click the magnifying glass toggle next to attach
2. Enter review instructions in the text area
3. Click send → starts review with the prompt
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
TypeScript and Rust both compile. The changes are:
1. Button shows "Review" when review mode is active
2. Toggle icon uses `!text-accent-foreground` to force override the `text-low` class from the base component, along with `bg-accent rounded-sm` for the background highlight
Done. Changed `!text-accent-foreground` to `!text-normal` which uses the design system's proper text color for active/selected states. The `!` prefix forces the override of the base `text-low` class. Both TypeScript and Rust compile successfully.
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
All done. TypeScript and Rust compile successfully. Here's a summary of the changes:
**Created:**
- `frontend/src/components/dialogs/tasks/StartReviewDialog.tsx` - New dialog with:
- Agent/variant selection (using ExecutorProfileSelector)
- Review comments preview (if any)
- Additional instructions textarea
- Start Review / Cancel buttons
**Modified:**
- `frontend/src/components/dialogs/index.ts` - Added export for StartReviewDialog
- `frontend/src/components/ui-new/primitives/SessionChatBox.tsx`:
- Changed `ReviewModeProps` from toggle state to simple callback (`onReviewClick`, `isDisabled`)
- Removed toggle styling and review mode button text
- Button now just opens the dialog
- `frontend/src/components/ui-new/containers/SessionChatBoxContainer.tsx`:
- Removed `isReviewMode` state and `startReviewMutation`
- Added `handleReviewClick` callback that opens `StartReviewDialog`
- Disabled review button when in new session mode or no session exists
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
Done. TypeScript and Rust compile successfully. Summary of changes:
**`StartReviewDialog.tsx`:**
- Added "New Session" toggle (defaults ON when no session exists, disabled when no session to toggle from)
- Added conditional `AgentSelector` - only shown when creating a new session
- Always shows `ConfigSelector` for variant selection
- Handles session creation inline when toggle is on or no session exists
- Updated `onSuccess` callback to return new session ID when created
**`SessionChatBox.tsx`:**
- Removed `isDisabled` from `ReviewModeProps` interface
- Removed `reviewMode.isDisabled` from button disabled logic
**`SessionChatBoxContainer.tsx`:**
- Updated `handleReviewClick` to allow opening dialog without sessionId
- Updated `onSuccess` callback to select the new session if one was created
- Removed `isDisabled` from reviewMode prop
Cleanup script changes for workspace 38f8b607-9fdc-43dc-afa3-16e8f5e9cbd3
Done. Made `reviewMode` re…
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
/sessions/{id}/reviewendpoint for starting code reviewsStartReviewDialogcomponent for configuring and launching reviews from the workspace UIChanges
Backend
crates/server/src/routes/sessions/review.rs): Session-scoped review API that acceptsReviewRequestwith executor profile, optional additional prompt, and workspace commit optionscrates/executors/src/actions/review.rs): New action type for handling review requestscrates/executors/src/executors/codex/review.rs): Custom review implementation for Codex executorReviewRequestcase tolatest_executor_profile_for_session()Frontend
frontend/src/components/dialogs/tasks/StartReviewDialog.tsx): New dialog matching the TaskFormDialog design pattern with:SessionChatBoxfor quick access to review modefrontend/src/hooks/useStartReview.ts): React hook for calling the review APIfrontend/src/lib/api.ts): AddedstartReviewmethod to sessions APITypes
StartReviewRequestandStartReviewResponsetypes to shared typesTesting
This PR was written using Vibe Kanban