Fix checkpoints not appearing in chat when metadata is invalid #5900
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.
Fixes #5899
Problem
Users reported that checkpoints are not appearing in the chat despite having checkpoints enabled in settings. Investigation revealed that the
CheckpointSavedcomponent was returningnullwhen checkpoint metadata failed schema validation, causing checkpoints to be completely hidden from the UI.Root Cause
The
CheckpointSavedcomponent was too strict in its validation - if the checkpoint metadata did not exactly match the expected schema, the entire checkpoint display would be hidden by returningnull.Solution
Modified the
CheckpointSavedcomponent to:nullfor invalid metadata, show a fallback displayChanges
webview-ui/src/components/chat/checkpoints/CheckpointSaved.tsx:nullTesting
The fix ensures that:
This change prioritizes user experience by ensuring checkpoints are always visible, while providing debugging tools for developers to identify and fix underlying metadata issues.
Important
Fix
CheckpointSavedto always display checkpoints with fallback data and log warnings for invalid metadata.CheckpointSavedcomponent now always displays checkpoints, even with invalid metadata, using fallback data.CheckpointSaved.tsxto use fallback metadata when validation fails.CheckpointSaved.tsx.This description was created by
for 1342a1e. You can customize this summary. It will automatically update as commits are pushed.