Skip to content

Conversation

@doublefx
Copy link

@doublefx doublefx commented Jan 2, 2026

Base Branch

  • This PR targets the develop branch (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:

  1. Review staged changes in the UI
  2. Edit the AI-generated commit message if needed
  3. Click "Commit Changes" to commit directly from the app

This eliminates the need to switch to a terminal to complete the commit after staging.

Features:

  • IPC handler to commit staged changes using suggested_commit_message.txt
  • Commit button in both StagedSuccessMessage (immediate) and StagedInProjectMessage (after reload)
  • Full i18n support (EN/FR)
  • Task status automatically updates to 'done' after successful commit

Related Issue

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 📚 Documentation
  • ♻️ Refactor
  • 🧪 Test

Area

  • Frontend
  • Backend
  • Fullstack

Checklist

  • I've synced with develop branch
  • I've tested my changes locally
  • I've followed the code principles (SOLID, DRY, KISS)
  • My PR is small and focused (< 400 lines ideally) - Note: Includes i18n additions

CI/Testing Requirements

  • All CI checks pass
  • All existing tests pass
  • New features include test coverage
  • Bug fixes include regression tests

Feature Toggle

  • N/A - Feature is complete and ready for all users

Breaking Changes

Breaking: No

Summary by CodeRabbit

  • New Features
    • Commit staged workspace changes directly from the task review UI with an integrated commit flow, status updates, and success feedback.
    • AI-suggested commit messages: editable textarea, copy-to-clipboard, commit error display, and commit button with loading state and automatic close on success.
  • Internationalization
    • Full English and French translations for the new commit/staging workflows and UI text.

✏️ Tip: You can customize this high-level summary in your review settings.

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.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 2, 2026

Note

Other AI code review bot(s) detected

CodeRabbit 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.

📝 Walkthrough

Walkthrough

Added 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

Cohort / File(s) Summary of changes / attention points
Main process — worktree handlers
apps/frontend/src/main/ipc-handlers/task/worktree-handlers.ts
New IPC handler TASK_WORKTREE_COMMIT_STAGED: validates task/project/worktree, checks git diff --staged --name-only, resolves commit message (custom / suggested / default), executes git commit, updates implementation_plan.json for project and worktree (async, tolerant of missing files), emits TASK_STATUS_CHANGE ('done'), and returns success/error.
Preload API
apps/frontend/src/preload/api/task-api.ts
Added commitStagedChanges(taskId, customMessage?) that invokes TASK_WORKTREE_COMMIT_STAGED and returns IPCResult<{ committed: boolean; message?: string }>; ensure typings and exposure in the returned API object.
Renderer — task review wiring
apps/frontend/src/renderer/components/task-detail/TaskReview.tsx
Passes taskId and onClose to StagedSuccessMessage; forwards suggestedCommitMessage to StagedInProjectMessage. Verify prop flows.
Renderer — staged success UI
apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsx
Component props extended (taskId?, onClose?); added i18n; local state isCommitting, commitError; handleCommit calls electronAPI.commitStagedChanges; shows loading/error UI and conditional commit button; successful commit triggers optional onClose.
Renderer — workspace/staged messages
apps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
suggestedCommitMessage? prop added; i18n integration; commit message editor, copy/commit/delete handlers; loading/error states; new buttons/icons and copy feedback; commit/delete flows interact with Electron API.
IPC constants
apps/frontend/src/shared/constants/ipc.ts
New IPC channel TASK_WORKTREE_COMMIT_STAGED = 'task:worktreeCommitStaged'.
i18n — English & French
apps/frontend/src/shared/i18n/locales/en/taskReview.json, apps/frontend/src/shared/i18n/locales/fr/taskReview.json
New localization groups/keys added (staged, stagedInProject, noWorkspace, loading). Verify keys match component usages.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

feature, area/frontend, size/M

Suggested reviewers

  • MikeeBuilds
  • AlexMadera
  • AndyMik90

Poem

🐰
I hopped through branches, nibbling lines of code,
Staged changes gathered, ready for the road.
A message found, I pressed commit with cheer—
Plans synced, status sent, the tree is clear.
Cheers from a rabbit, small but proud and bold.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add commit button for staged changes after merge' accurately describes the main feature added in this PR—enabling users to commit staged changes directly from the UI without needing a terminal.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6263676 and 7351e7d.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
📒 Files selected for processing (1)
  • apps/frontend/src/shared/constants/ipc.ts
🧰 Additional context used
📓 Path-based instructions (3)
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.ts
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.ts
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.ts
🔇 Additional comments (1)
apps/frontend/src/shared/constants/ipc.ts (1)

38-38: LGTM! Constant follows established patterns.

The new IPC channel constant is correctly defined and appropriately placed among other worktree operations. The naming convention, string value pattern, and inline comment are all consistent with the existing codebase structure. The constant is properly imported and used in both the IPC handler registration and preload API.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 Commit Button: Introduces a 'Commit Changes' button within the task review UI, allowing users to commit staged changes directly from the application after a 'Merge (Stage Only)' operation.
  • Streamlined Workflow: Eliminates the need for users to switch to a terminal to complete the commit process after staging changes, improving user experience and efficiency.
  • Editable Commit Messages: Users can review and edit the AI-generated commit message before finalizing the commit.
  • Automated Task Status Update: Upon successful commit, the task status is automatically updated to 'done'.
  • Internationalization Support: Full i18n support has been added for all new UI elements and messages in both English and French.

🧠 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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 LoadingMessage component 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 NoWorkspaceMessage component contains hardcoded user-facing strings (lines 57, 59-60, 75, 79-81) that should use translation keys for consistency with the updated StagedInProjectMessage component. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 16a7fa4 and 47fd1d4.

⛔ Files ignored due to path filters (1)
  • apps/frontend/package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
📒 Files selected for processing (8)
  • apps/frontend/src/main/ipc-handlers/task/worktree-handlers.ts
  • apps/frontend/src/preload/api/task-api.ts
  • apps/frontend/src/renderer/components/task-detail/TaskReview.tsx
  • apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsx
  • apps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
  • apps/frontend/src/shared/constants/ipc.ts
  • apps/frontend/src/shared/i18n/locales/en/taskReview.json
  • apps/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.ts
  • apps/frontend/src/preload/api/task-api.ts
  • apps/frontend/src/main/ipc-handlers/task/worktree-handlers.ts
  • apps/frontend/src/renderer/components/task-detail/TaskReview.tsx
  • apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsx
  • apps/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.ts
  • apps/frontend/src/preload/api/task-api.ts
  • apps/frontend/src/main/ipc-handlers/task/worktree-handlers.ts
  • apps/frontend/src/renderer/components/task-detail/TaskReview.tsx
  • apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsx
  • apps/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.ts
  • apps/frontend/src/preload/api/task-api.ts
  • apps/frontend/src/main/ipc-handlers/task/worktree-handlers.ts
  • apps/frontend/src/renderer/components/task-detail/TaskReview.tsx
  • apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsx
  • apps/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 at apps/frontend/src/shared/i18n/locales/{lang}/*.json for 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.json
  • apps/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.json
  • apps/frontend/src/shared/i18n/locales/fr/taskReview.json
  • apps/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.json
  • apps/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.tsx
  • apps/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_STAGED channel 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 taskId and onClose props to StagedSuccessMessage properly 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 suggestedCommitMessage prop is properly passed to StagedInProjectMessage, 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 commitStagedChanges method signature follows the established pattern for TaskAPI methods with appropriate return type including committed status and optional message field.


145-146: LGTM! Implementation correctly invokes the IPC channel.

The implementation properly invokes the TASK_WORKTREE_COMMIT_STAGED IPC 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 useTranslation hook. The component correctly handles loading states, error display, and conditional rendering based on taskId. 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 execFileSync with getToolPath('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"}).

…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
@doublefx
Copy link
Author

doublefx commented Jan 2, 2026

Code Review Issues Addressed ✅

All 6 issues from the code review have been resolved and merged with upstream develop:

Critical Issues Fixed

Issue #1 & #2: Edited Commit Message Not Passed to Backend

Fixed in: StagedSuccessMessage.tsx:47, WorkspaceMessages.tsx:124, task-api.ts, worktree-handlers.ts:2282

Before:

const result = await window.electronAPI.commitStagedChanges(taskId); // ❌ Ignores edited message

After:

const result = await window.electronAPI.commitStagedChanges(taskId, commitMessage); // ✅ Passes custom message
  • Updated handler signature to accept customMessage?: string parameter
  • Backend uses custom message if provided, falls back to suggested_commit_message.txt, then defaults
  • Updated preload API to pass parameter through to IPC call

Issue #3: Fire-and-Forget Plan Status Update

Fixed in: worktree-handlers.ts:2363

Before:

updatePlanStatus().catch(err => console.error('Plan update failed:', err)); // ❌ Fire-and-forget

After:

await updatePlanStatus(); // ✅ Await completion
  • Changed from fire-and-forget pattern to await for data integrity
  • Ensures plan status persists before returning success

Issue #4: Inconsistent Plan Updates

Fixed in: worktree-handlers.ts:2327-2360

Changes:

  • Now updates both main project plan AND worktree plan (if it exists)
  • Follows same pattern as merge handler for consistency
  • Proper ENOENT handling for missing worktree plans
  • Different logging levels for main vs worktree failures

Medium Issues Fixed

Issue #5: Hardcoded Error Messages

Fixed in: StagedSuccessMessage.tsx:55, 58

Changes:

  • Replaced 'Failed to commit changes' with t('staged.commitFailed')
  • Replaced 'Unknown error occurred' with t('staged.commitError')
  • Added translation keys to both en and fr locales

Issue #6: Hardcoded Default Messages

Fixed in: WorkspaceMessages.tsx:16, 57, 60, 75, 80

Changes:

  • Added useTranslation hooks to LoadingMessage and NoWorkspaceMessage components
  • Replaced all hardcoded strings with translation keys:
    • 'Loading workspace info...'t('loading.message')
    • 'No Workspace Found't('noWorkspace.title')
    • 'No isolated workspace...'t('noWorkspace.description')
    • 'Updating...'t('noWorkspace.updating')
    • 'Mark as Done't('noWorkspace.markDone')

Commits:

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 handleCommit function now correctly:

  • Passes the edited commitMessage to 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

📥 Commits

Reviewing files that changed from the base of the PR and between 47fd1d4 and 716cb42.

📒 Files selected for processing (6)
  • apps/frontend/src/main/ipc-handlers/task/worktree-handlers.ts
  • apps/frontend/src/preload/api/task-api.ts
  • apps/frontend/src/renderer/components/task-detail/task-review/StagedSuccessMessage.tsx
  • apps/frontend/src/renderer/components/task-detail/task-review/WorkspaceMessages.tsx
  • apps/frontend/src/shared/i18n/locales/en/taskReview.json
  • apps/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.tsx
  • apps/frontend/src/main/ipc-handlers/task/worktree-handlers.ts
  • apps/frontend/src/preload/api/task-api.ts
  • apps/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.tsx
  • apps/frontend/src/main/ipc-handlers/task/worktree-handlers.ts
  • apps/frontend/src/preload/api/task-api.ts
  • apps/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.tsx
  • apps/frontend/src/main/ipc-handlers/task/worktree-handlers.ts
  • apps/frontend/src/preload/api/task-api.ts
  • apps/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 at apps/frontend/src/shared/i18n/locales/{lang}/*.json for 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.json
  • apps/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.tsx
  • apps/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.json
  • apps/frontend/src/shared/i18n/locales/fr/taskReview.json
  • apps/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.json
  • apps/frontend/src/shared/i18n/locales/fr/taskReview.json
  • apps/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 commitStagedChanges method is properly defined in the interface and implementation. It correctly forwards both taskId and customMessage parameters 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 customMessage parameter (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 taskId presence
  • 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 useTranslation hook 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.id and commitMessage to commitStagedChanges, 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 StagedInProjectMessage component 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 passing commitMessage to backend) has been resolved

The 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.

- 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
@doublefx
Copy link
Author

doublefx commented Jan 2, 2026

CodeRabbit Suggestions Addressed

Thank you for the additional suggestions! I've addressed them as follows:

✅ Issue 1: Missing stagedAt Date Handling

Fixed in commit: 6263676

Problem: Empty string fallback created awkward text like "Staged on " with no date.

Solution:

  • Added separate translation keys: description and descriptionWithDate
  • Component now uses conditional logic based on task.stagedAt presence
  • English: "Changes staged in your main project" vs "Changes staged in your main project on [date]"
  • French: "Modifications indexées dans votre projet principal" vs "...le [date]"

Code:

{task.stagedAt 
  ? t('stagedInProject.descriptionWithDate', { date: new Date(task.stagedAt).toLocaleDateString() }) 
  : t('stagedInProject.description')
}

📝 Issue 2: Translation Structure for Manual Steps

Status: Acknowledged for future improvement

I agree that using Trans component with component placeholders would provide better context for translators. However, I'd recommend addressing this in a follow-up PR focused on i18n improvements across the entire codebase to maintain consistency.

Reasons for deferring:

  • Current implementation is functional and maintains consistency with existing patterns in the codebase
  • Trans component refactor would require updating multiple files and translation keys
  • Keeps this PR focused on the core commit message functionality

Would be happy to create a separate issue/PR for comprehensive i18n improvements using Trans components if maintainers agree this should be standardized across the codebase.


All critical issues resolved! Ready for re-review.

doublefx and others added 3 commits January 2, 2026 14:04
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
@MikeeBuilds MikeeBuilds added feature New feature or request area/frontend This is frontend only labels Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/frontend This is frontend only feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants