fix: guard malformed analysis breakdown output#29
Draft
cursor[bot] wants to merge 1 commit intomainfrom
Draft
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes a regression in WEBVITALS-3M.
MessageRenderertreated anygenerateAnalysisBreakdowntool output as renderable. When persisted or resumed chat state surfaced an incomplete breakdown payload,AnalysisBreakdownDisplaycould receive data without a validpointsarray and crash while iterating it.mainin release3dad06a481817bc715ba83934de828125c64fb2c, so malformed breakdown payloads were still allowed through.MessageRendererbefore 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
3dad06a481817bc715ba83934de828125c64fb2cVerification
pnpm check-typespnpm test -- --runInBand tests/unit/analysis-workflow.test.ts(runs the unit, integration, and analysis workflow suites in this repo)pnpm lintstill fails from pre-existing repo-wide Biome diagnostics unrelated to this changeType of Change
Checklist
pnpm check-types)pnpm lint)