-
-
Notifications
You must be signed in to change notification settings - Fork 752
feat: add commit button for staged changes after merge #574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
When using "Merge (Stage Only)", users can now commit the staged changes directly from the UI with an AI-generated commit message. Features: - Add IPC handler to commit staged changes using suggested_commit_message.txt - Show commit button in both StagedSuccessMessage and StagedInProjectMessage - Update task status to 'done' after successful commit - Full i18n support (EN/FR) for all UI text This allows users to review staged changes and commit when ready, without needing to use the terminal.
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughAdded a new IPC handler and frontend API/UI to commit staged Git changes for a task worktree, plus a new IPC channel constant and i18n strings. The handler validates task/worktree, checks staged files, resolves a commit message, runs git commit, updates implementation_plan.json files, emits status, and returns the result. Changes
Sequence Diagram(s)sequenceDiagram
participant Renderer as Renderer (Task UI)
participant Preload as Preload/API
participant Main as Main Process (IPC)
participant Git as Git (CLI)
participant FS as Filesystem
Renderer->>Preload: commitStagedChanges(taskId, customMessage?)
Preload->>Main: TASK_WORKTREE_COMMIT_STAGED(taskId, customMessage)
Main->>Main: validate task, project, locate worktree
Main->>Git: git diff --staged --name-only
alt staged changes found
Main->>Main: resolve commitMessage (custom / suggested / default)
Main->>Git: git commit -m "message"
par update implementation plans
Main->>FS: update implementation_plan.json (project)
Main->>FS: update implementation_plan.json (worktree)
end
Main->>Renderer: emit TASK_STATUS_CHANGE ('done')
Main-->>Preload: { success: true, committed: true, message }
else none / error
Main-->>Preload: { success: false, error }
end
Preload-->>Renderer: return IPCResult
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (3)apps/frontend/src/**/*.{ts,tsx,jsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
apps/frontend/src/**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
apps/frontend/**/*.{ts,tsx}⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @doublefx, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the user workflow by integrating a direct commit functionality into the task review interface. It allows users to commit staged changes, review and modify the commit message, and automatically update task status, all within the application, thereby simplifying the post-merge process and reducing reliance on external tools. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a valuable feature by adding a 'Commit Changes' button to the UI, streamlining the workflow for developers. The implementation is well-thought-out, covering both the backend IPC handler and the frontend components, including internationalization. The code is generally clean and follows good practices. I've identified one high-severity issue regarding data consistency in the backend and a medium-severity issue with hardcoded strings on the frontend. Once these are addressed, this will be a solid addition to the application.
apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
apps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx (2)
16-25: Hardcoded default message violates i18n guidelines.The
LoadingMessagecomponent uses a hardcoded default message. Per coding guidelines, all user-facing text should use i18n translation keys.🔎 Proposed fix
+import { useTranslation } from 'react-i18next'; -export function LoadingMessage({ message = 'Loading workspace info...' }: LoadingMessageProps) { +export function LoadingMessage({ message }: LoadingMessageProps) { + const { t } = useTranslation('taskReview'); + const displayMessage = message || t('loading.workspaceInfo'); return ( <div className="rounded-xl border border-border bg-secondary/30 p-4"> <div className="flex items-center gap-2 text-muted-foreground"> <Loader2 className="h-4 w-4 animate-spin" /> - <span className="text-sm">{message}</span> + <span className="text-sm">{displayMessage}</span> </div> </div> ); }
53-86: Pre-existing hardcoded strings in NoWorkspaceMessage.While not introduced by this PR, the
NoWorkspaceMessagecomponent contains hardcoded user-facing strings (lines 57, 59-60, 75, 79-81) that should use translation keys for consistency with the updatedStagedInProjectMessagecomponent. Based on learnings and coding guidelines, all user-facing text should use i18n.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
apps/frontend/package-lock.jsonis excluded by!**/package-lock.json,!**/package-lock.json
📒 Files selected for processing (8)
apps/frontend/src/main/ipc-handlers/task/worktree-handlers.tsapps/frontend/src/preload/api/task-api.tsapps/frontend/src/renderer/components/task-detail/TaskReview.tsxapps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsxapps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsxapps/frontend/src/shared/constants/ipc.tsapps/frontend/src/shared/i18n/locales/en/taskReview.jsonapps/frontend/src/shared/i18n/locales/fr/taskReview.json
🧰 Additional context used
📓 Path-based instructions (4)
apps/frontend/src/**/*.{ts,tsx,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Always use i18n translation keys for all user-facing text in the frontend instead of hardcoded strings
Files:
apps/frontend/src/shared/constants/ipc.tsapps/frontend/src/preload/api/task-api.tsapps/frontend/src/main/ipc-handlers/task/worktree-handlers.tsapps/frontend/src/renderer/components/task-detail/TaskReview.tsxapps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsxapps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
apps/frontend/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use
useTranslation()hook with namespace prefixes (e.g., 'navigation:items.key') for accessing translation strings in React components
Files:
apps/frontend/src/shared/constants/ipc.tsapps/frontend/src/preload/api/task-api.tsapps/frontend/src/main/ipc-handlers/task/worktree-handlers.tsapps/frontend/src/renderer/components/task-detail/TaskReview.tsxapps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsxapps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
apps/frontend/**/*.{ts,tsx}
⚙️ CodeRabbit configuration file
apps/frontend/**/*.{ts,tsx}: Review React patterns and TypeScript type safety.
Check for proper state management and component composition.
Files:
apps/frontend/src/shared/constants/ipc.tsapps/frontend/src/preload/api/task-api.tsapps/frontend/src/main/ipc-handlers/task/worktree-handlers.tsapps/frontend/src/renderer/components/task-detail/TaskReview.tsxapps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsxapps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
apps/frontend/src/shared/i18n/locales/**/*.json
📄 CodeRabbit inference engine (CLAUDE.md)
apps/frontend/src/shared/i18n/locales/**/*.json: Store translation strings in namespace-organized JSON files atapps/frontend/src/shared/i18n/locales/{lang}/*.jsonfor each supported language
When implementing new frontend features, add translation keys to all language files (minimum: en/.json and fr/.json)
Files:
apps/frontend/src/shared/i18n/locales/en/taskReview.jsonapps/frontend/src/shared/i18n/locales/fr/taskReview.json
🧠 Learnings (4)
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/shared/i18n/locales/**/*.json : When implementing new frontend features, add translation keys to all language files (minimum: en/*.json and fr/*.json)
Applied to files:
apps/frontend/src/shared/i18n/locales/en/taskReview.jsonapps/frontend/src/shared/i18n/locales/fr/taskReview.jsonapps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/shared/i18n/locales/**/*.json : Store translation strings in namespace-organized JSON files at `apps/frontend/src/shared/i18n/locales/{lang}/*.json` for each supported language
Applied to files:
apps/frontend/src/shared/i18n/locales/en/taskReview.jsonapps/frontend/src/shared/i18n/locales/fr/taskReview.json
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/**/*.{ts,tsx,jsx} : Always use i18n translation keys for all user-facing text in the frontend instead of hardcoded strings
Applied to files:
apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsxapps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/**/*.{ts,tsx} : Use `useTranslation()` hook with namespace prefixes (e.g., 'navigation:items.key') for accessing translation strings in React components
Applied to files:
apps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
🧬 Code graph analysis (3)
apps/frontend/src/preload/api/task-api.ts (1)
apps/frontend/src/shared/constants/ipc.ts (1)
IPC_CHANNELS(6-483)
apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsx (1)
.design-system/src/components/Button.tsx (1)
Button(10-44)
apps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx (2)
.design-system/src/lib/icons.ts (2)
Sparkles(33-33)Check(21-21).design-system/src/components/Button.tsx (1)
Button(10-44)
🔇 Additional comments (10)
apps/frontend/src/shared/i18n/locales/fr/taskReview.json (1)
7-43: LGTM! French translations are properly structured.The French translations follow the project's i18n organization pattern and align with the new commit workflow. All keys are properly nested and structured to support the staged changes commit functionality.
Based on learnings, translation keys have been correctly added to the French locale file alongside the English version.
apps/frontend/src/shared/constants/ipc.ts (1)
38-38: LGTM! IPC channel constant follows conventions.The new
TASK_WORKTREE_COMMIT_STAGEDchannel constant follows the established naming pattern and is appropriately placed within the worktree management section with a clear descriptive comment.apps/frontend/src/shared/i18n/locales/en/taskReview.json (1)
7-43: LGTM! English translations are comprehensive and user-friendly.The English translations follow the project's i18n organization pattern and provide clear, concise messaging for the staged changes commit workflow. All translation keys align with the UI components that will consume them.
As per coding guidelines, translation keys have been correctly added to both English and French locale files.
apps/frontend/src/renderer/components/task-detail/TaskReview.tsx (2)
98-99: LGTM! Props correctly wired for commit functionality.The addition of
taskIdandonCloseprops toStagedSuccessMessageproperly enables the component to commit staged changes and manage dialog state. Both props are already defined in the parent component's interface.
130-130: LGTM! Commit message propagated correctly.The
suggestedCommitMessageprop is properly passed toStagedInProjectMessage, enabling the in-project staging flow to display and use the AI-generated commit message.apps/frontend/src/preload/api/task-api.ts (2)
54-54: LGTM! API method signature is properly typed.The
commitStagedChangesmethod signature follows the established pattern for TaskAPI methods with appropriate return type includingcommittedstatus and optionalmessagefield.
145-146: LGTM! Implementation correctly invokes the IPC channel.The implementation properly invokes the
TASK_WORKTREE_COMMIT_STAGEDIPC channel with the taskId parameter, consistent with other worktree operation methods.apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsx (1)
1-155: i18n compliance and component structure look good.All user-facing text properly uses translation keys via the
useTranslationhook. The component correctly handles loading states, error display, and conditional rendering based ontaskId. As per coding guidelines, i18n translation keys are used for all user-facing text.apps/frontend/src/main/ipc-handlers/task/worktree-handlers.ts (1)
2276-2372: Overall handler implementation is solid.The handler correctly:
- Validates task and project existence
- Checks for staged changes before committing
- Uses
execFileSyncwithgetToolPath('git')to prevent shell injection- Updates plan status asynchronously to avoid blocking
- Emits status change events to the UI
apps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx (1)
100-277: StagedInProjectMessage: Good i18n implementation and component structure.The component properly uses translation keys for all new user-facing text, handles loading/error states appropriately, and correctly adjusts button variants based on context (line 249:
variant={suggestedCommitMessage ? "outline" : "default"}).
apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsx
Show resolved
Hide resolved
apps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
Show resolved
Hide resolved
…port - Pass commitMessage parameter from frontend components to backend API - Replace hardcoded error messages with i18n translation keys - Add useTranslation hooks to LoadingMessage and NoWorkspaceMessage components - Add missing translation keys for commit errors Addresses issues AndyMik90#1, AndyMik90#5, and AndyMik90#6 from code review on PR AndyMik90#574
- Update IPC handler to accept optional customMessage parameter - Use custom message if provided, fall back to suggested_commit_message.txt - Fix fire-and-forget pattern: await plan status update for data integrity - Update both main and worktree plans for consistency (similar to merge handler) - Update preload API to pass customMessage parameter Addresses issues #2, AndyMik90#3, and AndyMik90#4 from code review on PR AndyMik90#574
Code Review Issues Addressed ✅All 6 issues from the code review have been resolved and merged with upstream Critical Issues FixedIssue #1 & #2: Edited Commit Message Not Passed to BackendFixed in: Before: const result = await window.electronAPI.commitStagedChanges(taskId); // ❌ Ignores edited messageAfter: const result = await window.electronAPI.commitStagedChanges(taskId, commitMessage); // ✅ Passes custom message
Issue #3: Fire-and-Forget Plan Status UpdateFixed in: Before: updatePlanStatus().catch(err => console.error('Plan update failed:', err)); // ❌ Fire-and-forgetAfter: await updatePlanStatus(); // ✅ Await completion
Issue #4: Inconsistent Plan UpdatesFixed in: Changes:
Medium Issues FixedIssue #5: Hardcoded Error MessagesFixed in: Changes:
Issue #6: Hardcoded Default MessagesFixed in: Changes:
Commits:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (1)
apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsx (1)
40-62: LGTM! All past review concerns addressed.The
handleCommitfunction now correctly:
- Passes the edited
commitMessageto the API (line 47) ✓- Uses translation keys for error messages (lines 55, 58) ✓
- Implements proper loading and error states
- Calls
onClose()callback on success- Handles errors gracefully with try-catch
Based on learnings: As per coding guidelines, all user-facing text uses i18n translation keys instead of hardcoded strings.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (6)
apps/frontend/src/main/ipc-handlers/task/worktree-handlers.tsapps/frontend/src/preload/api/task-api.tsapps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsxapps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsxapps/frontend/src/shared/i18n/locales/en/taskReview.jsonapps/frontend/src/shared/i18n/locales/fr/taskReview.json
🧰 Additional context used
📓 Path-based instructions (4)
apps/frontend/src/**/*.{ts,tsx,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Always use i18n translation keys for all user-facing text in the frontend instead of hardcoded strings
Files:
apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsxapps/frontend/src/main/ipc-handlers/task/worktree-handlers.tsapps/frontend/src/preload/api/task-api.tsapps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
apps/frontend/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use
useTranslation()hook with namespace prefixes (e.g., 'navigation:items.key') for accessing translation strings in React components
Files:
apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsxapps/frontend/src/main/ipc-handlers/task/worktree-handlers.tsapps/frontend/src/preload/api/task-api.tsapps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
apps/frontend/**/*.{ts,tsx}
⚙️ CodeRabbit configuration file
apps/frontend/**/*.{ts,tsx}: Review React patterns and TypeScript type safety.
Check for proper state management and component composition.
Files:
apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsxapps/frontend/src/main/ipc-handlers/task/worktree-handlers.tsapps/frontend/src/preload/api/task-api.tsapps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
apps/frontend/src/shared/i18n/locales/**/*.json
📄 CodeRabbit inference engine (CLAUDE.md)
apps/frontend/src/shared/i18n/locales/**/*.json: Store translation strings in namespace-organized JSON files atapps/frontend/src/shared/i18n/locales/{lang}/*.jsonfor each supported language
When implementing new frontend features, add translation keys to all language files (minimum: en/.json and fr/.json)
Files:
apps/frontend/src/shared/i18n/locales/en/taskReview.jsonapps/frontend/src/shared/i18n/locales/fr/taskReview.json
🧠 Learnings (4)
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/**/*.{ts,tsx,jsx} : Always use i18n translation keys for all user-facing text in the frontend instead of hardcoded strings
Applied to files:
apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsxapps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/shared/i18n/locales/**/*.json : When implementing new frontend features, add translation keys to all language files (minimum: en/*.json and fr/*.json)
Applied to files:
apps/frontend/src/shared/i18n/locales/en/taskReview.jsonapps/frontend/src/shared/i18n/locales/fr/taskReview.jsonapps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/shared/i18n/locales/**/*.json : Store translation strings in namespace-organized JSON files at `apps/frontend/src/shared/i18n/locales/{lang}/*.json` for each supported language
Applied to files:
apps/frontend/src/shared/i18n/locales/en/taskReview.jsonapps/frontend/src/shared/i18n/locales/fr/taskReview.jsonapps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/**/*.{ts,tsx} : Use `useTranslation()` hook with namespace prefixes (e.g., 'navigation:items.key') for accessing translation strings in React components
Applied to files:
apps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
🧬 Code graph analysis (1)
apps/frontend/src/preload/api/task-api.ts (1)
apps/frontend/src/shared/constants/ipc.ts (1)
IPC_CHANNELS(6-483)
🔇 Additional comments (10)
apps/frontend/src/shared/i18n/locales/en/taskReview.json (1)
7-46: LGTM! Translation keys are complete and well-organized.The new translation keys for the staged commit workflow are comprehensive and properly structured. All sections (staged, stagedInProject, noWorkspace, loading) follow consistent naming conventions and provide clear, user-friendly text.
Based on learnings: As per coding guidelines, translation keys are properly added to all language files (en and fr).
apps/frontend/src/preload/api/task-api.ts (1)
54-54: LGTM! API method correctly wired to IPC channel.The
commitStagedChangesmethod is properly defined in the interface and implementation. It correctly forwards bothtaskIdandcustomMessageparameters to the IPC handler, allowing the frontend to pass user-edited commit messages to the backend.Also applies to: 145-146
apps/frontend/src/shared/i18n/locales/fr/taskReview.json (1)
7-46: LGTM! French translations complete and consistent.All translation keys from the English file are present with appropriate French translations. The structure is consistent and follows the same organization pattern.
Based on learnings: As per coding guidelines, translation keys are properly added to all required language files (minimum en and fr).
apps/frontend/src/main/ipc-handlers/task/worktree-handlers.ts (1)
2277-2393: LGTM! All past review concerns addressed.The IPC handler implementation correctly:
- Accepts optional
customMessageparameter (line 2282) ✓- Awaits
updatePlanStatus()to ensure data integrity (line 2363) ✓- Updates both main and worktree plans for consistency (lines 2332-2335) ✓
- Validates staged changes before committing
- Provides proper error handling throughout
- Sends status change events to the UI
The commit message resolution logic correctly prioritizes custom messages, falls back to the suggested message file, and uses a default as a last resort.
apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsx (1)
1-154: LGTM! Complete i18n integration and proper React patterns.The component successfully integrates translations throughout:
- All labels, placeholders, and messages use
t()function- Proper TypeScript typing for new props (
taskId,onClose)- Correct state management with React hooks
- Conditional rendering based on
taskIdpresence- Loading states and error handling properly implemented
Based on learnings: As per coding guidelines, the component uses
useTranslation()hook with namespace prefixes for accessing translation strings in React components.apps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx (5)
1-7: LGTM! Imports properly support the new commit workflow.The new imports (Copy, Sparkles, GitCommit icons, Textarea component, and useTranslation hook) are all appropriately added to support the commit functionality and i18n requirements.
16-26: LGTM! Proper i18n implementation.The component correctly uses the
useTranslationhook with the 'taskReview' namespace and properly translates the user-facing message.
36-89: LGTM! Complete i18n coverage and proper state management.The component correctly implements i18n for all user-facing text and handles the mark-as-done workflow with appropriate loading states and error handling.
110-139: Fixed! The edited commit message is now properly sent to the backend.The previous issue has been resolved. Line 126 now correctly passes both
task.idandcommitMessagetocommitStagedChanges, ensuring that any user edits to the commit message are properly saved.The handlers are well-implemented with:
- Proper async/await patterns
- Error handling with i18n keys
- Appropriate state management for loading and error states
- User feedback through clipboard copy confirmation
102-279: Excellent i18n implementation throughout the component.The
StagedInProjectMessagecomponent successfully implements the commit workflow with comprehensive i18n support, meeting all the coding guidelines requirements:✓ All user-facing text uses translation keys (no hardcoded strings)
✓useTranslation()hook used with 'taskReview' namespace prefix
✓ Proper React state management and component composition
✓ TypeScript type safety maintained
✓ The previous review issue (not passingcommitMessageto backend) has been resolvedThe implementation correctly handles:
- Editable commit messages with clipboard copy functionality
- Async commit operations with proper loading states
- Error handling with translated error messages
- Conditional UI rendering based on context
- Worktree cleanup workflow
Based on learnings: Always use i18n translation keys for all user-facing text in the frontend, and use
useTranslation()hook with namespace prefixes.
apps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
Outdated
Show resolved
Hide resolved
apps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
Show resolved
Hide resolved
- Add separate translation keys for with/without date scenarios - Use conditional translation based on task.stagedAt presence - Prevents awkward text like 'Staged on ' with no date Addresses CodeRabbit feedback on PR AndyMik90#574
CodeRabbit Suggestions AddressedThank you for the additional suggestions! I've addressed them as follows: ✅ Issue 1: Missing
|
Resolved conflict in package-lock.json by accepting upstream version.
- Updated version from 2.7.2-beta.12 to 2.7.2 - Updated peer dependency flags after npm install - Rebuilt native modules for Electron v22.21.1
Base Branch
developbranch (required for all feature/fix PRs)Description
Adds a "Commit Changes" button to the task review UI when using "Merge (Stage Only)" mode. Users can now:
This eliminates the need to switch to a terminal to complete the commit after staging.
Features:
suggested_commit_message.txtStagedSuccessMessage(immediate) andStagedInProjectMessage(after reload)Related Issue
Type of Change
Area
Checklist
developbranchCI/Testing Requirements
Feature Toggle
Breaking Changes
Breaking: No
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.