From 31bda669e02461ba54076966f00644d7507b7a84 Mon Sep 17 00:00:00 2001 From: Narasimha-sc <166327228+Narasimha-sc@users.noreply.github.com> Date: Fri, 23 Oct 2026 02:41:38 +0000 Subject: [PATCH] ui tests: finding 30 (After-load loop after opening a chat around an item), four go-to tests marked --- .../chat/simplex/app/ui/chat/ChatSearchTest.kt | 2 ++ .../kotlin/chat/simplex/app/ui/chat/ForwardTest.kt | 2 ++ .../kotlin/chat/simplex/app/ui/chat/ItemInfoTest.kt | 2 ++ .../simplex/app/ui/groups/MemberAdmissionTest.kt | 2 ++ .../ui-tests/2026-10-10-desktop-ui-test-dsl-plan.md | 12 ++++++++++++ 5 files changed, 20 insertions(+) diff --git a/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/chat/ChatSearchTest.kt b/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/chat/ChatSearchTest.kt index a162b84c51..c5853226d5 100644 --- a/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/chat/ChatSearchTest.kt +++ b/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/chat/ChatSearchTest.kt @@ -1,6 +1,7 @@ package chat.simplex.app.ui.chat import chat.simplex.app.ui.harness.CONNECT_TIMEOUT_MS +import chat.simplex.app.ui.harness.KnownAppIssue import chat.simplex.app.ui.harness.UiScope import chat.simplex.app.ui.harness.UiTest import chat.simplex.app.ui.harness.awaitRowText @@ -58,6 +59,7 @@ class ChatSearchTest : UiTest() { } } + @KnownAppIssue("15.5 item 30", "Compose-Espresso link", intermittent = true) @Test fun search_goToResult_opensAroundItem() = uiTest { val alice = app("alice"); val bob = cli("bob") connect(bob) diff --git a/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/chat/ForwardTest.kt b/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/chat/ForwardTest.kt index 1ab025464b..c98a8bfaa5 100644 --- a/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/chat/ForwardTest.kt +++ b/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/chat/ForwardTest.kt @@ -2,6 +2,7 @@ package chat.simplex.app.ui.chat import chat.simplex.app.ui.harness.CONNECT_TIMEOUT_MS import chat.simplex.app.ui.harness.ChatScreen +import chat.simplex.app.ui.harness.KnownAppIssue import chat.simplex.app.ui.harness.UiScope import chat.simplex.app.ui.harness.UiTest import chat.simplex.app.ui.harness.awaitRowText @@ -50,6 +51,7 @@ class ForwardTest : UiTest() { poll(what = "the `saved from` / `bob` header") { textsOf(Ui.Chat.Item(id)).let { t -> t.any { "saved from" in it } && "bob" in t } } } + @KnownAppIssue("15.5 item 30", "Compose-Espresso link", intermittent = true) @Test fun forward_acrossChatTypes_peersReceiveAndSourceOpens() = uiTest { val alice = app("alice"); val bob = cli("bob"); val cath = cli("cath") connect(bob); connect(cath) diff --git a/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/chat/ItemInfoTest.kt b/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/chat/ItemInfoTest.kt index 4d273047d5..8ee9001443 100644 --- a/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/chat/ItemInfoTest.kt +++ b/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/chat/ItemInfoTest.kt @@ -1,6 +1,7 @@ package chat.simplex.app.ui.chat import chat.simplex.app.ui.harness.CONNECT_TIMEOUT_MS +import chat.simplex.app.ui.harness.KnownAppIssue import chat.simplex.app.ui.harness.UiScope import chat.simplex.app.ui.harness.UiTest import chat.simplex.app.ui.harness.awaitRowText @@ -136,6 +137,7 @@ class ItemInfoTest : UiTest() { } } + @KnownAppIssue("15.5 item 30", "Compose-Espresso link", intermittent = true) @Test fun info_forwardedTab_showsSource() = uiTest { val alice = app("alice"); val bob = cli("bob") connect(bob) diff --git a/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/groups/MemberAdmissionTest.kt b/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/groups/MemberAdmissionTest.kt index 881b26167b..eebd4e7116 100644 --- a/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/groups/MemberAdmissionTest.kt +++ b/apps/multiplatform/common/src/uiTestShared/kotlin/chat/simplex/app/ui/groups/MemberAdmissionTest.kt @@ -1,6 +1,7 @@ package chat.simplex.app.ui.groups import chat.simplex.app.ui.harness.CONNECT_TIMEOUT_MS +import chat.simplex.app.ui.harness.KnownAppIssue import chat.simplex.app.ui.harness.SupportChatScreen import chat.simplex.app.ui.harness.UiTest import chat.simplex.app.ui.harness.acceptAlert @@ -52,6 +53,7 @@ class MemberAdmissionTest : UiTest() { poll(what = "`Review members` all when reopened") { "all" in a.review() } } + @KnownAppIssue("15.5 item 30", "Compose-Espresso link", intermittent = true) @Test fun review_acceptAsMember() = uiTest { val alice = app("alice"); val bob = cli("bob") val chat = pendingLinkJoin(alice, bob, "team") diff --git a/plans/ui-tests/2026-10-10-desktop-ui-test-dsl-plan.md b/plans/ui-tests/2026-10-10-desktop-ui-test-dsl-plan.md index 6230fd7a4e..9e03b3f62d 100644 --- a/plans/ui-tests/2026-10-10-desktop-ui-test-dsl-plan.md +++ b/plans/ui-tests/2026-10-10-desktop-ui-test-dsl-plan.md @@ -1697,6 +1697,18 @@ Fixed in the same review: `createGroup_opensChatAndInviteSheet` now checks the o 29. **A message received in an open group chat is missing from the chat, though the chat list shows it** (desktop, GitHub CI trial 6, 2026-10-23, 1 of 101 tests in the shard; `MemberReportTest.report_member_spam_moderatorsReceive`, marked `@KnownAppIssue("15.5 item 29", intermittent = true)`). alice's `team` chat was opened and settled (`chatModel.chatId` set, no API call in flight) before cath sent `inappropriate joke`. 60 s later the row showed `cath: inappropriate joke` with unread 1, but the open chat's `chatItems` did not have it; the chat showed only the merged `cath and bob connected and 1 other events`. Cause not found. Candidate, not confirmed: a pagination load after the open (`ChatView.kt:541-546` → `apiLoadMessages`) publishes a snapshot read before the message arrived, through the same two-step publication as item 25 (`ChatItemsLoader.kt:64-91`). +30. **Loading newer messages repeats after a chat is opened around an item** (Android; go-to from search or from a forwarded item, and a member's support chat; `ChatSearchTest.search_goToResult_opensAroundItem`, `ForwardTest.forward_acrossChatTypes_peersReceiveAndSourceOpens`, `ItemInfoTest.info_forwardedTab_showsSource`, `MemberAdmissionTest.review_acceptAsMember`, marked `@KnownAppIssue("15.5 item 30", intermittent = true)` because they pass on desktop). + - **Mechanism:** + 1. An Around load always adds a split at its newest loaded item (`ChatItemsLoader.kt:145`), even when nothing newer exists. An Initial load adds it only when `afterTotal > 0` (`:65`). + 2. `preloadItemsAfter` then requests `After(newest)` (`ChatView.kt:2785`). Its empty result returns early (`ChatItemsLoader.kt:37-39`), so the split is never cleared. + 3. The `PreloadItems` effect exists only while no load is running (`ChatView.kt:2779`). A frame drawn during a load removes it, and when the load ends it is added back and requests the same `After` page again. + - **Measured with temporary logging (Waydroid, 2026-10-23):** + - In the app without the test harness, three go-tos produced bursts of 27, 10 and 2 redundant `apiGetChat` After calls, over up to 1.3 s, and then stopped. There was no extra rendering afterwards. + - Under the Android test clock, which produces frames continuously, the loop never ends: 2,300–3,800 loads per test, and the UI never becomes idle (`ComposeNotIdleException`). + - Desktop's paused clock merges the load start and end into one frame, so the loop does not occur there. + - The member-support-chat case is inferred to start from an Initial load with `afterTotal > 0`, not confirmed. + - **Fix idea, not done:** add the Around split only when `navInfo.afterTotal > 0`, as Initial does, and drop the split when an `After` load comes back empty. + ### 15.6 Catalogue corrections applied from passing tests (exhaustive pass) - 01:34 and 01:8: accepting conditions enables the operators selected in onboarding, not all preset ones.