Mikhail Kilin
|
e690acfb09
|
test: complete Phase 4 testing - utils tests and performance benchmarks
Added 9 new unit tests for utils/formatting.rs functions:
- format_date: 4 tests (today, yesterday, old, epoch)
- format_was_online: 5 tests (just now, minutes/hours/days ago, very old)
Created 3 performance benchmark files using criterion:
- benches/group_messages.rs - message grouping benchmarks
- benches/formatting.rs - timestamp/date formatting benchmarks
- benches/format_markdown.rs - markdown parsing benchmarks
Updated documentation:
- CONTEXT.md: added Phase 4.1 (Utils) and 4.2 (Benchmarks) completion
- Total coverage: 188 tests + 8 benchmarks = 196 tests (100%)
All 565 tests passing with 100% success rate.
|
2026-02-01 23:04:43 +03:00 |
|
Mikhail Kilin
|
09c5c5674e
|
feat: add structured logging with tracing (P5.17)
CI / Check (pull_request) Has been cancelled
CI / Format (pull_request) Has been cancelled
CI / Clippy (pull_request) Has been cancelled
CI / Build (macos-latest) (pull_request) Has been cancelled
CI / Build (ubuntu-latest) (pull_request) Has been cancelled
CI / Build (windows-latest) (pull_request) Has been cancelled
Replaced eprintln! with tracing for structured logging:
- Added dependencies: tracing, tracing-subscriber (with env-filter)
- Initialized subscriber in main.rs with default warn level
- Replaced all eprintln! calls in src/config.rs with tracing macros:
* warn!() for warnings (4 occurrences)
* error!() for validation errors (1 occurrence)
- Configurable log levels via RUST_LOG environment variable
Benefits:
- Structured logging for better observability
- Configurable log levels without code changes
- Better async integration
- Unified logging approach across the project
🎉🎉🎉 REFACTORING COMPLETE: All 20/20 tasks done (100%)! 🎉🎉🎉
Priority 5: 3/3 tasks ✅ COMPLETE
Total progress: 20/20 tasks (100%) ✅ COMPLETE
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-02-01 02:29:08 +03:00 |
|
Mikhail Kilin
|
67739583f3
|
refactor: generalize LruCache to support any key type (P5.16)
Made LruCache generic over key type K, not just UserId:
- LruCache<V> → LruCache<K, V>
- Added trait bounds: K: Eq + Hash + Clone + Copy
- Updated UserCache field types:
* user_usernames: LruCache<UserId, String>
* user_names: LruCache<UserId, String>
* user_statuses: LruCache<UserId, UserOnlineStatus>
Benefits:
- Reusable cache implementation for any key types
- Type-safe caching
- No additional dependencies
Progress: Priority 5: 2/3 tasks, Total: 18/20 (90%)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-02-01 02:26:03 +03:00 |
|
Mikhail Kilin
|
56bddabbe1
|
feat: add optional feature flags for clipboard and url-open (P5.15)
Implemented feature flags to make dependencies optional:
- clipboard feature: controls arboard dependency
- url-open feature: controls open dependency
- Both enabled by default for backward compatibility
Changes:
- Cargo.toml: Added [features] section with optional deps
- src/input/main_input.rs: Conditional compilation for open::that() and copy_to_clipboard()
- tests/copy.rs: Clipboard tests only compile with feature enabled
- Graceful degradation: user-friendly error messages when features disabled
Benefits:
- Smaller binary size when features disabled
- Modular functionality
- Better platform compatibility
Progress: Priority 5: 1/3 tasks, Total: 17/20 (85%)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-02-01 02:23:17 +03:00 |
|
Mikhail Kilin
|
426af96941
|
docs: update CONTEXT.md with Priority 3 completion
- Document P3.10 Hotkey mapping completion (9 tests)
- Document P3.9 Message grouping completion (7 tests)
- Document P4.12 Rustdoc partial progress (30%)
- Update Priority 3 status: 100% (4/4 tasks) complete
- All 464 tests passing
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-02-01 00:25:57 +03:00 |
|
Mikhail Kilin
|
1b70b12799
|
docs: update CONTEXT.md with refactoring progress
- Document P3.9 (Message Grouping) completion
- Document P3.10 (Hotkey Mapping) completion
- Document P4.12 (Rustdoc) partial completion
- Priority 3: 100% complete! 🎉
- Overall refactoring: 12/17 tasks (71%)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-01-31 23:53:58 +03:00 |
|
Mikhail Kilin
|
1629c0fc6a
|
refactor: add hotkey mapping configuration (P3.10)
- Add HotkeysConfig structure in src/config.rs
- Implement matches(key: KeyCode, action: &str) method
- Support for 10 configurable hotkeys:
* Navigation: up, down, left, right (vim + russian + arrows)
* Actions: reply, forward, delete, copy, react, profile
- Add support for char keys and special keys (Up, Down, Delete, etc)
- Add default values for all hotkeys (english + russian layouts)
- Write 9 unit tests (all passing)
- Add rustdoc documentation with examples
- Update REFACTORING_ROADMAP.md (Priority 3: 4/4 tasks, 100%)
- Update CONTEXT.md with implementation details
- Overall refactoring progress: 12/17 tasks (71%)
Priority 3 is now 100% complete! 🎉
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-01-31 23:51:10 +03:00 |
|
Mikhail Kilin
|
0ca3da54e7
|
refactor: extract message grouping logic (P3.9)
- Create src/message_grouping.rs module (255 lines)
- Add MessageGroup enum (DateSeparator, SenderHeader, Message)
- Add group_messages() function for date/sender grouping
- Write 5 unit tests (all passing)
- Add full rustdoc documentation with examples
- Update REFACTORING_ROADMAP.md (Priority 3: 3/4 tasks, 75%)
- Update CONTEXT.md with refactoring progress
- Overall refactoring progress: 11/17 tasks (65%)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-01-31 23:30:41 +03:00 |
|
Mikhail Kilin
|
c5896b7f14
|
tests
|
2026-01-31 23:02:53 +03:00 |
|
Mikhail Kilin
|
af3c36b9a1
|
docs: обновлён CONTEXT.md с описанием исправлений
Добавлено описание исправлений от 31 января (вечер):
- Исправление отображения новых сообщений
- Исправление редактирования
- Исправление reply
- Удаление отладочных логов
|
2026-01-31 18:38:47 +03:00 |
|
Mikhail Kilin
|
644e36597d
|
fixes
|
2026-01-31 03:48:50 +03:00 |
|
Mikhail Kilin
|
1bf9b3d703
|
docs: celebrate Priority 2 completion! 🎉
Обновлена документация для отражения ПОЛНОГО ЗАВЕРШЕНИЯ Priority 2
(все 5 задач выполнены на 100%).
Изменения:
- CONTEXT.md: отмечен Priority 2 как завершённый (100%, 5/5)
- CONTEXT.md: добавлена секция P2.7 MessageBuilder
- CONTEXT.md: обновлён раздел "Последние обновления" с празднованием
- CONTEXT.md: добавлены итоги Priority 2
- CONTEXT.md: обновлён технический долг
- REFACTORING_ROADMAP.md: отмечен P2.7 как завершённый
- REFACTORING_ROADMAP.md: добавлена детальная секция MessageBuilder
- REFACTORING_ROADMAP.md: обновлён общий прогресс (47%, 8/17 задач)
🏆 ИТОГИ PRIORITY 2 (100%):
✅ P2.5 — Error enum
✅ P2.3 — Config validation
✅ P2.4 — Newtype для ID
✅ P2.6 — MessageInfo реструктуризация
✅ P2.7 — MessageBuilder pattern
Статус: Priority 2 ПОЛНОСТЬЮ ЗАВЕРШЁН! 🎊
Следующий этап: Priority 3 (UI компоненты, форматирование)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-01-31 02:03:59 +03:00 |
|
Mikhail Kilin
|
5709fab9c3
|
docs: update documentation for P2.6 completion
Обновлена документация для отражения завершения задачи P2.6
(реструктуризация MessageInfo).
Изменения:
- CONTEXT.md: добавлен P2.6 в завершённые задачи Priority 2
- CONTEXT.md: обновлён статус Priority 2 (80%, 4/5 задач)
- CONTEXT.md: добавлена детальная секция "Последние обновления"
- CONTEXT.md: обновлён технический долг
- REFACTORING_ROADMAP.md: отмечен P2.6 как завершённый
- REFACTORING_ROADMAP.md: обновлён общий прогресс (41%, 7/17 задач)
- REFACTORING_ROADMAP.md: добавлено "Что сделано" для P2.6
Статус: Priority 2 - 80% (4/5 задач)
Осталась последняя задача: P2.7 MessageBuilder pattern
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-01-31 01:47:51 +03:00 |
|
Mikhail Kilin
|
7081a886ad
|
refactor: implement newtype pattern for IDs (P2.4)
Добавлены типобезопасные обёртки ChatId, MessageId, UserId для предотвращения
смешивания разных типов идентификаторов на этапе компиляции.
Изменения:
- Создан src/types.rs с тремя newtype структурами
- Реализованы методы: new(), as_i64(), From<i64>, Display
- Добавлены traits: Hash, Eq, Serialize, Deserialize
- Обновлены 15+ модулей для использования новых типов:
* tdlib: types.rs, chats.rs, messages.rs, users.rs, reactions.rs, client.rs
* app: mod.rs, chat_state.rs
* input: main_input.rs
* tests: app_builder.rs, test_data.rs
- Исправлены 53 ошибки компиляции связанные с type conversions
Преимущества:
- Компилятор предотвращает смешивание разных типов ID
- Улучшенная читаемость кода (явные типы вместо i64)
- Самодокументирующиеся типы
Статус: Priority 2 теперь 60% (3/5 задач)
- ✅ Error enum
- ✅ Config validation
- ✅ Newtype для ID
- ⏳ MessageInfo реструктуризация
- ⏳ MessageBuilder pattern
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-01-31 01:33:18 +03:00 |
|
Mikhail Kilin
|
38e73befc1
|
fixes
|
2026-01-31 01:00:43 +03:00 |
|
Mikhail Kilin
|
bba5cbd22d
|
fixes
|
2026-01-30 23:55:01 +03:00 |
|
Mikhail Kilin
|
a4cf6bac72
|
fixes
|
2026-01-30 16:18:16 +03:00 |
|
Mikhail Kilin
|
126c7482af
|
fixes
CI / Check (pull_request) Has been cancelled
CI / Format (pull_request) Has been cancelled
CI / Clippy (pull_request) Has been cancelled
CI / Build (macos-latest) (pull_request) Has been cancelled
CI / Build (ubuntu-latest) (pull_request) Has been cancelled
CI / Build (windows-latest) (pull_request) Has been cancelled
|
2026-01-29 01:22:57 +03:00 |
|
Mikhail Kilin
|
68a2b7a982
|
fixes
|
2026-01-28 11:39:21 +03:00 |
|
Mikhail Kilin
|
051c4a0265
|
fixes
CI / Check (pull_request) Has been cancelled
CI / Format (pull_request) Has been cancelled
CI / Clippy (pull_request) Has been cancelled
CI / Build (macos-latest) (pull_request) Has been cancelled
CI / Build (ubuntu-latest) (pull_request) Has been cancelled
CI / Build (windows-latest) (pull_request) Has been cancelled
|
2026-01-28 01:29:03 +03:00 |
|
Mikhail Kilin
|
f291191577
|
fixes
|
2026-01-27 23:29:00 +03:00 |
|
Mikhail Kilin
|
46720b3584
|
fixes
|
2026-01-25 21:21:07 +03:00 |
|
Mikhail Kilin
|
fa749d24c5
|
fixes
|
2026-01-24 18:53:35 +03:00 |
|
Mikhail Kilin
|
22c4e17377
|
fixes
|
2026-01-24 02:22:47 +03:00 |
|
Mikhail Kilin
|
c18f43664e
|
fixes
|
2026-01-22 15:26:15 +03:00 |
|
Mikhail Kilin
|
1ef341d907
|
commit
|
2026-01-21 21:20:18 +03:00 |
|
Mikhail Kilin
|
32ab1df1fa
|
fixes
|
2026-01-21 02:27:08 +03:00 |
|
Mikhail Kilin
|
9912ac11bd
|
fixes
|
2026-01-20 14:54:30 +03:00 |
|
Mikhail Kilin
|
699f50a59c
|
fixes
|
2026-01-20 13:37:02 +03:00 |
|
Mikhail Kilin
|
b6d9291864
|
fixes
|
2026-01-20 01:00:12 +03:00 |
|