Skip to content

Handle invalid Copilot launch tokens#1242

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/OUT-2995-automated-issue-triage-d414
Draft

Handle invalid Copilot launch tokens#1242
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/OUT-2995-automated-issue-triage-d414

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 19, 2026

Changes

  • Added getSafeTokenPayload to safely validate Copilot launch token payloads without leaking SDK authorization failures into server-render errors.
  • Updated the root and client task pages to validate token payloads before downstream data fetches and render the existing invalid-token silent error when authorization fails.
  • Added unit coverage for valid, unauthorized, and malformed token payload paths.

Testing Criteria

  • yarn test --runTestsByPath src/app/api/tests/utils/tokenPayload.test.ts --runInBand
  • yarn lint:check passes with existing React hook/compiler warnings.
  • yarn tsc --noEmit still fails on pre-existing missing SVG module declarations in src/icons/index.ts.

Notes

  • Related Sentry issue: TASKS-82 / Linear OUT-2995.
  • Seer Autofix analysis was unavailable because the Sentry org has no budget for Seer Autofix.

Impact & Surface Area of Change

  • Affects the root task board page and client task board page token bootstrap path.
  • Invalid or cross-environment Copilot tokens should now show the existing invalid-token UI instead of creating unhandled Next.js server-render Sentry events.
Open in Web View Automation 

cursoragent and others added 2 commits May 19, 2026 21:53
Co-authored-by: Neil Raina <makeitraina@users.noreply.github.com>
Co-authored-by: Neil Raina <makeitraina@users.noreply.github.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 19, 2026

OUT-2995

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 19, 2026

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

Project Deployment Actions Updated (UTC)
tasks-app Ready Ready Preview, Comment May 19, 2026 9:56pm

Request Review

@priosshrsth
Copy link
Copy Markdown
Collaborator

@arpandhakal This PR actually looks good to me. Instead of throwing error, this silently captures, empty or invalid token and show error UI. wdyt?

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