Skip to content

FEATURE: Add diff streaming animation #1355

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

Merged
merged 3 commits into from
May 21, 2025
Merged

Conversation

keegangeorge
Copy link
Member

@keegangeorge keegangeorge commented May 21, 2025

🔍 Overview

Previously we attempted to add a diff streaming animation to the AI composer helper: #1332, but it resulted in issues despite attempted fixes (#1338) so we temporarily suppressed the diff animation (#1341).

This update makes a second attempt at implementing the diff streaming animation. Instead of creating a custom diff algorithm, we make use of a third-party library jsDiff (which we added to core here: discourse/discourse#32833). While streaming, the diff animation often struggles with markdown links and images, so we make use of markdown-it parser to detect those cases and prevent breaking the animation.

📹 Preview

working.mov

keegangeorge added a commit to discourse/discourse that referenced this pull request May 21, 2025
SamSaffron pushed a commit to discourse/discourse that referenced this pull request May 21, 2025
Second attempt at implementing diff streaming animation for proofreading
@SamSaffron SamSaffron force-pushed the diff-streaming-with-diff-js branch from 1d49580 to 595bb66 Compare May 21, 2025 21:35
@keegangeorge keegangeorge marked this pull request as ready for review May 21, 2025 21:45
@SamSaffron SamSaffron merged commit c29183f into main May 21, 2025
6 checks passed
@SamSaffron SamSaffron deleted the diff-streaming-with-diff-js branch May 21, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants