element-x-android icon indicating copy to clipboard operation
element-x-android copied to clipboard

Simplified Sliding Sync should be enabled by default if your homeserver supports it (and doesn't have a SS proxy).

Open Half-Shot opened this issue 1 year ago • 1 comments

Update

Currently in order to use EX you need to:

  • Add org.matrix.msc3575.proxy to your .well-known/matrix/client.
  • Sign in to your account, skip all prompts to verify your device.
  • Find the magic setting in developer options to enable simplified sliding sync.
  • Be logged out, and then log back in. To the delight of myself it then worked perfectly :)

So probably this just needs to be a thing where if the simplified feature is enabled and the proxy isn't, we go straight for simplified.

My quite wrong ramblings are preserved below.

Your use case

What would you like to do?

I'd like to run Element X using just Synapse and the Simplified Sliding Sync feature.

Why would you like to do it?

I'd really like to use Element X, and I don't want to run the SS Proxy.

How would you like to achieve it?

Probably we should have a mechanism to detect if the homeserver supports Simplified Sliding Sync and pre-enable the developer flag for the moment. Maybe a /versions check, although the feature doesn't have a corresponding flag. I suppose you could also just POST the endpoint and check to see if it comes back with something other than 404. The possibilities are endless!

Have you considered any alternatives?

The clear alternative is running a proxy, and then turning it off. For obvious reasons, absolutely not :)

Additional context

https://github.com/element-hq/element-x-android/pull/3222 is the PR that added the feature.

Are you willing to provide a PR?

No

Half-Shot avatar Jul 30 '24 14:07 Half-Shot

The Rust side of this is https://github.com/matrix-org/matrix-rust-sdk/blob/d03d3cff1707743af898c89a2e30b301e79e3845/crates/matrix-sdk/src/client/builder.rs#L475-L493.

Which is triggered by https://github.com/element-hq/element-x-android/blob/b9942ccf6ab3d607b46b466e41dcd280116cd3d3/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClientFactory.kt#L53-L115. Essentially perhaps the Rust SDK needs to say "hey, we couldn't find a proxy but the homeserver claims simplified sync support" which the client might be able to optionally decide to accept (perhaps with a warning to the user that dragons exist).

Half-Shot avatar Jul 30 '24 15:07 Half-Shot

which the client might be able to optionally decide to accept

I do not think the client need to validate the usage of SSS. I believe the feature flag has been added to prevent user from being stuck if there is a problem with SSS and using the proxy was OK.

So I think the SDK should use SSS if there is no proxy.

WDYT @Hywan ?

bmarty avatar Aug 19 '24 10:08 bmarty

It's the entire migration from SS proxy to SS native project, https://github.com/element-hq/element-meta/issues/2499. I think it's better to close this issue, as it will create duplicated discussions.

Hywan avatar Aug 19 '24 12:08 Hywan

But so will we see this anytime soon?

xxfogs avatar Sep 14 '24 19:09 xxfogs

@bmarty Does Element X Android support detecting and switching from SS proxy to SSS (MSC3575 <> MSC4186)?

Hywan avatar Sep 16 '24 06:09 Hywan

But so will we see this anytime soon?

Element X iOS (nightly) does already support this yes.

Hywan avatar Sep 16 '24 06:09 Hywan

But so will we see this anytime soon?

Element X iOS (nightly) does already support this yes.

Oh, that's splendid. I hope that soon gets implemented in the android version as well.

xxfogs avatar Sep 16 '24 14:09 xxfogs

But so will we see this anytime soon?

Element X iOS (nightly) does already support this yes.

Can you maybe point me to the commit that added this support? I am looking through the changes since the last release and can't find it.

athei avatar Sep 17 '24 15:09 athei

cc @stefanceriu @jmartinesp :-)

Hywan avatar Sep 24 '24 08:09 Hywan

Default to native sliding sync discovery. -> https://github.com/element-hq/element-x-ios/pull/3211/commits/e47e76c3cb5105a2d37dcc3a5441f4bc153a7889

stefanceriu avatar Sep 24 '24 09:09 stefanceriu

Migration to native SS PR: https://github.com/element-hq/element-x-android/pull/3429

Force logout when SS proxy is no longer available but native SS is (aka forced migration): https://github.com/element-hq/element-x-android/pull/3458

Fix for native sliding sync being incorrectly forced: https://github.com/element-hq/element-x-android/pull/3489

Note that having native sliding sync enabled in the EX app is currently based in a developer setting flag that it's now true by default, but if you changed it in the past, it'll keep that value, whether it was enabled or disabled.

jmartinesp avatar Sep 24 '24 09:09 jmartinesp

We have everything in place to have this working. We just forgot to close this issue in favor of the work that happened in https://github.com/element-hq/element-meta/issues/2499. Check it on 0.6.3. If there is an issue, raise a new ticket explaining the problem.

manuroe avatar Sep 24 '24 09:09 manuroe