feat(sidebar): add task rename via context menu#631
feat(sidebar): add task rename via context menu#631arnestrickmann merged 10 commits intogeneralaction:mainfrom
Conversation
- Add right-click context menu on tasks with "Rename" option - Inline editing with Enter to confirm, Escape to cancel - Auto-select text when rename starts for quick typing - Optimistic UI updates with rollback on error - New context-menu UI component using @radix-ui/react-context-menu
|
@saadnvd1 is attempting to deploy a commit to the General Action Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you! |
ah yes, thanks for pointing out. will update |
- Add git:rename-branch IPC handler for local + remote branch renaming - Detect if branch was pushed and update remote accordingly - Update task's branch field in database after rename - Show toast notification when remote branch is updated
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
- Query git remote config before branch rename (config section gets renamed) - Disable rename for multi-agent tasks (variant metadata would become stale)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
- Use execFileAsync to prevent shell command injection - Rollback git branch rename if save task fails
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
|
Ready to merge / review @arnestrickmann. Thank you for the PR @saadnvd1. Simplified the UI a bit by deleting the 'x' and 'check' symbol to leave more space for renamed task. And fixed bugs. |
| log.info('Pushed new branch to remote'); | ||
| } | ||
|
|
||
| return { success: true, remotePushed }; |
There was a problem hiding this comment.
Partial rename failure leaves git state inconsistent with app
Medium Severity
When git:rename-branch renames the local branch successfully (line 804) but the subsequent remote push fails (line 822), the handler returns success: false. However, the local branch is already renamed. In App.tsx, when success is false, branchRenamed never gets set to true (line 1881), so no rollback is attempted (line 1906). The UI reverts to showing the old branch name, but the local git branch actually has the new name. This mismatch causes the task to reference a non-existent branch.
Additional Locations (1)
| } | ||
| setIsEditing(false); | ||
| await onRename?.(normalized); | ||
| }, [editValue, task.name, onRename, handleCancelEdit]); |
There was a problem hiding this comment.
Rename allows duplicate task names within a project
Medium Severity
Task creation enforces unique names within a project via TaskModal validation (checking against existingNames), but the rename operation in handleConfirmEdit and handleRenameTask has no such check. A user can rename "task-a" to "task-b" even if "task-b" already exists, creating duplicate display names. This violates the uniqueness invariant established during creation and could cause confusion when selecting or managing tasks.
Additional Locations (1)
|
nice, good stuff |
Loom: https://www.loom.com/share/16490420be944260bf9b98cb460c98fb
Addresses this issue: #548
Note
Introduces task renaming from the sidebar with inline editing and ties it to git branch renames, including remote updates when applicable.
ContextMenuUI and integrates a "Rename" action on task items with inline input (Enter confirms, Escape cancels), name normalization, and text auto-selectLeftSidebar→App(onRenameTask) with optimistic UI update, rollback on error, and toast feedback; disables for multi-agent tasksprefix/...-hash; invokes new IPCgit:rename-branchto rename local branch, delete old remote ref, and push new branch (sets upstream); exposed viapreloadand typed inelectron-api.d.ts@radix-ui/react-context-menudependency and a lightweightui/context-menuwrapper componentWritten by Cursor Bugbot for commit b3c0ddd. This will update automatically on new commits. Configure here.