{"record":{"id":"3b544391c704bcac","repo":"googleapis/mcp-toolbox","slug":"failed-to-load-saved-panel-width","errorCode":null,"errorMessage":"Failed to load saved panel width:","messagePattern":"Failed to load saved panel width:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"internal/server/static/js/resize.js","lineNumber":47,"sourceCode":"    // Create resize handle\n    const resizeHandle = document.createElement('div');\n    resizeHandle.className = 'resize-handle';\n    resizeHandle.setAttribute('aria-label', 'Resize panel');\n    secondNav.appendChild(resizeHandle);\n\n    // Load saved width or use default\n    let initialWidth = DEFAULT_WIDTH;\n    try {\n        const savedWidth = localStorage.getItem(STORAGE_KEY);\n        if (savedWidth) {\n            const parsed = parseInt(savedWidth, 10);\n            if (!isNaN(parsed) && parsed >= MIN_WIDTH) {\n                initialWidth = parsed;\n            }\n        }\n    } catch (e) {\n        // localStorage may be unavailable in private browsing mode\n        console.warn('Failed to load saved panel width:', e);\n    }\n    setPanelWidth(secondNav, initialWidth);\n\n    // Setup resize functionality\n    let startX = 0;\n    let startWidth = 0;\n\n    const onMouseMove = (e) => {\n        const deltaX = e.clientX - startX;\n        const newWidth = startWidth + deltaX;\n        const maxWidth = (window.innerWidth * MAX_WIDTH_PERCENT) / 100;\n\n        const clampedWidth = Math.max(MIN_WIDTH, Math.min(newWidth, maxWidth));\n        setPanelWidth(secondNav, clampedWidth);\n    };\n\n    const onMouseUp = () => {\n        document.removeEventListener('mousemove', onMouseMove);","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/static/js/resize.js#L29-L65","documentation":"The toolbox web UI's resize.js tries to restore the saved sidebar width from localStorage. Reading localStorage can throw (private browsing, storage disabled, security settings), so the failure is caught and only logged as a console warning; the UI falls back to the default width. It is non-fatal.","triggerScenarios":"Opening the toolbox UI in a browser context where localStorage.getItem throws: Safari private browsing (older), cookies/site-data blocked, storage quota disabled, or iframe sandbox without allow-same-origin.","commonSituations":"Corporate browsers blocking site data; running the UI inside a sandboxed iframe; privacy extensions blocking storage access; storage cleared/quota errors.","solutions":["No action needed — the UI uses the default panel width when this warning appears","Enable cookies/site data for the toolbox origin to persist panel width","Exit private/incognito mode if you want the layout saved","Safe-list the origin if an extension is blocking storage"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"function storageAvailable() {\n  try { localStorage.getItem('__t'); return true; } catch (e) { return false; }\n}","typeGuard":null,"tryCatchPattern":"let saved = null;\ntry { saved = localStorage.getItem('toolbox-panel-width'); } catch (e) { /* fall back to default */ }","preventionTips":["Treat localStorage as optional; always wrap access in try/catch (the UI already does)","Enable site data/cookies for the toolbox origin","Avoid embedding the UI in sandboxed iframes without allow-same-origin","The warning is benign — ignore unless persistence matters to you"],"tags":["javascript","browser","localstorage","ui","privacy-mode"],"backgroundTag":"localstorage-unavailable","analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}