- Extend the existing loopback Slint text smoke to cover detach, reconnect, and one delivery per conversation. - Verify injected stale text is rejected separately from live server delivery.
3.6 KiB
Native tab events on Windows
Scope: preload:onEvent, whose criterion covers state, snapshot and text delivery to the owning tab or conversation, including detach and reconnect. The native client consumes typed connection events; no Electron event dispatcher was added.
| Case | Evidence |
|---|---|
| Two live sessions | The existing Slint text smoke connected two distinct, muted test identities to private loopback beta14. Each tab's server snapshot reported its own client ID and the two expected guests. Both snapshots observed the temporary room and each tab joined it. Private and channel messages appeared exactly once in the sender and recipient conversations, with the expected sender UID. The server-chat attempt was refused by guest permissions and left its draft intact; successful server-chat delivery is not claimed. |
| Detach and reconnect | The extended live smoke received one channel message with no UI attached. It then disconnected only the recipient, verified that the sender stayed in the room, and reconnected the recipient's original tab under a newer session and generation. Reattaching Slint restored the earlier and detached messages once each. Another live channel message rendered once in the replacement conversation, with no replay of either earlier message. |
| Stale controls | The live smoke also submitted a synthetic text control through fixture_control with the retired recipient key. It got TargetChanged, and no such text appeared in the replacement conversation. Separately, the existing reducer test injected stale state, snapshot and text controls with a mismatched core generation or worker incarnation and checked that none reached the event sink. These are controlled injections, not delayed network packets. |
Receipts: target/native-tab-events.log records app::connections::tests::state_transitions_revoke_sessions_and_ignore_foreign_generation_and_worker, 1 passed, 0 failed. A second Cargo invocation encountered an unrelated, concurrent ClientBadges enum change; it did not produce a live result. The fixture runner ran the exact smoke::chat::send_text_delivers_exact_private_and_channel_messages_on_beta14 test from the binary already built for the reducer check. target/native-tab-events-live.log records 1 passed, 0 failed, 0 ignored; 41.78 s. Teardown found zero fixture UDP/TCP listeners and zero disposable temp directories. No owner profile, remote server, or audio hardware was used.
Reproduce
Use x64 MSVC, a worktree-local CARGO_TARGET_DIR and disposable TEMP/TMP. Set LK_CUSTOM_WEBRTC to the pinned WebRTC build and TEAMSPEACH_BETA14_RELEASE to the staged Windows beta14 release. The exact live test needs free UDP 19987 and TCP 30053/19080; the runner disables Query before guest connections.
cargo test --offline --locked --target x86_64-pc-windows-msvc -p teamspeach-native --no-default-features --features webrtc,test-harness --lib -- --exact app::connections::tests::state_transitions_revoke_sessions_and_ignore_foreign_generation_and_worker
$runner = (Resolve-Path 'native/tests/fixtures/beta14-server-admin.ps1').Path
$env:CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUNNER = "powershell.exe -NoProfile -ExecutionPolicy Bypass -File $runner"
cargo test --offline --locked --target x86_64-pc-windows-msvc -p teamspeach-native --no-default-features --features webrtc,test-harness --lib -- --include-ignored --test-threads=1 --nocapture --exact smoke::chat::send_text_delivers_exact_private_and_channel_messages_on_beta14