Skip to content

Commit

Permalink
Add comments to explain how the secrets could be uncached
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Jan 9, 2025
1 parent 521cebf commit 7af44cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions playwright/e2e/settings/encryption-user-tab/recovery.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ test.describe("Recovery section in Encryption tab", () => {
await checkDeviceIsConnectedKeyBackup(page, "2", true);
});

// This case shouldn't happen but we have seen cases where the secrets gossiping failed or shared partial secrets when verified with another device.
// To simulate this case, we need to delete the cached secrets in the indexedDB
test(
"should enter the recovery key when the secrets are not cached",
{ tag: "@screenshot" },
Expand Down
1 change: 1 addition & 0 deletions src/components/views/settings/encryption/RecoveryPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { SettingsSubheader } from "../SettingsSubheader";
* - `loading`: We are checking the backup, the recovery and the secrets.
* - `missing_backup`: The user has no backup.
* - `secrets_not_cached`: The user has a backup but the secrets are not cached.
* This shouldn't happen but we have seen cases where the secrets gossiping failed or shared partial secrets when verified with another device.
* - `good`: The user has a backup and the secrets are cached.
*/
type State = "loading" | "missing_backup" | "secrets_not_cached" | "good";
Expand Down

0 comments on commit 7af44cc

Please sign in to comment.