From 1a656eef86dc754f2b92a239f8ebd6f60ffd8d51 Mon Sep 17 00:00:00 2001 From: faumaray Date: Wed, 28 Oct 2026 11:00:45 +0300 Subject: [PATCH] voelin-gpui: a test that the voice page marks no chat as read; a heading Asking for the voice page opens the channel's chat tab in the state (logic::show_voice_view, open_chat with focus), which a front end that shows no chat must not mark as read: the test looks at the store. The properties and callbacks heading of the voice section is named for the page, so that its anchor does not collide with the tree section's. Co-Authored-By: Claude Sonnet 5.5 --- crates/voelin-gpui/src/view/voice_tests.rs | 4 ++++ docs/ui.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/voelin-gpui/src/view/voice_tests.rs b/crates/voelin-gpui/src/view/voice_tests.rs index 9928146..3b8e624 100644 --- a/crates/voelin-gpui/src/view/voice_tests.rs +++ b/crates/voelin-gpui/src/view/voice_tests.rs @@ -93,6 +93,10 @@ fn the_voice_page_takes_the_main_area_while_voice_is_connected_and_asked_for( assert!(at(cx, "main-server").is_none(), "in the server page's place"); assert!(shell.view.read_with(cx, |view, _| view.voice_page_shown())); assert!(shell.app.read_with(cx, |app, _| app.vm.voice_view), "the view model knows"); + // Asking for the page opens the channel's chat tab in the state, which a + // front end that shows no chat does not mark as read: nothing is stored. + let reads = shell.app.read_with(cx, |app, _| app.backend().store.chat_reads("demo-server")); + assert!(reads.unwrap().is_empty(), "no read mark for a chat nobody sees"); click(cx, "voice-chat-only"); assert!(at(cx, "voice-page").is_none() && at(cx, "main-server").is_some()); diff --git a/docs/ui.md b/docs/ui.md index c13420e..648e959 100644 --- a/docs/ui.md +++ b/docs/ui.md @@ -1858,7 +1858,7 @@ be registered) is in the log and `AppState::ptt_status`; changing the key at run time (`AppState::set_global_ptt`) is the settings slice's. The loop is the Slint front end's `GlobalPtt` repeated, as `HostedEngine` is. -#### The callbacks and the properties +#### The properties and callbacks of the voice page The plan counts 6 properties and 6 callbacks. The properties the page reads, and the callbacks of `bind/servers.rs` (and of `Nav`, whose functions call it) that its