[PR #26408] fix(turbopack): fix animation issues with unnamed animations in CSS modules #31426

Closed
opened 2026-02-21 20:49:26 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/26408

State: closed
Merged: Yes


Summary

This PR fixes animation issues that occur when using turbopack with CSS modules in development mode. The issue was caused by incomplete animation declarations that lacked explicit animation names, which turbopack handles more strictly than webpack.

Problem: Chat bubble and avatar loading animations were breaking in development mode when using turbopack because the CSS animations were declared without explicit animation names:

animation: 1s infinite linear alternate; /* Missing animation name */

Solution: Added explicit animation names to all animation declarations:

animation: dot-flashing 1s infinite linear alternate; /* Complete declaration */

Fixes #26387

Changes Made

  • Fixed .dot-flashing animations in /web/app/components/base/chat/chat/loading-anim/style.module.css
  • Added complete animation declarations with proper keyframe names
  • Maintained original timing and visual effects for the three-dot loading indicator
  • Ensured compatibility between webpack and turbopack build systems

Testing

  • Lint checks pass
  • Animations work correctly in both development and production modes
  • No breaking changes to existing functionality
  • Maintains backward compatibility

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/26408 **State:** closed **Merged:** Yes --- ## Summary This PR fixes animation issues that occur when using turbopack with CSS modules in development mode. The issue was caused by incomplete animation declarations that lacked explicit animation names, which turbopack handles more strictly than webpack. **Problem**: Chat bubble and avatar loading animations were breaking in development mode when using turbopack because the CSS animations were declared without explicit animation names: ```css animation: 1s infinite linear alternate; /* Missing animation name */ ``` **Solution**: Added explicit animation names to all animation declarations: ```css animation: dot-flashing 1s infinite linear alternate; /* Complete declaration */ ``` **Fixes #26387** ## Changes Made - Fixed `.dot-flashing` animations in `/web/app/components/base/chat/chat/loading-anim/style.module.css` - Added complete animation declarations with proper keyframe names - Maintained original timing and visual effects for the three-dot loading indicator - Ensured compatibility between webpack and turbopack build systems ## Testing - ✅ Lint checks pass - ✅ Animations work correctly in both development and production modes - ✅ No breaking changes to existing functionality - ✅ Maintains backward compatibility ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran \`dev/reformat\`(backend) and \`cd web && npx lint-staged\`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:49:26 -05:00
yindo closed this issue 2026-02-21 20:49:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#31426