Files
vibe-kanban/frontend/src/components/tasks/TaskFollowUpSection.tsx

1190 lines
45 KiB
TypeScript
Raw Normal View History

Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
import {
AlertCircle,
CheckCircle2,
WifiOff,
Clock,
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
Send,
ChevronDown,
ImageIcon,
StopCircle,
} from 'lucide-react';
import { Button } from '@/components/ui/button';
import { ImageUploadSection } from '@/components/ui/ImageUploadSection';
import { Alert, AlertDescription } from '@/components/ui/alert';
import { FileSearchTextarea } from '@/components/ui/file-search-textarea';
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
import { useEffect, useMemo, useState, useRef, useCallback } from 'react';
import {
attemptsApi,
imagesApi,
type UpdateFollowUpDraftRequest,
} from '@/lib/api.ts';
import type {
ImageResponse,
TaskWithAttemptStatus,
FollowUpDraft,
} from 'shared/types';
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
import { useBranchStatus } from '@/hooks';
import { useAttemptExecution } from '@/hooks/useAttemptExecution';
import { Loader2 } from 'lucide-react';
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
import { useUserSystem } from '@/components/config-provider';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import { cn } from '@/lib/utils';
import { useVariantCyclingShortcut } from '@/lib/keyboard-shortcuts';
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
import { useReview } from '@/contexts/ReviewProvider';
import { useJsonPatchStream } from '@/hooks/useJsonPatchStream';
import { inIframe } from '@/vscode/bridge';
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
interface TaskFollowUpSectionProps {
task: TaskWithAttemptStatus;
projectId: string;
selectedAttemptId?: string;
selectedAttemptProfile?: string;
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
jumpToLogsTab: () => void;
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
}
export function TaskFollowUpSection({
task,
projectId,
selectedAttemptId,
selectedAttemptProfile,
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
jumpToLogsTab,
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
}: TaskFollowUpSectionProps) {
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
const {
attemptData,
isAttemptRunning,
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
stopExecution,
isStopping,
processes,
} = useAttemptExecution(selectedAttemptId, task.id);
const { data: branchStatus } = useBranchStatus(selectedAttemptId);
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
const { profiles } = useUserSystem();
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
const { comments, generateReviewMarkdown, clearComments } = useReview();
// Generate review markdown when comments change
const reviewMarkdown = useMemo(() => {
return generateReviewMarkdown();
}, [generateReviewMarkdown, comments]);
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
// Inline defaultFollowUpVariant logic
const defaultFollowUpVariant = useMemo(() => {
if (!processes.length) return null;
// Find most recent coding agent process with variant
const latestProfile = processes
.filter((p) => p.run_reason === 'codingagent')
.reverse()
.map((process) => {
if (
process.executor_action?.typ.type === 'CodingAgentInitialRequest' ||
process.executor_action?.typ.type === 'CodingAgentFollowUpRequest'
) {
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
return process.executor_action?.typ.executor_profile_id;
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
}
return undefined;
})
.find(Boolean);
if (latestProfile?.variant) {
return latestProfile.variant;
} else if (latestProfile) {
return null;
} else if (selectedAttemptProfile && profiles) {
// No processes yet, check if profile has default variant
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
const profile = profiles?.[selectedAttemptProfile];
if (profile && Object.keys(profile).length > 0) {
return Object.keys(profile)[0];
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
}
}
return null;
}, [processes, selectedAttemptProfile, profiles]);
const [followUpMessage, setFollowUpMessage] = useState('');
const [isSendingFollowUp, setIsSendingFollowUp] = useState(false);
const [followUpError, setFollowUpError] = useState<string | null>(null);
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
const [selectedVariant, setSelectedVariant] = useState<string | null>(
defaultFollowUpVariant
);
const [isAnimating, setIsAnimating] = useState(false);
const variantButtonRef = useRef<HTMLButtonElement>(null);
const [showImageUpload, setShowImageUpload] = useState(false);
const [images, setImages] = useState<ImageResponse[]>([]);
const [newlyUploadedImageIds, setNewlyUploadedImageIds] = useState<string[]>(
[]
);
const wrapperRef = useRef<HTMLDivElement>(null);
const [lockedMinHeight, setLockedMinHeight] = useState<number | null>(null);
// Fade-out overlay for clearing text when sending begins
const [fadeOverlayText, setFadeOverlayText] = useState('');
const [showFadeOverlay, setShowFadeOverlay] = useState(false);
const [overlayFadeClass, setOverlayFadeClass] = useState('');
const overlayFadeTimerRef = useRef<number | undefined>(undefined);
const overlayHideTimerRef = useRef<number | undefined>(undefined);
const [isQueued, setIsQueued] = useState(false);
const [isDraftSending, setIsDraftSending] = useState(false);
const [isQueuing, setIsQueuing] = useState(false);
const [isUnqueuing, setIsUnqueuing] = useState(false);
const [isDraftReady, setIsDraftReady] = useState(false);
const saveTimeoutRef = useRef<number | undefined>(undefined);
const [isSaving, setIsSaving] = useState(false);
const [saveStatus, setSaveStatus] = useState<
'idle' | 'saving' | 'saved' | 'offline' | 'sent'
>('idle');
const [isStatusFading, setIsStatusFading] = useState(false);
const statusFadeTimerRef = useRef<number | undefined>(undefined);
const statusClearTimerRef = useRef<number | undefined>(undefined);
const lastSentRef = useRef<string>('');
const suppressNextSaveRef = useRef<boolean>(false);
const localDirtyRef = useRef<boolean>(false);
// We auto-resolve conflicts silently by adopting server state.
const lastServerVersionRef = useRef<number>(-1);
const prevSendingRef = useRef<boolean>(false);
// Helper to show a pleasant fade for transient "Saved" status
const scheduleSavedStatus = useCallback(() => {
// Clear pending timers
if (statusFadeTimerRef.current)
window.clearTimeout(statusFadeTimerRef.current);
if (statusClearTimerRef.current)
window.clearTimeout(statusClearTimerRef.current);
setIsStatusFading(false);
setSaveStatus('saved');
// Fade out close to the end of visibility
statusFadeTimerRef.current = window.setTimeout(
() => setIsStatusFading(true),
1800
);
statusClearTimerRef.current = window.setTimeout(() => {
setSaveStatus('idle');
setIsStatusFading(false);
}, 2000);
}, []);
const scheduleSentStatus = useCallback(() => {
if (statusFadeTimerRef.current)
window.clearTimeout(statusFadeTimerRef.current);
if (statusClearTimerRef.current)
window.clearTimeout(statusClearTimerRef.current);
setIsStatusFading(false);
setSaveStatus('sent');
statusFadeTimerRef.current = window.setTimeout(
() => setIsStatusFading(true),
1800
);
statusClearTimerRef.current = window.setTimeout(() => {
setSaveStatus('idle');
setIsStatusFading(false);
}, 2000);
}, []);
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
// Get the profile from the attempt data
const selectedProfile = selectedAttemptProfile;
// Separate logic for when textarea should be disabled vs when send button should be disabled
const canTypeFollowUp = useMemo(() => {
if (
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
!selectedAttemptId ||
Remove task attempt activity (vibe-kanban) (#242) * ## Summary I have successfully completed the task to remove the task attempt activity functionality from the codebase. Here's what was accomplished: ### ✅ **Completed Work:** 1. **Database Migration**: Created `backend/migrations/20250717000000_drop_task_attempt_activities.sql` to drop the `task_attempt_activities` table and its indexes 2. **Backend Cleanup**: - Deleted `backend/src/models/task_attempt_activity.rs` model file - Removed imports and exports from `backend/src/models/mod.rs` - Cleaned up all references in `backend/src/routes/task_attempts.rs`: - Removed `get_task_attempt_activities` and `create_task_attempt_activity` functions - Removed the API route endpoints - Removed activity creation calls in process stop handlers - Updated `backend/src/services/process_service.rs` to remove activity creation - Updated `backend/src/execution_monitor.rs` to remove activity creation throughout the execution flow - Removed type exports from `backend/src/bin/generate_types.rs` 3. **Frontend Cleanup**: - Regenerated TypeScript types (TaskAttemptActivity types automatically removed) - Removed `getActivities` API function from `frontend/src/lib/api.ts` - Deleted `frontend/src/components/tasks/TaskActivityHistory.tsx` component - Updated `frontend/src/lib/types.ts` to remove activity references - Updated `frontend/src/components/context/TaskDetailsContextProvider.tsx` to fetch only processes (no activities) - Updated `frontend/src/components/tasks/TaskFollowUpSection.tsx` to determine follow-up eligibility based on completed coding agent processes instead of activities 4. **Build Verification**: Both backend (Rust) and frontend (TypeScript) build successfully ### ⚠️ **Remaining Issue:** There's one SQL query in `backend/src/models/task.rs` that still references the `task_attempt_activities` table. The query has become malformed during the editing process. This needs to be fixed to complete the task. The functionality has been successfully removed with no compilation errors in the main application code. The only remaining work is to fix the SQL query that determines task status based on execution process states rather than activities. * update queries * clippy * prettier * mark task as failed or killed * sql rebase fixes
2025-07-17 14:56:44 +01:00
attemptData.processes.length === 0 ||
isSendingFollowUp
) {
return false;
}
Allow multiple merges (#510) * Allow multiple merge for a single task attempt Merge more than once (vibe-kanban 618829fc) When creating a PR, new changes can be pushed after creation. We need merge to work the same way, when changes have been made after the first merge, a second one should work. Commit changes from coding agent for task attempt 548ff450-df77-47b2-a5ba-c88d0aa4a334 Merge more than once (vibe-kanban 618829fc) When creating a PR, new changes can be pushed after creation. We need merge to work the same way, when changes have been made after the first merge, a second one should work. Remove pinned todo list (vibe-kanban cc66cda2) Make a minimal change to remove the pinned todo list from the frontend Remove pinned todo list (vibe-kanban cc66cda2) Make a minimal change to remove the pinned todo list from the frontend * Create merges table; remove task_attempt.merge_commit Add merge model, replace ta.merge_commit with m.merge_commit Fix frontend * Move PR to merges table * Refactor GitHub repository info retrieval to return structured data * Fix frontend * Reset task branch after PR merge Add branch status handling to TaskDetailsProvider and related components fmt Add branch status handling to TaskDetailsProvider and related components fmt Test (vibe-kanban 1bf1a80f) add test.txt Show merged diff when no worktree present Refresh branch status after PR creation Test (vibe-kanban 1bf1a80f) add test.txt Test (vibe-kanban 1bf1a80f) add test.txt Show rebase when behind Refactor container service to check if the container is clean before showing merged diff; remove unused BranchStatus import Test (vibe-kanban a3c1b297) add test.txt Refactor branch status handling: rename BranchStatusResponse to BranchStatus and update related types and usages Test (vibe-kanban) (#540) * Remove test.txt * Test (vibe-kanban aade357e) add test.txt * test.txt removed. * Fix diff when merged and new commits have been made * Remvoe logging (vibe-kanban) (#541) * Test (vibe-kanban aade357e) add test.txt * Test (vibe-kanban aade357e) add test.txt * Perfect! I've successfully removed the "Fetching branch status" logging statement from the code. The logging has been removed from `crates/server/src/routes/task_attempts.rs:568-571`. * Clear previous errors on successful PR creation, push, merge, and rebase actions * Show branch in worktree dirty error message * Add success indicators for push and merge actions in CurrentAttempt * Refactor status display logic in CurrentAttempt for improved readability and maintainability * Add target_branch_name to merge models and queries for direct and PR merges * Enhance merge status display logic in CurrentAttempt for better clarity on direct merges * Remove unnecessary condition check in attempt data fetching interval * Clippy * Add index for task_attempt_id in merges table to improve query performance * Pass PR creation error * Disable buttons (vibe-kanban 240346bf) Instead of not showing the merge/pr buttons when theyre not available we should disable them. frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx
2025-08-21 16:00:35 +01:00
// Check if PR is merged - if so, block follow-ups
if (branchStatus?.merges) {
const mergedPR = branchStatus.merges.find(
(m) => m.type === 'pr' && m.pr_info.status === 'merged'
);
if (mergedPR) {
return false;
}
}
return true;
}, [
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
selectedAttemptId,
Remove task attempt activity (vibe-kanban) (#242) * ## Summary I have successfully completed the task to remove the task attempt activity functionality from the codebase. Here's what was accomplished: ### ✅ **Completed Work:** 1. **Database Migration**: Created `backend/migrations/20250717000000_drop_task_attempt_activities.sql` to drop the `task_attempt_activities` table and its indexes 2. **Backend Cleanup**: - Deleted `backend/src/models/task_attempt_activity.rs` model file - Removed imports and exports from `backend/src/models/mod.rs` - Cleaned up all references in `backend/src/routes/task_attempts.rs`: - Removed `get_task_attempt_activities` and `create_task_attempt_activity` functions - Removed the API route endpoints - Removed activity creation calls in process stop handlers - Updated `backend/src/services/process_service.rs` to remove activity creation - Updated `backend/src/execution_monitor.rs` to remove activity creation throughout the execution flow - Removed type exports from `backend/src/bin/generate_types.rs` 3. **Frontend Cleanup**: - Regenerated TypeScript types (TaskAttemptActivity types automatically removed) - Removed `getActivities` API function from `frontend/src/lib/api.ts` - Deleted `frontend/src/components/tasks/TaskActivityHistory.tsx` component - Updated `frontend/src/lib/types.ts` to remove activity references - Updated `frontend/src/components/context/TaskDetailsContextProvider.tsx` to fetch only processes (no activities) - Updated `frontend/src/components/tasks/TaskFollowUpSection.tsx` to determine follow-up eligibility based on completed coding agent processes instead of activities 4. **Build Verification**: Both backend (Rust) and frontend (TypeScript) build successfully ### ⚠️ **Remaining Issue:** There's one SQL query in `backend/src/models/task.rs` that still references the `task_attempt_activities` table. The query has become malformed during the editing process. This needs to be fixed to complete the task. The functionality has been successfully removed with no compilation errors in the main application code. The only remaining work is to fix the SQL query that determines task status based on execution process states rather than activities. * update queries * clippy * prettier * mark task as failed or killed * sql rebase fixes
2025-07-17 14:56:44 +01:00
attemptData.processes,
isSendingFollowUp,
Allow multiple merges (#510) * Allow multiple merge for a single task attempt Merge more than once (vibe-kanban 618829fc) When creating a PR, new changes can be pushed after creation. We need merge to work the same way, when changes have been made after the first merge, a second one should work. Commit changes from coding agent for task attempt 548ff450-df77-47b2-a5ba-c88d0aa4a334 Merge more than once (vibe-kanban 618829fc) When creating a PR, new changes can be pushed after creation. We need merge to work the same way, when changes have been made after the first merge, a second one should work. Remove pinned todo list (vibe-kanban cc66cda2) Make a minimal change to remove the pinned todo list from the frontend Remove pinned todo list (vibe-kanban cc66cda2) Make a minimal change to remove the pinned todo list from the frontend * Create merges table; remove task_attempt.merge_commit Add merge model, replace ta.merge_commit with m.merge_commit Fix frontend * Move PR to merges table * Refactor GitHub repository info retrieval to return structured data * Fix frontend * Reset task branch after PR merge Add branch status handling to TaskDetailsProvider and related components fmt Add branch status handling to TaskDetailsProvider and related components fmt Test (vibe-kanban 1bf1a80f) add test.txt Show merged diff when no worktree present Refresh branch status after PR creation Test (vibe-kanban 1bf1a80f) add test.txt Test (vibe-kanban 1bf1a80f) add test.txt Show rebase when behind Refactor container service to check if the container is clean before showing merged diff; remove unused BranchStatus import Test (vibe-kanban a3c1b297) add test.txt Refactor branch status handling: rename BranchStatusResponse to BranchStatus and update related types and usages Test (vibe-kanban) (#540) * Remove test.txt * Test (vibe-kanban aade357e) add test.txt * test.txt removed. * Fix diff when merged and new commits have been made * Remvoe logging (vibe-kanban) (#541) * Test (vibe-kanban aade357e) add test.txt * Test (vibe-kanban aade357e) add test.txt * Perfect! I've successfully removed the "Fetching branch status" logging statement from the code. The logging has been removed from `crates/server/src/routes/task_attempts.rs:568-571`. * Clear previous errors on successful PR creation, push, merge, and rebase actions * Show branch in worktree dirty error message * Add success indicators for push and merge actions in CurrentAttempt * Refactor status display logic in CurrentAttempt for improved readability and maintainability * Add target_branch_name to merge models and queries for direct and PR merges * Enhance merge status display logic in CurrentAttempt for better clarity on direct merges * Remove unnecessary condition check in attempt data fetching interval * Clippy * Add index for task_attempt_id in merges table to improve query performance * Pass PR creation error * Disable buttons (vibe-kanban 240346bf) Instead of not showing the merge/pr buttons when theyre not available we should disable them. frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx
2025-08-21 16:00:35 +01:00
branchStatus?.merges,
]);
const canSendFollowUp = useMemo(() => {
if (!canTypeFollowUp) {
return false;
}
// Allow sending if either review comments exist OR follow-up message is present
return Boolean(reviewMarkdown || followUpMessage.trim());
}, [canTypeFollowUp, reviewMarkdown, followUpMessage]);
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
const currentProfile = useMemo(() => {
if (!selectedProfile || !profiles) return null;
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
return profiles?.[selectedProfile];
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
}, [selectedProfile, profiles]);
// Update selectedVariant when defaultFollowUpVariant changes
useEffect(() => {
setSelectedVariant(defaultFollowUpVariant);
}, [defaultFollowUpVariant]);
// Subscribe to follow-up draft SSE stream for this attempt
type DraftStreamState = { follow_up_draft: FollowUpDraft };
const draftStreamEndpoint = selectedAttemptId
? `/api/task-attempts/${selectedAttemptId}/follow-up-draft/stream`
: undefined;
const makeInitialDraftData = useCallback(
() => ({
follow_up_draft: {
id: '',
task_attempt_id: selectedAttemptId || '',
prompt: '',
queued: false,
sending: false,
variant: null,
image_ids: [],
// version used only for local comparison; server will patch real value
version: 0 as unknown,
created_at: new Date().toISOString() as unknown,
updated_at: new Date().toISOString() as unknown,
} as any,
}),
[selectedAttemptId]
);
const {
data: draftStream,
isConnected: draftStreamConnected,
error: draftStreamError,
} = useJsonPatchStream<DraftStreamState>(
draftStreamEndpoint,
!!draftStreamEndpoint,
makeInitialDraftData
);
// One-shot hydration via REST to avoid waiting on SSE, and to handle environments
// where SSE connects but initial event is delayed or blocked.
useEffect(() => {
let cancelled = false;
const hydrateOnce = async () => {
if (!selectedAttemptId) return;
try {
const draft = await attemptsApi.getFollowUpDraft(selectedAttemptId);
if (cancelled) return;
suppressNextSaveRef.current = true;
const incomingVersion = draft?.version
? Number(draft.version as unknown)
: 0;
lastServerVersionRef.current = incomingVersion;
setFollowUpMessage(draft.prompt || '');
setIsQueued(!!draft.queued);
if (draft.variant !== undefined && draft.variant !== null)
setSelectedVariant(draft.variant);
// Load images if present
if (draft.image_ids && draft.image_ids.length > 0) {
const all = await imagesApi.getTaskImages(task.id);
if (cancelled) return;
const wantIds = new Set(draft.image_ids);
setImages(all.filter((img) => wantIds.has(img.id)));
} else {
setImages([]);
}
if (!isDraftReady) setIsDraftReady(true);
} catch {
// ignore, rely on SSE/poll fallback
}
};
hydrateOnce();
return () => {
cancelled = true;
};
}, [selectedAttemptId]);
// Cleanup timers on unmount
useEffect(() => {
return () => {
if (statusFadeTimerRef.current)
window.clearTimeout(statusFadeTimerRef.current);
if (statusClearTimerRef.current)
window.clearTimeout(statusClearTimerRef.current);
};
}, []);
useEffect(() => {
if (!draftStream) return;
const d = draftStream.follow_up_draft as FollowUpDraft;
// Ignore synthetic initial placeholder until real SSE snapshot arrives
if ((d as any).id === '') {
return;
}
const incomingVersion = d?.version ? Number(d.version as unknown) : 0;
// Always reflect queued/sending flags immediately
setIsQueued(!!d.queued);
const sendingNow = !!(d as any).sending;
setIsDraftSending(sendingNow);
// If server indicates we're sending, ensure the editor is cleared for clarity.
if (sendingNow) {
// Edge trigger: show Sent pill once
if (!prevSendingRef.current) {
scheduleSentStatus();
}
// Show a quick fade-out of the prior content while clearing the actual textarea value
if (followUpMessage !== '') {
if (overlayFadeTimerRef.current)
window.clearTimeout(overlayFadeTimerRef.current);
if (overlayHideTimerRef.current)
window.clearTimeout(overlayHideTimerRef.current);
// Lock container height to avoid jump while autosize recomputes
if (wrapperRef.current) {
const h = wrapperRef.current.getBoundingClientRect().height;
setLockedMinHeight(h);
}
setFadeOverlayText(followUpMessage);
setShowFadeOverlay(true);
// Start fully visible
setOverlayFadeClass('opacity-100');
// Clear textarea immediately under the overlay
setFollowUpMessage('');
// Trigger fast fade on next tick (no motion), then remove overlay shortly after
overlayFadeTimerRef.current = window.setTimeout(
() => setOverlayFadeClass('opacity-0'),
20
);
overlayHideTimerRef.current = window.setTimeout(() => {
setShowFadeOverlay(false);
setFadeOverlayText('');
setOverlayFadeClass('');
// Release height lock shortly after fade completes
setLockedMinHeight(null);
}, 180);
}
if (images.length > 0) setImages([]);
if (newlyUploadedImageIds.length > 0) setNewlyUploadedImageIds([]);
if (showImageUpload) setShowImageUpload(false);
}
prevSendingRef.current = sendingNow;
// Skip if this is a duplicate of what we already processed
if (incomingVersion === lastServerVersionRef.current) {
if (!isDraftReady) setIsDraftReady(true);
return;
}
// Mark that next local change shouldn't auto-save (we're syncing from server)
suppressNextSaveRef.current = true;
// Initial hydration: avoid clobbering locally typed text with empty server prompt
if (lastServerVersionRef.current === -1) {
if (!localDirtyRef.current && !sendingNow) {
setFollowUpMessage(d.prompt || '');
}
if (d.variant !== undefined) setSelectedVariant(d.variant);
lastServerVersionRef.current = incomingVersion;
}
// Real server-side change: adopt new prompt/variant
if (incomingVersion > lastServerVersionRef.current) {
// If sending, keep the editor clear regardless of server prompt value
setFollowUpMessage(sendingNow ? '' : d.prompt || '');
if (d.variant !== undefined) setSelectedVariant(d.variant);
localDirtyRef.current = false;
lastServerVersionRef.current = incomingVersion;
}
if (!d.image_ids || d.image_ids.length === 0) {
setImages([]);
setNewlyUploadedImageIds([]);
setShowImageUpload(false);
} else {
// Load attached images for this draft by IDs
const wantIds = new Set(d.image_ids);
const haveIds = new Set(images.map((img) => img.id));
let mismatch = false;
if (images.length !== wantIds.size) mismatch = true;
else
for (const id of wantIds)
if (!haveIds.has(id)) {
mismatch = true;
break;
}
if (mismatch) {
imagesApi
.getTaskImages(task.id)
.then((all) => {
setImages(all.filter((img) => wantIds.has(img.id)));
setNewlyUploadedImageIds([]);
})
.catch(() => void 0);
}
}
if (!isDraftReady) setIsDraftReady(true);
}, [draftStream]);
// Cleanup overlay timers
useEffect(() => {
return () => {
if (overlayFadeTimerRef.current)
window.clearTimeout(overlayFadeTimerRef.current);
if (overlayHideTimerRef.current)
window.clearTimeout(overlayHideTimerRef.current);
};
}, []);
// Fallback: if running inside VSCode iframe and SSE isn't connected, poll the draft endpoint to keep UI in sync
const pollTimerRef = useRef<number | undefined>(undefined);
useEffect(() => {
if (!selectedAttemptId) return;
const shouldPoll =
inIframe() && (!draftStreamConnected || !!draftStreamError);
if (!shouldPoll) {
if (pollTimerRef.current) window.clearInterval(pollTimerRef.current);
pollTimerRef.current = undefined;
return;
}
const pollOnce = async () => {
try {
const draft = await attemptsApi.getFollowUpDraft(selectedAttemptId);
// Update immediate state, similar to SSE handler
setIsQueued(!!draft.queued);
// Polling response does not include 'sending'; preserve previous sending state
const incomingVersion = draft?.version
? Number(draft.version as unknown)
: 0;
if (incomingVersion !== lastServerVersionRef.current) {
suppressNextSaveRef.current = true;
setFollowUpMessage(draft.prompt || '');
if (draft.variant !== undefined && draft.variant !== null)
setSelectedVariant(draft.variant);
lastServerVersionRef.current = incomingVersion;
// images not included in response type for polling; leave as-is
}
if (!isDraftReady) setIsDraftReady(true);
} catch {
// ignore
}
};
// Prime once, then interval
pollOnce();
pollTimerRef.current = window.setInterval(pollOnce, 1000);
return () => {
if (pollTimerRef.current) window.clearInterval(pollTimerRef.current);
pollTimerRef.current = undefined;
};
}, [selectedAttemptId, draftStreamConnected, draftStreamError]);
// Debounced persist draft on message or variant change (only while not queued)
useEffect(() => {
if (!selectedAttemptId) return;
// skip saving if currently sending follow-up; it will be cleared on success
if (isSendingFollowUp) return;
// also skip while server is sending a queued draft
if (isDraftSending) return;
// skip saving while queue/unqueue transitions are in-flight
if (isQueuing || isUnqueuing) return;
if (suppressNextSaveRef.current) {
suppressNextSaveRef.current = false;
return;
}
// Only save when not queued (edit mode)
if (isQueued) return;
const saveDraft = async () => {
const d = draftStream?.follow_up_draft;
const payload: any = {} as UpdateFollowUpDraftRequest;
// prompt change
if (d && followUpMessage !== (d.prompt || '')) {
payload.prompt = followUpMessage;
}
// variant change (string | null)
if ((d?.variant ?? null) !== (selectedVariant ?? null)) {
payload.variant = selectedVariant as any; // may be null
}
// images change (compare ids)
const currentIds = images.map((img) => img.id);
const serverIds = (d?.image_ids as string[] | undefined) ?? [];
const idsEqual =
currentIds.length === serverIds.length &&
currentIds.every((id, i) => id === serverIds[i]);
if (!idsEqual) {
payload.image_ids = currentIds;
}
// If no field changed, skip network
const keys = Object.keys(payload).filter((k) => k !== 'version');
if (keys.length === 0) return;
const payloadKey = JSON.stringify(payload);
if (payloadKey === lastSentRef.current) return;
lastSentRef.current = payloadKey;
try {
setIsSaving(true);
setSaveStatus(navigator.onLine ? 'saving' : 'offline');
await attemptsApi.saveFollowUpDraft(selectedAttemptId, payload);
// pleasant linger + fade-out
scheduleSavedStatus();
} catch (e: unknown) {
// On conflict or error, silently adopt server state
try {
const draft = await attemptsApi.getFollowUpDraft(selectedAttemptId);
suppressNextSaveRef.current = true;
setFollowUpMessage(draft.prompt || '');
setIsQueued(!!draft.queued);
if (draft.variant !== undefined && draft.variant !== null) {
setSelectedVariant(draft.variant);
}
if (draft.version !== undefined && draft.version !== null) {
lastServerVersionRef.current = Number(draft.version as unknown);
}
} catch {
/* empty */
}
setSaveStatus(navigator.onLine ? 'idle' : 'offline');
} finally {
setIsSaving(false);
}
};
// debounce 400ms
if (saveTimeoutRef.current) window.clearTimeout(saveTimeoutRef.current);
saveTimeoutRef.current = (
window.setTimeout as unknown as (
handler: () => void,
timeout?: number
) => number
)(saveDraft, 400);
return () => {
if (saveTimeoutRef.current) window.clearTimeout(saveTimeoutRef.current);
};
}, [
followUpMessage,
selectedVariant,
isQueued,
selectedAttemptId,
isSendingFollowUp,
isQueuing,
isUnqueuing,
]);
// Remove BroadcastChannel — SSE is authoritative
// (removed duplicate SSE subscription block)
const handleImageUploaded = useCallback((image: ImageResponse) => {
const markdownText = `![${image.original_name}](${image.file_path})`;
setFollowUpMessage((prev) => {
if (prev.trim() === '') {
return markdownText;
} else {
return prev + ' ' + markdownText;
}
});
setImages((prev) => [...prev, image]);
setNewlyUploadedImageIds((prev) => [...prev, image.id]);
}, []);
// Use the centralized keyboard shortcut hook for cycling through variants
useVariantCyclingShortcut({
currentProfile,
selectedVariant,
setSelectedVariant,
setIsAnimating,
});
const onSendFollowUp = async () => {
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
if (!task || !selectedAttemptId) return;
// Combine review markdown and follow-up message
const extraMessage = followUpMessage.trim();
const finalPrompt = [reviewMarkdown, extraMessage]
.filter(Boolean)
.join('\n\n');
if (!finalPrompt) return;
try {
setIsSendingFollowUp(true);
setFollowUpError(null);
// Use newly uploaded image IDs if available, otherwise use all image IDs
const imageIds =
newlyUploadedImageIds.length > 0
? newlyUploadedImageIds
: images.length > 0
? images.map((img) => img.id)
: null;
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
await attemptsApi.followUp(selectedAttemptId, {
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
prompt: finalPrompt,
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
variant: selectedVariant,
image_ids: imageIds,
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
});
setFollowUpMessage('');
// Clear review comments and reset queue state after successful submission
clearComments();
setIsQueued(false);
// Clear images and newly uploaded IDs after successful submission
setImages([]);
setNewlyUploadedImageIds([]);
setShowImageUpload(false);
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
jumpToLogsTab();
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
// No need to manually refetch - React Query will handle this
} catch (error: unknown) {
// @ts-expect-error it is type ApiError
setFollowUpError(`Failed to start follow-up execution: ${error.message}`);
} finally {
setIsSendingFollowUp(false);
}
};
// Derived UI lock: disallow edits/actions while queued or transitioning
const isDraftLocked = isQueued || isQueuing || isUnqueuing || isDraftSending;
const isInputDisabled = isDraftLocked || !isDraftReady;
// Queue handler: ensure draft is persisted immediately, then toggle queued
const onQueue = async () => {
if (!selectedAttemptId) return;
if (isQueuing || isQueued) return;
const hasContent = followUpMessage.trim().length > 0;
if (!hasContent) return;
try {
// Prevent any pending debounced save from racing
if (saveTimeoutRef.current) window.clearTimeout(saveTimeoutRef.current);
suppressNextSaveRef.current = true;
setIsQueuing(true);
// Optimistically reflect queued state to block edits/buttons immediately
setIsQueued(true);
setIsSaving(true);
setSaveStatus(navigator.onLine ? 'saving' : 'offline');
// 1) Force-save current draft so the row exists and is up to date (no version to avoid conflicts)
const immediatePayload: any = {
// Do NOT send version here to avoid spurious 409; we'll use the returned version for queueing
prompt: followUpMessage,
} as UpdateFollowUpDraftRequest;
if (
(draftStream?.follow_up_draft?.variant ?? null) !==
(selectedVariant ?? null)
) {
immediatePayload.variant = selectedVariant as any;
}
const currentIds = images.map((img) => img.id);
const serverIds =
(draftStream?.follow_up_draft?.image_ids as string[] | undefined) ?? [];
const idsEqual =
currentIds.length === serverIds.length &&
currentIds.every((id, i) => id === serverIds[i]);
if (!idsEqual) {
immediatePayload.image_ids = currentIds;
}
await attemptsApi.saveFollowUpDraft(selectedAttemptId, immediatePayload);
// 2) Queue with optimistic concurrency using latest version from save
try {
const resp = await attemptsApi.setFollowUpQueue(
selectedAttemptId,
true
);
// Immediate local sync to avoid waiting for SSE
if (resp?.version !== undefined) {
lastServerVersionRef.current = Number(resp.version as unknown);
}
setIsQueued(!!resp.queued);
if (resp.variant !== undefined && resp.variant !== null) {
setSelectedVariant(resp.variant);
}
} catch (err: unknown) {
// On any error, silently adopt server state
const latest = await attemptsApi.getFollowUpDraft(selectedAttemptId);
suppressNextSaveRef.current = true;
if (latest.version !== undefined && latest.version !== null) {
lastServerVersionRef.current = Number(latest.version as unknown);
}
setIsQueued(!!latest.queued);
if (latest.variant !== undefined && latest.variant !== null) {
setSelectedVariant(latest.variant);
}
}
// Do not show "Saved" for queue; right side shows Queued; a "Sent" pill will appear when sending starts
setSaveStatus('idle');
} catch (e: unknown) {
// On any error, hard refresh to server truth
try {
const draft = await attemptsApi.getFollowUpDraft(selectedAttemptId);
suppressNextSaveRef.current = true;
setFollowUpMessage(draft.prompt || '');
setIsQueued(!!draft.queued);
if (draft.variant !== undefined && draft.variant !== null) {
setSelectedVariant(draft.variant);
}
if (draft.version !== undefined && draft.version !== null) {
lastServerVersionRef.current = Number(draft.version as unknown);
}
} catch {
/* empty */
}
setSaveStatus(navigator.onLine ? 'idle' : 'offline');
} finally {
setIsSaving(false);
setIsQueuing(false);
}
};
// (Removed) auto-unqueue logic — editing is explicit and guarded by a lock now
return (
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
selectedAttemptId && (
<div className="border-t p-4 focus-within:ring ring-inset">
<div className="space-y-2">
{followUpError && (
<Alert variant="destructive">
<AlertCircle className="h-4 w-4" />
<AlertDescription>{followUpError}</AlertDescription>
</Alert>
)}
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
<div className="space-y-2">
{showImageUpload && (
<div className="mb-2">
<ImageUploadSection
images={images}
onImagesChange={setImages}
onUpload={imagesApi.upload}
onDelete={imagesApi.delete}
onImageUploaded={handleImageUploaded}
disabled={!canSendFollowUp || isDraftLocked || !isDraftReady}
collapsible={false}
defaultExpanded={true}
/>
</div>
)}
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
{/* Review comments preview */}
{reviewMarkdown && (
<div className="text-sm mb-4">
<div className="whitespace-pre-wrap">{reviewMarkdown}</div>
</div>
)}
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
<div className="flex flex-col gap-2">
<div
ref={wrapperRef}
className="relative"
style={
lockedMinHeight
? ({ minHeight: lockedMinHeight } as any)
: undefined
}
>
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
<FileSearchTextarea
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
placeholder={
isQueued
? 'Type your follow-up… It will auto-send when ready.'
: reviewMarkdown
? '(Optional) Add additional instructions... Type @ to search files.'
: 'Continue working on this task attempt... Type @ to search files.'
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
}
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
value={followUpMessage}
onChange={(value) => {
setFollowUpMessage(value);
localDirtyRef.current = true;
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
if (followUpError) setFollowUpError(null);
}}
onKeyDown={(e) => {
if ((e.metaKey || e.ctrlKey) && e.key === 'Enter') {
e.preventDefault();
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
if (canSendFollowUp && !isSendingFollowUp) {
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
onSendFollowUp();
}
} else if (e.key === 'Escape') {
// Clear input and auto-cancel queue
e.preventDefault();
setFollowUpMessage('');
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
}
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
}}
className={cn(
'flex-1 min-h-[40px] resize-none',
showFadeOverlay && 'placeholder-transparent'
)}
// Edits are disallowed while queued or in transition
disabled={isInputDisabled}
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
projectId={projectId}
rows={1}
maxRows={6}
/>
{showFadeOverlay && fadeOverlayText && (
<div
className={cn(
'pointer-events-none select-none absolute inset-0 px-3 py-2 text-sm whitespace-pre-wrap text-foreground/70 transition-opacity duration-150 ease-out z-10',
overlayFadeClass
)}
aria-hidden
>
{fadeOverlayText}
</div>
)}
{(isUnqueuing || !isDraftReady) && (
<div className="pointer-events-none absolute inset-0 flex items-center justify-center bg-background/60 z-20">
<Loader2 className="animate-spin h-4 w-4" />
</div>
)}
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
</div>
{/* Status row: reserved space above action buttons to avoid layout shift */}
<div className="flex items-center justify-between text-xs min-h-6 h-6 px-0.5">
{/* Left side: save state or conflicts */}
<div className="text-muted-foreground">
{saveStatus === 'saving' ? (
<span
className={cn(
'inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 bg-muted animate-in fade-in-0',
isSaving && 'italic'
)}
>
<Loader2 className="animate-spin h-3 w-3" /> Saving
</span>
) : saveStatus === 'offline' ? (
<span className="inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 bg-muted text-amber-700 animate-in fade-in-0">
<WifiOff className="h-3 w-3" /> Offline changes pending
</span>
) : saveStatus === 'saved' ? (
<span
className={cn(
'inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 bg-muted text-emerald-700 transition-opacity duration-200 animate-in fade-in-0',
isStatusFading && 'opacity-0'
)}
>
<CheckCircle2 className="h-3 w-3" /> Saved
</span>
) : saveStatus === 'sent' ? (
<span
className={cn(
'inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 bg-muted text-emerald-700 transition-opacity duration-200 animate-in fade-in-0',
isStatusFading && 'opacity-0'
)}
>
<Send className="h-3 w-3" /> Sent
</span>
) : null}
</div>
{/* Right side: queued/sending status */}
<div className="text-muted-foreground">
{isUnqueuing ? (
<span className="inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 bg-muted animate-in fade-in-0">
<Loader2 className="animate-spin h-3 w-3" /> Unlocking
</span>
) : !isDraftReady ? (
<span className="inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 bg-muted animate-in fade-in-0">
<Loader2 className="animate-spin h-3 w-3" /> Loading
draft
</span>
) : isDraftSending ? (
<span className="inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 bg-muted animate-in fade-in-0">
<Loader2 className="animate-spin h-3 w-3" /> Sending
follow-up
</span>
) : isQueued ? (
<span className="inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 bg-muted animate-in fade-in-0">
<Clock className="h-3 w-3" /> Queued for next turn. Edits
are locked.
</span>
) : null}
</div>
</div>
<div className="flex flex-row items-center">
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
<div className="flex-1 flex gap-2">
{/* Image button */}
<Button
variant="secondary"
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
size="sm"
onClick={() => setShowImageUpload(!showImageUpload)}
disabled={
!canSendFollowUp || isDraftLocked || !isDraftReady
}
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
>
<ImageIcon
className={cn(
'h-4 w-4',
(images.length > 0 || showImageUpload) && 'text-primary'
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
)}
/>
</Button>
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
{/* Variant selector */}
{(() => {
const hasVariants =
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
currentProfile && Object.keys(currentProfile).length > 0;
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
if (hasVariants) {
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
ref={variantButtonRef}
variant="secondary"
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
size="sm"
className={cn(
'w-24 px-2 flex items-center justify-between transition-all',
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
isAnimating && 'scale-105 bg-accent'
)}
disabled={isDraftLocked || !isDraftReady}
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
>
<span className="text-xs truncate flex-1 text-left">
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
{selectedVariant || 'DEFAULT'}
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
</span>
<ChevronDown className="h-3 w-3 ml-1 flex-shrink-0" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent>
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
{Object.entries(currentProfile).map(
([variantLabel]) => (
<DropdownMenuItem
key={variantLabel}
onClick={() =>
setSelectedVariant(variantLabel)
}
className={
selectedVariant === variantLabel
? 'bg-accent'
: ''
}
>
{variantLabel}
</DropdownMenuItem>
)
)}
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
</DropdownMenuContent>
</DropdownMenu>
);
} else if (currentProfile) {
// Show disabled button when profile exists but has no variants
return (
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
<Button
ref={variantButtonRef}
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
variant="outline"
size="sm"
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
className="h-10 w-24 px-2 flex items-center justify-between transition-all"
disabled
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
>
<span className="text-xs truncate flex-1 text-left">
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
Default
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
</span>
</Button>
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
);
}
return null;
})()}
</div>
{/* (removed) old inline notices now replaced by the status row above */}
{isAttemptRunning ? (
<Button
onClick={stopExecution}
disabled={isStopping}
size="sm"
variant="destructive"
>
{isStopping ? (
<Loader2 className="animate-spin h-4 w-4 mr-2" />
) : (
<>
<StopCircle className="h-4 w-4 mr-2" />
Stop
</>
)}
</Button>
) : (
<div className="flex items-center gap-2">
{comments.length > 0 && (
<Button
onClick={clearComments}
size="sm"
variant="destructive"
>
Clear Review Comments
</Button>
)}
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
<Button
onClick={onSendFollowUp}
disabled={
!canSendFollowUp ||
isDraftLocked ||
!isDraftReady ||
!followUpMessage.trim() ||
isSendingFollowUp
}
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
size="sm"
>
{isSendingFollowUp ? (
<Loader2 className="animate-spin h-4 w-4 mr-2" />
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
) : (
<>
<Send className="h-4 w-4 mr-2" />
Send
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
</>
)}
</Button>
{isQueued && (
<Button
variant="default"
size="sm"
className="min-w-[180px] transition-all"
onClick={async () => {
if (!selectedAttemptId) return;
try {
if (saveTimeoutRef.current)
window.clearTimeout(saveTimeoutRef.current);
suppressNextSaveRef.current = true;
setIsUnqueuing(true);
try {
const resp = await attemptsApi.setFollowUpQueue(
selectedAttemptId,
false
);
if (resp?.version !== undefined) {
lastServerVersionRef.current = Number(
resp.version as unknown
);
}
setIsQueued(!!resp.queued);
} catch (err: unknown) {
// On any error (including 409), hard refresh and adopt server state
const latest =
await attemptsApi.getFollowUpDraft(
selectedAttemptId
);
suppressNextSaveRef.current = true;
setFollowUpMessage(latest.prompt || '');
setIsQueued(!!latest.queued);
if (
latest.variant !== undefined &&
latest.variant !== null
) {
setSelectedVariant(latest.variant);
}
if (
latest.version !== undefined &&
latest.version !== null
) {
lastServerVersionRef.current = Number(
latest.version as unknown
);
}
}
} catch (e) {
console.error('Failed to unqueue for editing', e);
} finally {
setIsUnqueuing(false);
}
}}
disabled={isUnqueuing}
>
{isUnqueuing ? (
<>
<Loader2 className="animate-spin h-4 w-4 mr-2" />
Unqueuing
</>
) : (
'Edit'
)}
</Button>
)}
</div>
)}
{isAttemptRunning && (
<div className="ml-2 flex items-center gap-2">
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
<Button
onClick={async () => {
if (!selectedAttemptId) return;
if (isQueued) {
try {
if (saveTimeoutRef.current)
window.clearTimeout(saveTimeoutRef.current);
suppressNextSaveRef.current = true;
setIsUnqueuing(true);
try {
const resp = await attemptsApi.setFollowUpQueue(
selectedAttemptId,
false
);
if (resp?.version !== undefined) {
lastServerVersionRef.current = Number(
resp.version as unknown
);
}
setIsQueued(!!resp.queued);
} catch (err: unknown) {
// On any error (including 409), hard refresh and adopt server state
const latest =
await attemptsApi.getFollowUpDraft(
selectedAttemptId
);
suppressNextSaveRef.current = true;
setFollowUpMessage(latest.prompt || '');
setIsQueued(!!latest.queued);
if (
latest.variant !== undefined &&
latest.variant !== null
) {
setSelectedVariant(latest.variant);
}
if (
latest.version !== undefined &&
latest.version !== null
) {
lastServerVersionRef.current = Number(
latest.version as unknown
);
}
}
} catch (e) {
console.error('Failed to unqueue for editing', e);
} finally {
setIsUnqueuing(false);
}
} else {
await onQueue();
}
}}
disabled={
isQueued
? isUnqueuing
: !canSendFollowUp ||
!isDraftReady ||
!followUpMessage.trim() ||
isQueuing ||
isUnqueuing ||
isDraftSending
}
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
size="sm"
variant="default"
className="min-w-[180px] transition-all"
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
>
{isQueued ? (
isUnqueuing ? (
<>
<Loader2 className="animate-spin h-4 w-4 mr-2" />
Unqueuing
</>
) : (
'Edit'
)
) : isQueuing ? (
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
<>
<Loader2 className="animate-spin h-4 w-4 mr-2" />
Queuing
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
</>
) : (
'Queue for next turn'
Implement git review comments (vibe-kanban) (#654) * Perfect! I have successfully implemented the git review comments functionality. Let me provide a summary of what was implemented: ## ✅ Git Review Comments Implementation Complete The implementation leverages git-diff-view's built-in review functionality and integrates it seamlessly with the existing follow-up message system. ### 🔧 **Components Created:** 1. **ReviewProvider** ([`frontend/src/contexts/ReviewProvider.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/contexts/ReviewProvider.tsx)) - Manages comment state across all diff files - Handles draft comments and saved comments - Generates markdown for follow-up messages 2. **CommentWidgetLine** ([`frontend/src/components/diff/CommentWidgetLine.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/CommentWidgetLine.tsx)) - Textarea component for new comments - Auto-focus, keyboard shortcuts (Ctrl+Enter to save, Esc to cancel) - Save/Cancel buttons with validation 3. **ReviewCommentRenderer** ([`frontend/src/components/diff/ReviewCommentRenderer.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewCommentRenderer.tsx)) - Displays saved comments with delete functionality - Visual styling with comment icon and border 4. **ReviewSubmissionBar** ([`frontend/src/components/diff/ReviewSubmissionBar.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/diff/ReviewSubmissionBar.tsx)) - Sticky bottom bar showing comment count - Submit Review and Discard buttons ### 🔄 **Enhanced Components:** 1. **DiffCard** ([`frontend/src/components/DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx)) - Integrated git-diff-view review props - Added comment count badges - Handles click events for adding comments - Renders existing comments inline 2. **DiffTab** ([`frontend/src/components/tasks/TaskDetails/DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Wrapped with ReviewProvider - Integrated review submission workflow - Handles follow-up message API calls ### 🎯 **Key Features:** - **GitHub-style inline comments**: Click + button on hover to add comments - **Comment persistence**: Comments stay visible in diff until submitted - **Visual indicators**: Comment count badges on file headers - **Keyboard shortcuts**: Ctrl+Enter to save, Esc to cancel - **Markdown generation**: Comments formatted as review markdown for follow-up messages - **Batch submission**: Submit all comments at once as a single follow-up message ### 🔄 **User Workflow:** 1. User hovers over diff line → **+** button appears 2. Click **+** → Comment textarea opens with auto-focus 3. Type comment → Save with button or Ctrl+Enter 4. Comment appears inline in diff with delete option 5. Continue adding comments across multiple files 6. Submit Review button appears in sticky bottom bar 7. Click Submit Review → All comments sent as markdown follow-up message 8. Comments cleared and follow-up message appears in conversation The implementation is complete and ready for testing. The missing `@ebay/nice-modal-react` dependency is a pre-existing issue unrelated to the review functionality. * ## ✅ Function Signature Update Complete I successfully updated the `handleAddWidgetClick` function signature as requested: ### **Changes Made:** 1. **Updated function signature** in [`DiffCard.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/DiffCard.tsx#L129): ```ts // Before const handleAddWidgetClick = (ctx: any) => { ... } // After const handleAddWidgetClick = (lineNumber: number, side: SplitSide) => { ... } ``` 2. **Imported correct types** from git-diff-view library: ```ts import { DiffModeEnum, DiffView, type SplitSide } from '@git-diff-view/react'; ``` 3. **Updated widget key generation** to use the new parameters: ```ts // Before const widgetKey = `${ctx.filePath}-${ctx.side}-${ctx.insertedLineNumber || ctx.deletedLineNumber}`; // After const widgetKey = `${filePath}-${side}-${lineNumber}`; ``` 4. **Used filePath from component scope** instead of context parameter: - The `filePath` is now captured from the component's scope (`newName || oldName || 'unknown'`) - This is the correct pattern as the git-diff-view library doesn't need to know about repository-specific file paths 5. **Updated renderWidgetLine** to use filePath from scope: ```ts const widgetKey = `${filePath}-${props.side}-${props.lineNumber}`; ``` ### **Key Benefits:** - **Correct API compliance**: Now matches the git-diff-view v0.0.30+ API specification - **Type safety**: Uses proper SplitSide type from the library - **Cleaner separation**: File path logic stays in the UI layer where it belongs - **No functionality lost**: All required data (filePath, side, lineNumber) is still available The implementation has been tested and builds successfully. The function signature now correctly matches `(lineNumber: number, side: SplitSide) => void` as requested. * tweaks * ## ✅ Integration Complete I have successfully integrated the review comments functionality into the existing follow-up system! Here's what was implemented: ### **Key Changes:** 1. **Moved ReviewProvider to TaskDetailsPanel** ([`TaskDetailsPanel.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetailsPanel.tsx#L21)) - Now wraps both DiffTab and TaskFollowUpSection - Ensures review comments are accessible across both components 2. **Removed ReviewSubmissionBar** from DiffTab ([`DiffTab.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskDetails/DiffTab.tsx)) - Cleaned up separate submission logic - Deleted the now-unused ReviewSubmissionBar component 3. **Enhanced TaskFollowUpSection** ([`TaskFollowUpSection.tsx`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-ce81-implement/frontend/src/components/tasks/TaskFollowUpSection.tsx#L28)) - Added review comments preview above the textarea - Shows comment count and formatted markdown preview - Dynamic placeholder text based on review comments presence 4. **Unified Submission Logic** - Combines review comments markdown with optional user input - Updates `canSendFollowUp` logic to allow sending with review comments alone - Clears review comments after successful submission ### **User Experience:** - **Review Comments Preview**: When review comments exist, they appear as a formatted preview above the follow-up textarea - **Optional Additional Input**: Users can add extra instructions or leave the textarea empty - **Visual Indicators**: Comment count and MessageSquare icon show when review comments are present - **Single Send Action**: One "Send" button handles both review comments and additional follow-up text - **Contextual Placeholder**: Textarea placeholder changes to indicate additional text is optional when review comments exist ### **Workflow:** 1. User adds review comments in diff files (+ button on hover) 2. Review comments appear as preview in follow-up section 3. User can optionally add additional instructions 4. Single "Send" button submits combined content 5. Both review comments and additional text sent together as one follow-up 6. Comments cleared after successful submission The integration provides a cleaner, unified experience while maintaining all the functionality of both systems. The build passes successfully and the implementation is ready for use! * styling improvements * tsc * SplitSide * turn off useless eslint warning * clear comments btn * dark mode styles * cleanup header * fmt * edit reviews * fmt
2025-09-08 17:28:19 +01:00
)}
</Button>
</div>
)}
Overhaul UI (#577) * font * flat ui * burger menu * button styles * drag effects * search * Improve * navbar * task details header WIP * task attempt window actions * task details * split out title description component * follow up * better board spacing * Incrementally use tanstack (vibe-kanban 0c34261d) Let's refactor the codebase to remove: @frontend/src/components/context/TaskDetailsContextProvider.tsx @frontend/src/components/context/TaskDetailsContextProvider.ts Instead, we want to use @tanstack/react-query * task attempt header info * ui for dropdown * optionally disable * Create hook for attempt actions (vibe-kanban 651551d9) - Start dev server - Rebase - Create PR - Merge These should all be hooks, similar to frontend/src/hooks/useOpenInEditor.ts Their usage in two places should be standardised: - frontend/src/components/tasks/AttemptHeaderCard.tsx - frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx * dropdown positioning * color * soften colours * add new task button * editor dialog via hook * project provider * fmt * lint * follow up styling * break words * card styles * Stop executions from follow up (vibe-kanban e2a2c75b) The follow up section currently disables the 'send' button if a task attempt is running, however instead we should show a destructive 'stop' button which will perform the same functionality as 'stop attempt' frontend/src/components/tasks/TaskFollowUpSection.tsx You can see how we stop already in frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx Maybe we could make this a hook and use tanstack similar to frontend/src/hooks/useBranchStatus.ts What about making the hook more generic, to cover start/stop and status retrieval. We should also combine the hook frontend/src/hooks/useExecutionProcesses.ts * Make sure the kanban columns are always at least full height (vibe-kanban 220cb780) There can be whitespace underneath the columns, ideally there should be no whitespace - the columns should extend to the bottom of the page, even when there aren't enough tasks to fill it up all the way ![Screenshot 2025-08-27 at 14.42.41.png](.vibe-images/11efe690-ec72-4513-a7b6-49641ff170c4.png) frontend/src/pages/project-tasks.tsx * Display diff summary (vibe-kanban f1736551) If files have been changed, we should display a summary of the changes like "6 files changed, +21 -19" in the AttemptHeaderCard, to the right of the dropdown, similar to how we do at the top of the difftab. We should also add an icon button to open the task attempt in full screen and at the diff tab. frontend/src/components/tasks/AttemptHeaderCard.tsx frontend/src/components/tasks/TaskDetails/DiffTab.tsx * styles * projects * full screen max width * full screen actions * remove log * style improve * create new attempt * darkmode * scroll diffs * Refactor useCreatePR (vibe-kanban e6b76f10) The useCreatePR hook should function similarly to useOpenInEditor, in that the the popup should be rendered in some root node. This improves the reusability of this functionality. We should then update TaskDetailsPanel to make the 'create pr' button real. frontend/src/hooks/useOpenInEditor.ts frontend/src/hooks/useCreatePR.ts frontend/src/components/tasks/TaskDetailsPanel.tsx * Rebasing should cause branch status to refresh (vibe-kanban 3da4fe0f) Currently doesn't in frontend/src/components/tasks/TaskDetailsPanel.tsx * project name * Change ?view=full to /full (vibe-kanban a25483a6) * Hide TaskDetailsHeader (vibe-kanban b73697bd) If the app is running inside of VS Code * copy * Add button to open repo (vibe-kanban e447df94) Open repo in IDE button in the navbar, next to create task button * style process cards * Errors not displayed properly (vibe-kanban fb65eb03) frontend/src/components/tasks/TaskDetailsToolbar.tsx Errors are currently failing silently on actions like merge and rebase * fmt * fix * fix border
2025-08-27 23:59:26 +01:00
</div>
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
</div>
</div>
</div>
</div>
)
);
}