From 305bc5269f6a1b947de1a69a2525fb6e97bc8ad7 Mon Sep 17 00:00:00 2001 From: Alvin Date: Thu, 16 Apr 2026 13:11:43 +0800 Subject: [PATCH 1/2] fix(deps): backport matrix-rust-sdk#6361 to stop idle sync loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pin matrix-sdk{, -base, -ui} to Project-Robius-China/matrix-rust-sdk @ cb391f70 — which is 627563bb (our previous space_room_suggested tip) plus a single cherry-pick of upstream matrix-org#6361's production-code commit (c7573469b). The `requires_timeout` closure in RoomListService was forcing `timeout=0` for all post-init states, so idle clients kept re-sending the same `pos` immediately instead of long-polling. The backport restricts `timeout=0` to `State::Init` only and lets SettingUp / Recovering / Running use `PollTimeout::Default`, so the server can long-poll while idle (and still answer immediately when it has pending changes). Runtime delta is exactly one closure-body rewrite in crates/matrix-sdk-ui/src/room_list_service/mod.rs — no public API, type, or feature-flag changes. Refs #30 --- Cargo.lock | 32 ++++++++++++++++---------------- Cargo.toml | 6 +++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 01e06fe4..698b484b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1830,7 +1830,7 @@ dependencies = [ "libc", "option-ext", "redox_users 0.5.2", - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] @@ -2034,7 +2034,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] @@ -2872,7 +2872,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.61.2", + "windows-core 0.56.0", ] [[package]] @@ -3895,7 +3895,7 @@ dependencies = [ [[package]] name = "matrix-sdk" version = "0.16.0" -source = "git+https://github.com/project-robius/matrix-rust-sdk?branch=space_room_suggested#627563bb87e4746c0758560efe2c3fdc034faac6" +source = "git+https://github.com/Project-Robius-China/matrix-rust-sdk?rev=cb391f70ade93aee295108e623f6bed3ef1cea53#cb391f70ade93aee295108e623f6bed3ef1cea53" dependencies = [ "anymap2", "aquamarine", @@ -3958,7 +3958,7 @@ dependencies = [ [[package]] name = "matrix-sdk-base" version = "0.16.0" -source = "git+https://github.com/project-robius/matrix-rust-sdk?branch=space_room_suggested#627563bb87e4746c0758560efe2c3fdc034faac6" +source = "git+https://github.com/Project-Robius-China/matrix-rust-sdk?rev=cb391f70ade93aee295108e623f6bed3ef1cea53#cb391f70ade93aee295108e623f6bed3ef1cea53" dependencies = [ "as_variant", "async-trait", @@ -3984,7 +3984,7 @@ dependencies = [ [[package]] name = "matrix-sdk-common" version = "0.16.0" -source = "git+https://github.com/project-robius/matrix-rust-sdk?branch=space_room_suggested#627563bb87e4746c0758560efe2c3fdc034faac6" +source = "git+https://github.com/Project-Robius-China/matrix-rust-sdk?rev=cb391f70ade93aee295108e623f6bed3ef1cea53#cb391f70ade93aee295108e623f6bed3ef1cea53" dependencies = [ "eyeball-im", "futures-core", @@ -4007,7 +4007,7 @@ dependencies = [ [[package]] name = "matrix-sdk-crypto" version = "0.16.0" -source = "git+https://github.com/project-robius/matrix-rust-sdk?branch=space_room_suggested#627563bb87e4746c0758560efe2c3fdc034faac6" +source = "git+https://github.com/Project-Robius-China/matrix-rust-sdk?rev=cb391f70ade93aee295108e623f6bed3ef1cea53#cb391f70ade93aee295108e623f6bed3ef1cea53" dependencies = [ "aes", "aquamarine", @@ -4047,7 +4047,7 @@ dependencies = [ [[package]] name = "matrix-sdk-indexeddb" version = "0.16.0" -source = "git+https://github.com/project-robius/matrix-rust-sdk?branch=space_room_suggested#627563bb87e4746c0758560efe2c3fdc034faac6" +source = "git+https://github.com/Project-Robius-China/matrix-rust-sdk?rev=cb391f70ade93aee295108e623f6bed3ef1cea53#cb391f70ade93aee295108e623f6bed3ef1cea53" dependencies = [ "async-trait", "base64", @@ -4078,7 +4078,7 @@ dependencies = [ [[package]] name = "matrix-sdk-sqlite" version = "0.16.0" -source = "git+https://github.com/project-robius/matrix-rust-sdk?branch=space_room_suggested#627563bb87e4746c0758560efe2c3fdc034faac6" +source = "git+https://github.com/Project-Robius-China/matrix-rust-sdk?rev=cb391f70ade93aee295108e623f6bed3ef1cea53#cb391f70ade93aee295108e623f6bed3ef1cea53" dependencies = [ "as_variant", "async-trait", @@ -4105,7 +4105,7 @@ dependencies = [ [[package]] name = "matrix-sdk-store-encryption" version = "0.16.0" -source = "git+https://github.com/project-robius/matrix-rust-sdk?branch=space_room_suggested#627563bb87e4746c0758560efe2c3fdc034faac6" +source = "git+https://github.com/Project-Robius-China/matrix-rust-sdk?rev=cb391f70ade93aee295108e623f6bed3ef1cea53#cb391f70ade93aee295108e623f6bed3ef1cea53" dependencies = [ "base64", "blake3", @@ -4125,7 +4125,7 @@ dependencies = [ [[package]] name = "matrix-sdk-ui" version = "0.16.0" -source = "git+https://github.com/project-robius/matrix-rust-sdk?branch=space_room_suggested#627563bb87e4746c0758560efe2c3fdc034faac6" +source = "git+https://github.com/Project-Robius-China/matrix-rust-sdk?rev=cb391f70ade93aee295108e623f6bed3ef1cea53#cb391f70ade93aee295108e623f6bed3ef1cea53" dependencies = [ "as_variant", "async-rx", @@ -5995,7 +5995,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] @@ -6063,7 +6063,7 @@ dependencies = [ "security-framework 3.5.0", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] @@ -6917,7 +6917,7 @@ dependencies = [ "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] @@ -7394,7 +7394,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" dependencies = [ "memoffset", "tempfile", - "windows-sys 0.60.2", + "windows-sys 0.61.1", ] [[package]] @@ -8013,7 +8013,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.61.1", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index a2781bb1..4f0ddef8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,8 +49,8 @@ imghdr = "0.7.0" linkify = "0.10.0" mime = "0.3" mime_guess = "2.0" -matrix-sdk-base = { git = "https://github.com/project-robius/matrix-rust-sdk", branch = "space_room_suggested" } -matrix-sdk = { git = "https://github.com/project-robius/matrix-rust-sdk", branch = "space_room_suggested", default-features = false, features = [ +matrix-sdk-base = { git = "https://github.com/Project-Robius-China/matrix-rust-sdk", rev = "cb391f70ade93aee295108e623f6bed3ef1cea53" } +matrix-sdk = { git = "https://github.com/Project-Robius-China/matrix-rust-sdk", rev = "cb391f70ade93aee295108e623f6bed3ef1cea53", default-features = false, features = [ "e2e-encryption", "automatic-room-key-forwarding", "markdown", @@ -59,7 +59,7 @@ matrix-sdk = { git = "https://github.com/project-robius/matrix-rust-sdk", branch "bundled-sqlite", "sso-login", ] } -matrix-sdk-ui = { git = "https://github.com/project-robius/matrix-rust-sdk", branch = "space_room_suggested", default-features = false, features = [ +matrix-sdk-ui = { git = "https://github.com/Project-Robius-China/matrix-rust-sdk", rev = "cb391f70ade93aee295108e623f6bed3ef1cea53", default-features = false, features = [ "rustls-tls", ] } ## Use the same ruma version as what's specified in matrix-sdk's Cargo.toml. From 5b74337a07706bdd3a6e29cca7be5d83f1bcadd3 Mon Sep 17 00:00:00 2001 From: Alvin Date: Thu, 16 Apr 2026 22:32:52 +0800 Subject: [PATCH 2/2] chore(deps): restore transitive lock entries per review feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewer flagged that the previous `cargo update -p matrix-sdk ...` opportunistically re-resolved unrelated transitive deps (windows-sys 0.59.0 → 0.61.1 for errno, etc.). This commit resets Cargo.lock to `origin/main` and then surgically patches only the 8 matrix-sdk{, -base, -common, -crypto, -sqlite, -store-encryption, -ui, -indexeddb-stores} source URLs to point to the backport fork at rev cb391f70. All other transitive entries now exactly match `origin/main`. The single extra line (`robrix = 0.0.1-pre-alpha-4` vs the lock's stale `0.1.0-pre-alpha-1`) is Cargo auto-correcting a pre-existing inconsistency in `origin/main` — unavoidable under `--locked`. Verified with `cargo check --locked` (34.63s, zero warnings). Refs #30, addresses review comment from @alanpoon on PR #101 --- Cargo.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 698b484b..34d3f845 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1830,7 +1830,7 @@ dependencies = [ "libc", "option-ext", "redox_users 0.5.2", - "windows-sys 0.61.1", + "windows-sys 0.59.0", ] [[package]] @@ -2034,7 +2034,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.1", + "windows-sys 0.59.0", ] [[package]] @@ -2872,7 +2872,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.56.0", + "windows-core 0.61.2", ] [[package]] @@ -5995,7 +5995,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.1", + "windows-sys 0.59.0", ] [[package]] @@ -6063,7 +6063,7 @@ dependencies = [ "security-framework 3.5.0", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.1", + "windows-sys 0.59.0", ] [[package]] @@ -6917,7 +6917,7 @@ dependencies = [ "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.61.1", + "windows-sys 0.59.0", ] [[package]] @@ -7394,7 +7394,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" dependencies = [ "memoffset", "tempfile", - "windows-sys 0.61.1", + "windows-sys 0.60.2", ] [[package]] @@ -8013,7 +8013,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.1", + "windows-sys 0.48.0", ] [[package]]