Skip to content

fix: guard analysis breakdown rendering#28

Draft
cursor[bot] wants to merge 1 commit intomainfrom
cursor/sentry-issue-regression-4d3e
Draft

fix: guard analysis breakdown rendering#28
cursor[bot] wants to merge 1 commit intomainfrom
cursor/sentry-issue-regression-4d3e

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented Apr 14, 2026

Description

Fixes a regression in WEBVITALS-3C.

  • Root cause: The client renderer trusted any truthy generateAnalysisBreakdown tool output and immediately passed it to AnalysisBreakdownDisplay, which spreads data.points. During persisted/resumed chat sync through @ai-sdk-tools/store, the breakdown tool part can become output-available before the payload is schema-complete, leaving points undefined and crashing the page.
  • Regression vector: The persisted workflow streaming/resume path introduced in f47826b and adjusted in a2fa244 made partially synced tool payloads reachable in the UI, but the breakdown renderer still assumed output-available meant a fully validated object.
  • Fix: Validate the breakdown payload with AnalysisBreakdownSchema before hiding tool progress or rendering the breakdown card, and skip breakdown rendering when the paired performance result reports hasData: false.
  • Sentry context: Regressed in release 3dad06a481817bc715ba83934de828125c64fb2c. The MCP issue data did not expose the prior resolution activity/commit.
  • Verification: Ran pnpm check-types. Booted the local dev server, confirmed / served successfully, and exercised /api/chat for sentry.io to confirm the workflow stream still starts and returns tool chunks. Full browser reproduction and screenshot capture were not available in this automation environment.

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactoring

Checklist

  • Tested locally
  • Types pass (pnpm check-types)
  • Linting passes (pnpm lint)
Open in Web View Automation 

Persisted and resumed chat state can surface a breakdown tool part before\nits payload is safe to render. The previous renderer assumed any truthy\noutput had an iterable points array, which crashed the page when the\nstore synced an incomplete breakdown object.\n\nValidate the breakdown shape before hiding the tool state or rendering\nthe breakdown card, and skip the breakdown UI when the paired\nperformance result reports hasData false.\n\nFixes WEBVITALS-3C\nCo-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Sergiy Dybskiy <s@serg.tech>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 14, 2026

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

Project Deployment Actions Updated (UTC)
webvitals-com Ready Ready Preview, Comment Apr 14, 2026 3:26pm

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