- Backend: added width/height fields to MessageAttachment model with Pillow auto-extraction - Migration: 0021_add_image_dimensions + populate_image_dimensions management command - API: serialize width/height in messageAttachmentSerializer and consumers.py - Frontend: switched from CSS aspect-ratio to explicit pixel calculation (Telegram approach) * messageRendererV2.js: calculate exact dimensions (maxWidth=500px, proportional height) * Fixes scroll jump issue: images now reserve exact space before loading * Debug logging added to validate dimension rendering - Testing: 18/18 images populated successfully with dimensions This prevents scroll position shifts when images load after initial positioning, implementing the same approach as Telegram Web. Related: scroll positioning, image preloading, chat UX
Backend - Отчеты и аудиты
Отчеты о выполненных работах по очистке и реорганизации backend/.
📋 Отчеты
BACKEND_CLEANUP_AUDIT.md
Аудит папки backend/:
- Найдено 49 лишних файлов
- 22 test_*.py скрипта
- 12 MD файлов документации
- План реорганизации
- Результаты выполнения
🎯 Назначение
Документация по:
- Аудитам backend кода
- Рефакторингу структуры
- Миграциям и обновлениям
- Анализу производительности
📝 Структура отчета
Каждый отчет должен содержать:
- Дата и автор
- Цель аудита
- Найденные проблемы
- Статистика "до/после"
- Выполненные действия
- Рекомендации