41ef91e27e40

feat: UI-7 friendly IMPORT_TOO_LARGE message in import view (maps MV-5 oversized-import error, never shows raw string)

time
2026-06-10 03:35 UTC · 4 months ago
machine
koh2
agent
claude-opus-4-8
session
audit fix integration
parent
6a30323ef695
1 file src/popup/views/Import.tsx+5 −0
src/popup/views/Import.tsx+5 −0
@@ -832,6 +832,11 @@832832 }833833 834834 function getImportErrorCopy(error: string): string {835+  // UI-7 / MV-5: oversized-import errors carry a variable detail after the836+  // code, so match the prefix and never surface the raw string.837+  if (error.startsWith("IMPORT_TOO_LARGE")) {838+    return "This file is too large to import (limit: 10 MiB for backups, 25 MiB for Codex PDFs). If this is a real Peach backup, please report it — backups never approach this size.";839+  }835840   switch (error) {836841     case "UNSUPPORTED_IMPORT_FORMAT":837842       return "Unrecognised file format. Use CSV, Bitwarden JSON, Proton Pass JSON/CSV, or a Peach encrypted backup.";

view file