fix: guard analysis breakdown rendering#28
Draft
cursor[bot] wants to merge 1 commit intomainfrom
Draft
Conversation
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>
|
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-3C.
generateAnalysisBreakdowntool output and immediately passed it toAnalysisBreakdownDisplay, which spreadsdata.points. During persisted/resumed chat sync through@ai-sdk-tools/store, the breakdown tool part can becomeoutput-availablebefore the payload is schema-complete, leavingpointsundefined and crashing the page.f47826band adjusted ina2fa244made partially synced tool payloads reachable in the UI, but the breakdown renderer still assumedoutput-availablemeant a fully validated object.AnalysisBreakdownSchemabefore hiding tool progress or rendering the breakdown card, and skip breakdown rendering when the paired performance result reportshasData: false.3dad06a481817bc715ba83934de828125c64fb2c. The MCP issue data did not expose the prior resolution activity/commit.pnpm check-types. Booted the local dev server, confirmed/served successfully, and exercised/api/chatforsentry.ioto 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
Checklist
pnpm check-types)pnpm lint)