From e3ffb979dc7566e64649f9f0af47e90205c5f6fb Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Fri, 14 Aug 2026 21:52:53 -0700 Subject: [PATCH] fix(browser): match the unknown decrypt reason explicitly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI's type-aware code-quality gate flagged the reason switch as non-exhaustive: the 'unknown' member was handled by `default:` rather than matched. Matching it explicitly keeps the behaviour identical today and makes the gate enforce the thing that matters — adding a new reason to the union now fails the switch instead of falling silently into a generic message that would not describe it. This gate is separate from `oxlint` and is not covered by running oxlint on the changed files, which is why it only surfaced in CI. --- src/renderer/src/lib/browser-cookie-import-toast.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/lib/browser-cookie-import-toast.ts b/src/renderer/src/lib/browser-cookie-import-toast.ts index d713b68e2c8..a8fa4aa6bae 100644 --- a/src/renderer/src/lib/browser-cookie-import-toast.ts +++ b/src/renderer/src/lib/browser-cookie-import-toast.ts @@ -47,7 +47,7 @@ function formatCookieImportWarning(warning: CookieImportWarning): string { '{{value0}} cookies could not be decrypted because the system keyring was unavailable. Unlock your login keyring (or install a Secret Service provider such as gnome-keyring) and import again.', { value0: warning.failedCookies } ) - default: + case 'unknown': return translate( 'auto.lib.browser.cookie.import.toast.undecryptableUnknown', '{{value0}} cookies could not be decrypted and were skipped. Close the source browser completely and try the import again.',