Skip to content

fix(tasks): restore context menu for pinned tasks#3140

Open
MattPua wants to merge 1 commit into
mainfrom
posthog-code/fix-context-menu-on-pinned-tasks
Open

fix(tasks): restore context menu for pinned tasks#3140
MattPua wants to merge 1 commit into
mainfrom
posthog-code/fix-context-menu-on-pinned-tasks

Conversation

@MattPua

@MattPua MattPua commented Jul 3, 2026

Copy link
Copy Markdown
Member

Problem

Right-clicking on pinned tasks in the sidebar no longer opens the context menu, preventing users from accessing task options after pinning.

Changes

  • SidebarMenu.tsx: Refactored task lookup logic to fall back to allSidebarTasks when taskMap doesn't contain the task. Pinned tasks may not be in taskMap, so we now check allSidebarTasks as a fallback to ensure taskData is always available when needed.
  • useTaskContextMenu.ts: Relaxed the task parameter type from Task to Pick<Task, "id" | "title"> to accommodate partial task objects, allowing the context menu to work with pinned tasks that may only have basic properties available.

How did you test this?

Manual testing of right-click context menu on pinned tasks in the sidebar.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@trunk-io

trunk-io Bot commented Jul 3, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@MattPua MattPua added the Stamphog This will request an autostamp by stamphog on small changes label Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 1a6eeb2.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trivial UI fix: reorders variable declarations to provide a fallback for tasks not in taskMap, and relaxes the context menu hook's param type accordingly. No logic change, no data model impact.

@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(tasks): restore context menu for pin..." | Re-trigger Greptile

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

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant