refactor: extract state modules and services from monolithic files
Some checks failed
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
Some checks failed
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
Извлечены state модули и сервисы из монолитных файлов для улучшения структуры: State модули: - auth_state.rs: состояние авторизации - chat_list_state.rs: состояние списка чатов - compose_state.rs: состояние ввода сообщений - message_view_state.rs: состояние просмотра сообщений - ui_state.rs: UI состояние Сервисы и утилиты: - chat_filter.rs: централизованная фильтрация чатов (470+ строк) - message_service.rs: сервис работы с сообщениями (17KB) - key_handler.rs: trait для обработки клавиш (380+ строк) Config модуль: - config.rs -> config/mod.rs: основной конфиг - config/keybindings.rs: настраиваемые горячие клавиши (420+ строк) Тесты: 626 passed ✅ Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Integration tests for config flow
|
||||
|
||||
use tele_tui::config::{Config, ColorsConfig, GeneralConfig, HotkeysConfig};
|
||||
use tele_tui::config::{Config, ColorsConfig, GeneralConfig, Keybindings};
|
||||
|
||||
/// Test: Дефолтные значения конфигурации
|
||||
#[test]
|
||||
@@ -32,7 +32,7 @@ fn test_config_custom_values() {
|
||||
reaction_chosen: "green".to_string(),
|
||||
reaction_other: "white".to_string(),
|
||||
},
|
||||
hotkeys: HotkeysConfig::default(),
|
||||
keybindings: Keybindings::default(),
|
||||
};
|
||||
|
||||
assert_eq!(config.general.timezone, "+05:00");
|
||||
@@ -115,7 +115,7 @@ fn test_config_toml_serialization() {
|
||||
reaction_chosen: "green".to_string(),
|
||||
reaction_other: "white".to_string(),
|
||||
},
|
||||
hotkeys: HotkeysConfig::default(),
|
||||
keybindings: Keybindings::default(),
|
||||
};
|
||||
|
||||
// Сериализуем в TOML
|
||||
|
||||
Reference in New Issue
Block a user