Skip to content

Conversation

@bohutang
Copy link
Member

Summary

Fix markdown preview in timeline to display the complete rendered markdown file instead of only showing the diff changes snippet.

Previously, when clicking the preview button for a markdown file edit in the timeline, it only showed the changed lines (old_string/new_string from the Edit command). Now it reads the full file content and reconstructs the complete before/after versions for proper markdown preview.

Tests

  • Unit Test

Added comprehensive tests for DiffMetadataExtractor covering:

  • Full file content extraction for Edit commands
  • Fallback behavior when file cannot be read
  • Multiline edit replacements
  • Edge cases (missing parameters, binary files, large files)

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

- Update extractClaudeEdit to read full file and reconstruct old content
- Add comprehensive tests for DiffMetadataExtractor
@bohutang bohutang marked this pull request as ready for review January 21, 2026 05:14
@bohutang bohutang merged commit f228c56 into databendlabs:main Jan 21, 2026
3 checks passed
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