Verify Matrix room links preserve the active server draft

This commit is contained in:
omar committed 2026-11-27 17:12:07 +03:00
1 parent be3654f149
commit b684eca1d8
3 files changed
+27 -1

No files matched your search

+2
View File
@@ -2,6 +2,8 @@
## Current Windows account-free checkpoint (2026-11-26) ## Current Windows account-free checkpoint (2026-11-26)
**Central Matrix exclusion:** The native server-chat test rendered a matrix: room URI as non-interactive text and a matrix.to HTTPS room link as an external-link confirmation. Cancelling that prompt preserved the exact server conversation and its unsent draft. Together with the empty offline Chats check, this covers the account-free boundary, not central or server-hosted Matrix transport. Neither a browser nor a Matrix server was contacted.
**Account and Remote Apps exclusions:** An isolated Slint window showed local identity settings, no Account or Remote Apps category, and a disabled account-only private-message setting with the account requirement. Attempting that setting and then sending from empty offline Chats left no conversation, tab, login dialog or active server connection. The ordinary server-chat Matrix notice was tested separately. This verifies the native UI boundary, not account interoperability or a network traffic audit. An empty chat alone does not establish what a stale central-room link does when another conversation is open. **Account and Remote Apps exclusions:** An isolated Slint window showed local identity settings, no Account or Remote Apps category, and a disabled account-only private-message setting with the account requirement. Attempting that setting and then sending from empty offline Chats left no conversation, tab, login dialog or active server connection. The ordinary server-chat Matrix notice was tested separately. This verifies the native UI boundary, not account interoperability or a network traffic audit. An empty chat alone does not establish what a stale central-room link does when another conversation is open.
**Block Incoming Whispers shortcut (excluded):** The reference declares ActivateBlock, DeactivateBlock and ToggleBlock without a demonstrated dispatcher. Importing those modes in a disposable version 2 shortcut profile produced an explicit diagnostic, no local down/up action, and no global registration candidates; the profile bytes and a working Reply Whisper chord were preserved. The supported receive-mode selector is separate. No OS global shortcut was registered. **Block Incoming Whispers shortcut (excluded):** The reference declares ActivateBlock, DeactivateBlock and ToggleBlock without a demonstrated dispatcher. Importing those modes in a disposable version 2 shortcut profile produced an explicit diagnostic, no local down/up action, and no global registration candidates; the profile bytes and a working Reply Whisper chord were preserved. The supported receive-mode selector is separate. No OS global shortcut was registered.
+2
View File
@@ -4,6 +4,8 @@
## Возврат к разработке на ПК, 2026-11-26 ## Возврат к разработке на ПК, 2026-11-26
Windows, база `be3654f`: закрыт `feature:chat.central_matrix` как исключение. В открытом серверном чате ссылка `matrix:` неактивна, а `https://matrix.to/` вызывает подтверждение внешней ссылки; отмена сохраняет адресата и черновик. Два теста Slint прошли в отдельных процессах, без сети и внешнего браузера. Серверные комнаты Matrix этим не реализованы.
Windows, база `a8fc57c`: проверены исключения `feature:myts.account_cloud` и `feature:remote_apps` в настройках Slint с одноразовым профилем. Попытка включить облачные личные сообщения оставила клиент без входа и без соединения; пустой Chats не создал беседу при попытке отправки. Прошли три теста, включая отдельный сценарий объявления серверного Matrix. Для `feature:chat.central_matrix` не проверен переход по адресу комнаты при открытой серверной беседе. Windows, база `a8fc57c`: проверены исключения `feature:myts.account_cloud` и `feature:remote_apps` в настройках Slint с одноразовым профилем. Попытка включить облачные личные сообщения оставила клиент без входа и без соединения; пустой Chats не создал беседу при попытке отправки. Прошли три теста, включая отдельный сценарий объявления серверного Matrix. Для `feature:chat.central_matrix` не проверен переход по адресу комнаты при открытой серверной беседе.
Windows, база `149bad2`: закрыт `feature:whisper.block_hotkey` как проверенное исключение. Три режима блокировки из TS6 не регистрируются и не обрабатывают нажатие; действительная привязка ответа и исходные байты профиля v2 сохранены. Причина отражена в диагностике. Прошли три теста загрузки профилей и диспетчеризации, без глобальной регистрации в Windows. Windows, база `149bad2`: закрыт `feature:whisper.block_hotkey` как проверенное исключение. Три режима блокировки из TS6 не регистрируются и не обрабатывают нажатие; действительная привязка ответа и исходные байты профиля v2 сохранены. Причина отражена в диагностике. Прошли три теста загрузки профилей и диспетчеризации, без глобальной регистрации в Windows.
+23 -1
View File
@@ -352,7 +352,7 @@ fn account_only_actions_do_not_open_or_send_from_the_offline_client() {
use crate::{AppConfig, DialogBridge, SettingsBridge, services::{profile::ProfileServices, profile_import::initialize_native_root}, ui::{settings::Category, shell::Destination}}; use crate::{AppConfig, DialogBridge, SettingsBridge, services::{profile::ProfileServices, profile_import::initialize_native_root}, ui::{settings::Category, shell::Destination}};
use slint::Model; use slint::Model;
headless::install().unwrap(); if !headless::install_for_test(){return;}
let temp=tempfile::tempdir().unwrap(); let temp=tempfile::tempdir().unwrap();
let root=temp.path().join("profile"); let root=temp.path().join("profile");
initialize_native_root(&root).unwrap(); initialize_native_root(&root).unwrap();
@@ -412,6 +412,28 @@ fn server_matrix_notice_tracks_advertisement_without_disabling_plain_chat() {
s.chat.conversation.as_ref().is_some_and(|c|matches!(c.target.target,ChatTarget::Server))&&bridge.get_enabled()&&if advertised{status.contains("Matrix rooms")&&status.contains("standard server chat")}else{status.is_empty()} s.chat.conversation.as_ref().is_some_and(|c|matches!(c.target.target,ChatTarget::Server))&&bridge.get_enabled()&&if advertised{status.contains("Matrix rooms")&&status.contains("standard server chat")}else{status.is_empty()}
}).await?; }).await?;
assert!(runtime.snapshot().dialog.is_none()); assert!(runtime.snapshot().dialog.is_none());
if advertised {
use crate::DialogBridge;
use slint::Model;
const DRAFT: &str="Unsent server message";
const URL: &str="https://matrix.to/#/!room:example.org";
let source=format!("[NativeRoom](matrix:roomid/room:example.org) [WebRoom]({URL})");
let target=runtime.snapshot().chat.conversation.as_ref().unwrap().target.clone();
bridge.invoke_draft_edited(DRAFT.into(),DRAFT.len() as i32,DRAFT.len() as i32);
manager.fixture_control(&key,json!({"event":"text","generation":key.generation,"target":"server","from_client_id":2,
"from_uid":"FixturePeer=","from_nickname":"Peer","message":source})).await.map_err(|e|e.to_string())?;
let room_run=|label:&str|bridge.get_rows().iter().find_map(|row|row.runs.iter().find(|run|run.text==label));
until("both room links rendered in the server conversation",||room_run("NativeRoom").is_some() && room_run("WebRoom").is_some()).await?;
assert!(room_run("NativeRoom").unwrap().action.is_empty());
let web=room_run("WebRoom").unwrap();assert!(!web.action.is_empty());
bridge.invoke_activate(web.action);
let dialog=ui.global::<DialogBridge>();
until("external link confirmation for the room URL",||dialog.get_visible() && dialog.get_description().contains(URL)
&& runtime.snapshot().dialog.as_ref().is_some_and(|form|form.operation==Operation::ConfirmExternalLink)).await?;
dialog.invoke_cancel();
until("server draft after cancelling external room link",||!dialog.get_visible() && bridge.get_editor_text()==DRAFT
&& runtime.snapshot().chat.conversation.as_ref().is_some_and(|c|c.target==target && c.draft==DRAFT)).await?;
}
} }
manager.fixture_control(&key,json!({"event":"state","state":"disconnected","generation":key.generation})).await.map_err(|e|e.to_string())?; manager.fixture_control(&key,json!({"event":"state","state":"disconnected","generation":key.generation})).await.map_err(|e|e.to_string())?;
until("disconnected",||!runtime.snapshot().connections.any_active()).await?; until("disconnected",||!runtime.snapshot().connections.any_active()).await?;