Skip to content

fix: open milestone tasks in slide-in#4592

Merged
mancinux merged 1 commit into
mainfrom
press-return-on-milestone
May 31, 2026
Merged

fix: open milestone tasks in slide-in#4592
mancinux merged 1 commit into
mainfrom
press-return-on-milestone

Conversation

@mancinux

Copy link
Copy Markdown
Collaborator

fixes #4570

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="app/assets/js/pages/MilestonePage/index.tsx" line_range="233-242" />
<code_context>
+    [milestone.id, projectId, updateTaskMilestone],
+  );
+
+  const handleTaskDelete = React.useCallback(
+    async (taskId: string) => {
+      const result = await deleteTask(taskId);
+
+      if (!result?.success) return;
+
+      if (milestone.project?.id) {
+        PageCache.invalidate(projectPageCacheKey(milestone.project.id));
+      }
+    },
+    [deleteTask, milestone.project?.id],
+  );
+
</code_context>
<issue_to_address>
**issue (bug_risk):** Task delete handler should also invalidate the milestone page/kanban caches

In `handleTaskDelete`, only `projectPageCacheKey(milestone.project.id)` is invalidated. Because the milestone page and kanban views also show this task, you should also invalidate `pageCacheKey(milestone.id)` and `milestoneKanbanPageCacheKey(milestone.id)` to avoid stale UIs and keep behavior consistent with the move/milestone-change flows.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread app/assets/js/pages/MilestonePage/index.tsx
@mancinux
mancinux force-pushed the press-return-on-milestone branch from 48ced03 to 3b03e0e Compare May 31, 2026 23:27
Signed-off-by: Luca Mancini <lmancini@operately.com>
@mancinux
mancinux force-pushed the press-return-on-milestone branch from 3b03e0e to 4b9388b Compare May 31, 2026 23:51
@mancinux
mancinux merged commit 17b6de5 into main May 31, 2026
4 checks passed
@mancinux
mancinux deleted the press-return-on-milestone branch May 31, 2026 23:59
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.

Pressing Return on a selected task on milestone page should open the task in a slide-in window

1 participant