Skip to content

Fix checkpoints not appearing in chat when metadata is invalid #5900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

roomote[bot]
Copy link

@roomote roomote bot commented Jul 18, 2025

Fixes #5899

Problem

Users reported that checkpoints are not appearing in the chat despite having checkpoints enabled in settings. Investigation revealed that the CheckpointSaved component was returning null when checkpoint metadata failed schema validation, causing checkpoints to be completely hidden from the UI.

Root Cause

The CheckpointSaved component 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 returning null.

Solution

Modified the CheckpointSaved component to:

  1. Always show checkpoints: Instead of returning null for invalid metadata, show a fallback display
  2. Add debugging support: Console warnings are logged when metadata is missing or invalid to help diagnose issues
  3. Graceful degradation: When metadata is invalid, use sensible defaults while still showing the checkpoint
  4. User feedback: Display a subtle "metadata unavailable" indicator when using fallback data

Changes

  • Modified webview-ui/src/components/chat/checkpoints/CheckpointSaved.tsx:
    • Added console warnings for debugging metadata issues
    • Created fallback metadata when validation fails
    • Always render checkpoint display instead of returning null
    • Added visual indicator when metadata is unavailable

Testing

The fix ensures that:

  • Checkpoints with valid metadata continue to work as before
  • Checkpoints with invalid/missing metadata are still visible to users
  • Developers can debug metadata issues via console warnings
  • The CheckpointMenu functionality remains intact with fallback data

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 CheckpointSaved to always display checkpoints with fallback data and log warnings for invalid metadata.

  • Behavior:
    • CheckpointSaved component now always displays checkpoints, even with invalid metadata, using fallback data.
    • Logs console warnings for missing or invalid metadata for debugging.
    • Displays a subtle indicator when metadata is unavailable.
  • Changes:
    • Modified CheckpointSaved.tsx to use fallback metadata when validation fails.
    • Added console warnings for metadata issues in CheckpointSaved.tsx.
    • Updated rendering logic to ensure checkpoints are always visible.

This description was created by Ellipsis for 1342a1e. You can customize this summary. It will automatically update as commits are pushed.

- Modified CheckpointSaved component to show fallback display when checkpoint metadata is missing or invalid
- Added console warnings to help debug checkpoint metadata issues
- Prevents checkpoints from being completely hidden due to schema validation failures
- Fixes issue #5899 where users reported not seeing checkpoints despite having them enabled

The component now:
- Shows a fallback checkpoint display with default metadata when validation fails
- Logs warnings to console for debugging purposes
- Displays "metadata unavailable" indicator when using fallback data
- Ensures CheckpointMenu still functions with fallback metadata
@roomote roomote bot requested review from mrubens, cte and jr as code owners July 18, 2025 15:53
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Jul 18, 2025
</span>
{isCurrent && <span className="text-muted text-sm">{t("chat:checkpoint.current")}</span>}
{!metadata && (
<span className="text-muted text-xs italic">
{t("chat:checkpoint.metadataUnavailable", "metadata unavailable")}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid providing an inline English fallback string in the translation call. Remove the second argument from t('chat:checkpoint.metadataUnavailable') and manage defaults via the translation JSON files.

Suggested change
{t("chat:checkpoint.metadataUnavailable", "metadata unavailable")}
{t("chat:checkpoint.metadataUnavailable")}

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 18, 2025
@daniel-lxs
Copy link
Collaborator

@roomote-agent use the switch_mode tool to switch to pr-fixer mode and address the comment left by ellipsis-bot on this PR, do not create a new PR

Copy link
Author

roomote bot commented Jul 18, 2025

👋 I've received your request and switched to pr-fixer mode. I can see the ellipsis-bot comment about removing the inline English fallback string from the translation call. I'll address this issue now.

@daniel-lxs daniel-lxs moved this from Triage to PR [Draft / In Progress] in Roo Code Roadmap Jul 18, 2025
@hannesrudolph hannesrudolph added PR - Draft / In Progress and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR - Draft / In Progress size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: PR [Draft / In Progress]
Development

Successfully merging this pull request may close these issues.

Dont see any Checkpoints in the chat
3 participants