Skip to content

Guard comment activity IDs in task detail - #1382

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/por-21030-cursor-automated-triage-response-ba9f
Draft

Guard comment activity IDs in task detail#1382
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/por-21030-cursor-automated-triage-response-ba9f

Conversation

@cursor

@cursor cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Added getCommentActivityId / isPendingCommentId helpers for safe comment activity ID handling.
  • Updated task detail comment reply, expanded-reply, delete, and stable-id flows to avoid calling .includes or Zod string parsing on missing activity details.id values.
  • Preserved optimistic temp-comment handling while skipping malformed IDs instead of crashing the UI.

Testing Criteria

  • yarn test src/utils/commentActivity.test.ts --runInBand passes and covers missing/non-string IDs plus pending temp IDs.
  • yarn lint:check passes with existing warnings only.
  • yarn tsc --noEmit passes.
  • yarn test --runInBand was also attempted: 17 suites / 143 tests passed, but the full suite failed in src/app/api/tests/utils/authenticate.test.ts because Jest could not transform the ESM p-retry dependency (SyntaxError: Cannot use import statement outside a module). This failure is unrelated to the touched task-detail/comment files.
  • Local browser smoke was attempted at /detail/00000000-0000-0000-0000-000000000000/iu?token=fake-token; the app correctly blocked on Failed to authenticate token, so the task detail activity/comment UI could not be manually exercised without a real Copilot launch token.

Notes

  • Linear and Sentry MCP access were unavailable during triage: Linear read/comment calls returned 401 and Sentry MCP required authentication, so the root cause was inferred from the webhook title plus repository search for unsafe .includes receivers.

Impact & Surface Area of Change

  • Task detail activity/comment UI: comment reply queueing, expanded replies, comment deletion, optimistic temp-comment resolution, and comment stable IDs.
  • No database/API contract changes.
Open in Web View Automation 

cursoragent and others added 2 commits July 8, 2026 18:02
Co-authored-by: Neil Raina <makeitraina@users.noreply.github.com>
Co-authored-by: Neil Raina <makeitraina@users.noreply.github.com>
@linear-code

linear-code Bot commented Jul 8, 2026

Copy link
Copy Markdown

POR-21030

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tasks-app Ready Ready Preview, Comment Jul 8, 2026 6:07pm

Request Review

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.

1 participant