- Переписан алгоритм redistributeWordsEvenly с жадным подходом
- Добавлена пост-обработка для исправления последовательных дубликатов
- Исключаемое слово (текущее) теперь корректно не появляется первым
- Исправлен race condition с cardsShown через использование ref
- Добавлена проверка на null/undefined слова в пуле
v3.5.5
- Добавлен учёт текущей карточки при перераспределении (не показывается следующей)
- Исправлен алгоритм равномерного распределения для предотвращения подряд идущих одинаковых карточек
- Исправлен правый счётчик: показывает текущий размер пула + показанные карточки (не больше maxCards)
Features:
- User registration and login with JWT tokens
- All data is now user-specific (multi-tenancy)
- Profile page with integrations and logout
- Automatic migration of existing data to first user
Backend changes:
- Added users and refresh_tokens tables
- Added user_id to all data tables (projects, entries, nodes, dictionaries, words, progress, configs, telegram_integrations, weekly_goals)
- JWT authentication middleware
- claimOrphanedData() for data migration
Frontend changes:
- AuthContext for state management
- Login/Register forms
- Profile page (replaced Integrations)
- All API calls use authFetch with Bearer token
Migration notes:
- On first deploy, backend automatically adds user_id columns
- First user to login claims all existing data