Skip to content

feat(tasks): add titlebar context menu#2772

Open
janburzinski wants to merge 2 commits into
mainfrom
emdash/topbar-branch-menu
Open

feat(tasks): add titlebar context menu#2772
janburzinski wants to merge 2 commits into
mainfrom
emdash/topbar-branch-menu

Conversation

@janburzinski

Copy link
Copy Markdown
Collaborator

Description

  • adds a right click menu to the task name in the task topbar

Screenshot/Recording (if applicable)

https://cap.link/214h9gmyzfh5vnx

Checklist
  • I kept this PR small and focused
  • I ran a self-review before opening this PR
  • I ran the relevant local checks or explained why not
  • I updated docs when behavior or setup changed
  • I added or updated tests when behavior changed, or explained why not
  • I only added comments where the logic is not obvious
  • I used Conventional Commits for commit
    messages and, when possible, the PR title

@greptile-apps

greptile-apps Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a right-click context menu to the task name in the task titlebar, surfacing two actions: copying the git branch name to the clipboard and opening the rename-task modal.

  • The ContextMenu wraps the existing PopoverTrigger so left-click (open popover) and right-click (open context menu) work independently without conflict.
  • handleCopyBranchName is properly guarded (disabled={!branchName}) and uses void to handle the async call in the event handler; toast feedback is provided for both success and failure.

Confidence Score: 4/5

Safe to merge — the change is well-scoped and the new context menu integrates cleanly alongside the existing Popover without interaction conflicts.

The implementation is straightforward: two new menu items, proper async error handling, and a correct disabled state when no branch name is available. The only notable concern is the "Copy" label being ambiguous about what it copies, which could confuse users who right-click expecting to copy the task name displayed beneath the cursor.

apps/emdash-desktop/src/renderer/features/tasks/task-titlebar.tsx — specifically the "Copy" context menu item label.

Important Files Changed

Filename Overview
apps/emdash-desktop/src/renderer/features/tasks/task-titlebar.tsx Adds a right-click context menu to the task name in the titlebar with "Copy" (branch name) and "Rename" actions; the "Copy" item label is ambiguous given its position on the task name element.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/emdash-desktop/src/renderer/features/tasks/task-titlebar.tsx:198-199
**Ambiguous "Copy" label**

The menu item is labeled "Copy" but it copies the branch name, not the task name. Since the context menu is triggered from the task name element in the titlebar, users are very likely to expect "Copy" to copy the task name. Labeling it "Copy branch name" removes the ambiguity and avoids surprising behavior when `branchName` happens to differ significantly from the display name.

Reviews (1): Last reviewed commit: "feat(tasks): add titlebar context menu" | Re-trigger Greptile

Comment thread apps/emdash-desktop/src/renderer/features/tasks/task-titlebar.tsx Outdated
@arnestrickmann

Copy link
Copy Markdown
Contributor

I think this greptile comment is valid:
The only notable concern is the "Copy" label being ambiguous about what it copies, which could confuse users who right-click expecting to copy the task name displayed beneath the cursor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants