Frontend: 13 stray console.error / console.warn calls in production JSX #123

Closed
opened 2026-05-26 18:21:54 -04:00 by zgaetano · 1 comment
Owner

Fixed in 04ce096. New window.DF_LOG.{debug,warn,error} helper in data.jsx: warn/debug are gated behind ?debug=1, localStorage.df_debug=1, or localhost. Editor + ingest screens converted their stray console.warn / console.error calls to DF_LOG.warn. Critical errors (player MediaError, app load failure, S3 settings load failure) keep console.error.

Fixed in 04ce096. New `window.DF_LOG.{debug,warn,error}` helper in `data.jsx`: warn/debug are gated behind `?debug=1`, `localStorage.df_debug=1`, or `localhost`. Editor + ingest screens converted their stray `console.warn` / `console.error` calls to `DF_LOG.warn`. Critical errors (player MediaError, app load failure, S3 settings load failure) keep `console.error`.
Author
Owner

Fix Plan — #123 Stray console.error/warn in production JSX

Root cause: 13 console.error/console.warn calls left in production JSX. Leak internal details to browser console.

Locations: screens-editor.jsx:108,128,140,149,165,214,248,295,325,661, screens-asset.jsx:395, screens-ingest.jsx:509, app.jsx:24.

Fix — wire toast into error handling:

// Replace:
console.error("Failed to load asset:", err);

// With:
window.dispatchEvent(new CustomEvent("df:toast", {
  detail: { message: "Failed to load asset", type: "danger" }
}));

Ensure shell.jsx listens for df:toast and renders a toast notification component.

Files: screens-editor.jsx, screens-asset.jsx, screens-ingest.jsx, app.jsx, shell.jsx
Effort: ~1h
**Priority: P3 — polish

## Fix Plan — #123 Stray console.error/warn in production JSX **Root cause:** 13 `console.error`/`console.warn` calls left in production JSX. Leak internal details to browser console. **Locations:** `screens-editor.jsx:108,128,140,149,165,214,248,295,325,661`, `screens-asset.jsx:395`, `screens-ingest.jsx:509`, `app.jsx:24`. **Fix — wire toast into error handling:** ```js // Replace: console.error("Failed to load asset:", err); // With: window.dispatchEvent(new CustomEvent("df:toast", { detail: { message: "Failed to load asset", type: "danger" } })); ``` Ensure `shell.jsx` listens for `df:toast` and renders a toast notification component. **Files:** `screens-editor.jsx`, `screens-asset.jsx`, `screens-ingest.jsx`, `app.jsx`, `shell.jsx` **Effort:** ~1h **Priority: P3 — polish
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: WildDragonLLC/dragonflight#123
No description provided.