element-hq / element-hq/element-web

EW: "Key storage out of sync" toast should distinguish between "keys missing from 4S" and "keys missing from local device"

Open
#30,438 6 comments 0 reactions 0 assignees View on GitHub
A-E2EE T-Enhancement
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

We currently show a toast when we detect that one or more of the four "secrets" is missing from either 4S or the local device:

What happens next depends on whether the secret is present on the local device or not.

There is similar behaviour within the Settings dialog itself:

Image

We would like to update the wording of the toast and settings dialog so that it depends on where the secret is missing from; there are also minor changes to the screens that come after.

[Figma designs](https://www.figma.com/design/nQeFYqpJtiWyxWZW0iNEfB/ER-268--Key-Storage-Out-of-Sync)

* [x] Update the `EncryptionUserSettingsTab` and the `DeviceListener` so that they use the same logic to decide when secrets are out of sync. Currently, they both invent this wheel, meaning that they can disagree.
* [ ] Update the toast and settings wording to identify whether the the key is missing from the local device, 4S, or both. (Currently they use the same wording for all three situations.)
* [ ] If the user clicks "Enter recovery key", then the "Enter your recovery key" screen should be shown within the "Encryption" settings dialog. Currently it is shown as a stand-alone modal.
* [ ] If the key is missing from both 4S *and* the local device, there is no point getting the user to enter their recovery key. Update the toast and settings wording so that there is only a "Continue with reset" button, which takes you to "Reset encryption" in the settings dialog.
* See also https://github.com/element-hq/element-web/issues/30439
* [ ] If the secrets are missing from the local storage, and the user has already tried to repair them by entering the recovery key, remember this (until the client is restarted), and show settings/toast wording telling the user we failed to fix it and they need to do a full reset. Treat as above.
* Related: https://github.com/element-hq/element-web/issues/30435, which tracks a case in which we do not currently detect failure to load secrets.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.