fix(ui): missing local keys error was dismissed by another attempt

This commit is contained in:
Thomas Ramé
2026-09-29 09:55:37 +02:00
parent 5b1f4af845
commit a51e6ca74a
@@ -296,10 +296,6 @@ const DocPage = ({ id }: DocProps) => {
return <Loading />;
}
if (doc.is_encrypted && decryptionFailure) {
return <DecryptionFailurePanel failure={decryptionFailure} />;
}
if (doc.is_encrypted && vaultClientError) {
return (
<EncryptionEmptyState
@@ -375,6 +371,12 @@ const DocPage = ({ id }: DocProps) => {
);
}
// After the access checks: with no keys on this device, the editor's attempt fails
// too (MISSING_KEYS), and setting encryption up is the answer, not a retry.
if (doc.is_encrypted && decryptionFailure) {
return <DecryptionFailurePanel failure={decryptionFailure} />;
}
if (encryptionTransition) {
return (
<EncryptionEmptyState