Pulse/frontend-modern
rcourtman d70fa88d26 Fix config restore for CLI exports (related to #646)
The v4.26.4 fix inadvertently broke CLI export compatibility. The frontend
attempted JSON.parse on all backup files and returned early with "Invalid
JSON file format" when parsing failed. This prevented the format detection
code from ever executing, breaking CLI-generated exports which are raw
base64 strings without a JSON wrapper.

Root cause:
- CLI exports (`pulse config export`) output raw base64 via
  internal/config/export.go:128
- The fix at Settings.tsx:2030-2034 called showError() and returned
  immediately on parse failure
- Format detection logic at lines 2040-2049 never executed for CLI exports

This changes the parsing flow to:
1. Try JSON.parse first (handles UI exports with {status, data} format)
2. On parse success, extract data field as before
3. On parse failure, treat entire file contents as raw base64 (CLI format)

This preserves the v4.26.4 improvements (12-char validation, better error
messages) while restoring CLI export compatibility.

Related to #646 where user confirmed v4.26.4 still failed to restore backups.
2025-11-07 17:57:22 +00:00
..
public Add Windows ARM64 support for host agent (related to #654) 2025-11-07 12:18:57 +00:00
src Fix config restore for CLI exports (related to #646) 2025-11-07 17:57:22 +00:00
.eslintignore Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
.eslintrc.cjs Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
.gitignore Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
.prettierignore Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
.prettierrc Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
index.html Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
package-lock.json Refactor: Code cleanup and localStorage consolidation 2025-11-04 21:50:46 +00:00
package.json Refactor: Code cleanup and localStorage consolidation 2025-11-04 21:50:46 +00:00
postcss.config.js Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
tailwind.config.js fix: prevent guest link icon from re-animating on WebSocket updates 2025-10-24 09:27:06 +00:00
tsconfig.json Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
tsconfig.node.json Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
vite.config.ts Refactor: Code cleanup and localStorage consolidation 2025-11-04 21:50:46 +00:00