From 8849701418dbf6f23cdad3be9b6b33ca5dc45849 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sat, 23 May 2026 09:43:42 +0000 Subject: [PATCH] fix(react-ui): expose tracing_max_body_bytes in Settings and Traces panels The setting was already plumbed through env (LOCALAI_TRACING_MAX_BODY_BYTES), CLI flag, and the runtime_settings.json GET/PUT schema, but neither the main Settings page nor the inline Traces panel offered an input for it. Admins hitting the "Traces UI stuck loading" symptom had to know to set an env var or PUT raw JSON to /api/settings to dial the cap. Add a "Max Body Bytes" row next to "Max Items" in both places. Same input type, same disabled-when-tracing-off semantics, placeholder shows the 65536 default so users see what they're inheriting. Signed-off-by: Ettore Di Giacinto Assisted-by: Claude:claude-opus-4-7 --- core/http/react-ui/src/pages/Settings.jsx | 3 +++ core/http/react-ui/src/pages/Traces.jsx | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/core/http/react-ui/src/pages/Settings.jsx b/core/http/react-ui/src/pages/Settings.jsx index 3174eed58..1e7b1a6db 100644 --- a/core/http/react-ui/src/pages/Settings.jsx +++ b/core/http/react-ui/src/pages/Settings.jsx @@ -435,6 +435,9 @@ export default function Settings() { update('tracing_max_items', parseInt(e.target.value) || 0)} placeholder="100" disabled={!settings.enable_tracing} /> + + update('tracing_max_body_bytes', parseInt(e.target.value) || 0)} placeholder="65536" disabled={!settings.enable_tracing} /> + update('enable_backend_logging', v)} /> diff --git a/core/http/react-ui/src/pages/Traces.jsx b/core/http/react-ui/src/pages/Traces.jsx index e1cc5c480..2d4b10da2 100644 --- a/core/http/react-ui/src/pages/Traces.jsx +++ b/core/http/react-ui/src/pages/Traces.jsx @@ -467,6 +467,17 @@ export default function Traces() { disabled={!settings.enable_tracing} /> + + setSettings(prev => ({ ...prev, tracing_max_body_bytes: parseInt(e.target.value) || 0 }))} + placeholder="65536" + disabled={!settings.enable_tracing} + /> +