Skip to content

fix: guard malformed analysis breakdown output#29

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

fix: guard malformed analysis breakdown output#29
cursor[bot] wants to merge 1 commit intomainfrom
cursor/sentry-issue-regression-3d7b

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented Apr 14, 2026

Description

Fixes a regression in WEBVITALS-3M.

  • Root cause: MessageRenderer treated any generateAnalysisBreakdown tool output as renderable. When persisted or resumed chat state surfaced an incomplete breakdown payload, AnalysisBreakdownDisplay could receive data without a valid points array and crash while iterating it.
  • Regression vector: The renderer-side validation introduced in PR #28 for the closely related breakdown crash was not present on main in release 3dad06a481817bc715ba83934de828125c64fb2c, so malformed breakdown payloads were still allowed through.
  • Fix: Reintroduce schema validation in MessageRenderer before considering the breakdown tool complete or rendering the breakdown card, and suppress the breakdown UI when the paired performance result has no renderable data.

Sentry Context

Verification

  • Passed pnpm check-types
  • Passed pnpm test -- --runInBand tests/unit/analysis-workflow.test.ts (runs the unit, integration, and analysis workflow suites in this repo)
  • pnpm lint still fails from pre-existing repo-wide Biome diagnostics unrelated to this change
  • Manual browser verification and screenshot capture were not possible 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 

Malformed or incomplete generateAnalysisBreakdown output can sync through the\nchat store and reach the renderer before it is safe to display.\n\nValidate the breakdown payload before treating the tool as complete or\nrendering the breakdown card, and keep the breakdown hidden when the\npaired performance result reports no renderable data.\n\nFixes WEBVITALS-3M\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 4: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