Describe the bug
The editor's JSON preview path still calls JSON.parse(value) during render. Invalid JSON can throw and trip the top-level error boundary instead of showing a local validation message.
To Reproduce
- Open a JSON editor view.
- Enter invalid JSON.
- Switch to preview.
- Observe that the page can crash instead of showing an inline preview error.
Expected behavior
Invalid JSON should show a local preview error state, not crash the app shell.
Screenshots
N/A
Desktop (please complete the following information):
- OS that WhoDB is running on: N/A
- How you're running WhoDB: Source-reviewed frontend issue
- Browser: N/A
- Version: N/A
Smartphone (please complete the following information):
- Device: N/A
- OS: N/A
- Browser: N/A
- Version: N/A
Additional context
Area: Frontend CE
Evidence:
frontend/src/components/editor.tsx:377-397
Acceptance Criteria:
- Preview mode never throws for malformed JSON.
- Invalid JSON shows a readable local validation message.
- The error boundary is not triggered by malformed preview input.
- Valid JSON preview still renders as before.
Describe the bug
The editor's JSON preview path still calls
JSON.parse(value)during render. Invalid JSON can throw and trip the top-level error boundary instead of showing a local validation message.To Reproduce
Expected behavior
Invalid JSON should show a local preview error state, not crash the app shell.
Screenshots
N/A
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Area: Frontend CE
Evidence:
frontend/src/components/editor.tsx:377-397Acceptance Criteria: