Verify nondefault identity selection and bookmarks after UI reattachment

This commit is contained in:
omar committed 2026-11-27 00:33:44 +03:00
1 parent 9496f99fd4
commit 6f8e4bd3df
3 files changed
+46

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)
**Identity list updates:** Windows Slint retained a nondefault UID and its related bookmark when replacing the window attachment, even with identical display names. Editing the nickname in the new window changed only that UID; switching to the default did not expose the other identity's bookmark. Two attachment tests passed. Creation, default selection, additive INI import and confirmed deletion were exercised in the separate identity workflows below.
**Identity improvement progress:** The Windows Slint regression for `preload:onIdentityProgress` ran two searches on the same disposable identity. A late cancellation for the first job did not stop the second or replace its displayed target and quality; the active Cancel stopped the correct job and its final search offset matched the persisted checkpoint. **Identity improvement progress:** The Windows Slint regression for `preload:onIdentityProgress` ran two searches on the same disposable identity. A late cancellation for the first job did not stop the second or replace its displayed target and quality; the active Cancel stopped the correct job and its final search offset matched the persisted checkpoint.
**Identity export cancellation:** Windows UI Automation cancelled the private-key warning and confirmed no Save dialog opened. After accepting the warning, cancelling the native Save dialog left an existing backup unchanged and did not create a new INI. Together with the verified export/import UID round trip, this covers the Windows `preload:exportIdentity` contract. **Identity export cancellation:** Windows UI Automation cancelled the private-key warning and confirmed no Save dialog opened. After accepting the warning, cancelling the native Save dialog left an existing backup unchanged and did not create a new INI. Together with the verified export/import UID round trip, this covers the Windows `preload:exportIdentity` contract.
+2
View File
@@ -4,6 +4,8 @@
## Возврат к разработке на ПК, 2026-11-26 ## Возврат к разработке на ПК, 2026-11-26
Windows, preload:onIdentitiesChanged: в тесте reattached_identity_details_keep_nondefault_uid_and_its_bookmarks новая привязка окна сохранила выбранный недефолтный UID при одинаковых именах двух идентичностей. В Details показана связанная с ним закладка; изменение ника затронуло только выбранный UID. При выборе другой идентичности чужая закладка не показывалась. Прошли оба теста смены окна; работа выполнялась на временных профилях без сети.
Windows, preload:onIdentityProgress: тест old_cancel_cannot_stop_or_relabel_a_new_identity_search прошёл в нативном окне с одним временным UID. После отмены поиска с целью 99 начат поиск с целью 100. Старая команда отмены не остановила второй поиск: его счётчик продолжил расти, а отображаемый уровень и цель относились к новой задаче. Отмена из текущего окна завершила работу, сохранённая позиция совпала с итоговым результатом. Сеть и физические устройства не использовались. Windows, preload:onIdentityProgress: тест old_cancel_cannot_stop_or_relabel_a_new_identity_search прошёл в нативном окне с одним временным UID. После отмены поиска с целью 99 начат поиск с целью 100. Старая команда отмены не остановила второй поиск: его счётчик продолжил расти, а отображаемый уровень и цель относились к новой задаче. Отмена из текущего окна завершила работу, сохранённая позиция совпала с итоговым результатом. Сеть и физические устройства не использовались.
Windows, preload:exportIdentity: проверена отмена на обоих этапах в отдельном временном профиле. После Cancel в предупреждении о приватном ключе системный Save не открылся. В двух отдельных диалогах Save введены путь существующего файла и путь нового INI; после Cancel содержимое существующего файла и состав каталога не изменились. Успешный перенос и совпадение UID проверены ранее. Тестовое окно закрыто, профиль и каталог удалены. Windows, preload:exportIdentity: проверена отмена на обоих этапах в отдельном временном профиле. После Cancel в предупреждении о приватном ключе системный Save не открылся. В двух отдельных диалогах Save введены путь существующего файла и путь нового INI; после Cancel содержимое существующего файла и состав каталога не изменились. Успешный перенос и совпадение UID проверены ранее. Тестовое окно закрыто, профиль и каталог удалены.
+42
View File
@@ -298,6 +298,48 @@ struct Persistence {
checkpoint: Checkpoint, checkpoint: Checkpoint,
} }
#[cfg(test)]
#[test]
fn reattached_identity_details_keep_nondefault_uid_and_its_bookmarks() {
use crate::services::{profile::ProfileServices,profile_import::initialize_native_root};
if !headless::install_for_test() { return; }
let temp=tempfile::tempdir().unwrap();
let root=temp.path().join("profile");
initialize_native_root(&root).unwrap();
let (default,other)={
let p=ProfileServices::open(&root).unwrap();
p.identities.onboard("Default nickname").unwrap();
let first=p.identities.list().unwrap().identities.into_iter().next().unwrap();
let second=p.identities.create(&first.name,"Other nickname").unwrap();
(first.uid,second.uid)
};
run_ui(&AppConfig::isolated(root),async move |runtime,ui| {
wait(runtime,"identity roster",|s|s.settings.loaded.then_some(())).await?;
category(runtime,ui,Category::Identities).await?;
choose_identity(runtime,ui,&other).await?;
let saved=bookmark(runtime,ui,&other).await?;
wait(runtime,"related bookmark before detach",|_|row(ui,"bookmark:0").filter(|r|r.subtitle==BOOKMARK)).await?;
let owner=runtime.services.lock().unwrap().upgrade().ok_or("runtime services missing")?;
runtime.release_ui(runtime.ui_generation());
let attachment=application::bind(owner.runtime.upgrade().ok_or("runtime stopped")?,0).map_err(|e|e.to_string())?;
let fresh=attachment.window();
selected(runtime,fresh,&other).await?;
assert_eq!(row(fresh,"bookmark:0").unwrap().subtitle,BOOKMARK);
let field=format!("identity-nickname:{other}");
let serial=runtime.snapshot().settings_completed+1;
edit(fresh,&field,"Selected nickname")?;
let s=ack(runtime,serial,"edit after reattachment",None).await?;
assert_eq!(default_uid(&s)?,default);
assert_eq!(s.settings.identities.len(),2);
assert_eq!(identity(&s,&other)?.nickname,"Selected nickname");
assert_ne!(identity(&s,&default)?.nickname,"Selected nickname");
assert_eq!(s.settings.prefs["savedServers"].as_array().unwrap(),&[saved]);
choose_identity(runtime,fresh,&default).await?;
assert!(row(fresh,"bookmark:0").is_none());
Ok(())
}).unwrap();
}
#[cfg(test)] #[cfg(test)]
#[test] #[test]
fn old_cancel_cannot_stop_or_relabel_a_new_identity_search() { fn old_cancel_cannot_stop_or_relabel_a_new_identity_search() {