You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Frontend lacks an Error Boundary and guards on untrusted JSON.parse/localStorage #13
A few frontend code paths trust input they do not control: JSON.parse on drag-and-drop payloads, on a story.json read from an uploaded ZIP and on an XHR response body; localStorage.getItem in the initial Redux state (throws in some private-browsing modes); and there is no React Error Boundary, so a single render error blanks the whole UI.
Description
Add small defensive guards, no behaviour change on valid input:
an ErrorBoundary component around the app root that shows a minimal "something went wrong" message instead of a blank page;
try/catch around each untrusted JSON.parse, ignoring/logging the bad payload;
a safe localStorage read helper used by the settings reducer.
Fichiers concernes
web-ui/javascript/src/components/ErrorBoundary.js (new) + web-ui/javascript/src/index.js — wrap the root
Implemented in antoinevalentinHA#63: safeGetItem/safeSetItem on every localStorage use, parseJson on the five untrusted JSON.parse sites, ErrorBoundary at the root; 10 new tests, yarn build green under CI strictness. Awaiting the upstream owner.
Activity
lgnap commentedon Sep 11, 2026
Prise en charge par Claude Code (instance
tuxedo:40112:d397e957, branchefix/issue-13-frontend-defensive-guards).lgnap commentedon Sep 11, 2026
Implemented in antoinevalentinHA#63:
safeGetItem/safeSetItemon every localStorage use,parseJsonon the five untrusted JSON.parse sites,ErrorBoundaryat the root; 10 new tests,yarn buildgreen under CI strictness. Awaiting the upstream owner.