{"record":{"id":"cdfe25eb83a92763","repo":"siyuan-note/siyuan","slug":"invalid-dock-configuration","errorCode":null,"errorMessage":"Invalid dock configuration","messagePattern":"Invalid dock configuration","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/config/systemConfig.ts","lineNumber":163,"sourceCode":"    }\n    if (value.instance === \"Graph\") {\n        return value.type == null || value.type === \"pin\" || value.type === \"local\" || value.type === \"global\";\n    }\n    if (value.instance === \"Search\") {\n        return isSearchConfig(value.config);\n    }\n    return typeof value.instance === \"string\" && [\"Tab\", \"Editor\", \"Asset\", \"Custom\", \"Bookmark\", \"Files\", \"Tag\"].includes(value.instance);\n};\n\nexport const systemConfigCollections = (value: Pick<SystemAppConf, \"keymap\" | \"uiLayout\">,\n                                       defaultLayout?: () => Config.IUiLayout): Pick<Config.IConf, \"keymap\" | \"uiLayout\"> => {\n    const keymap = isObject(value.keymap) ? repairFalsyKeymapGroups(value.keymap) : value.keymap;\n    if (!isKeymap(keymap)) {\n        throw new Error(\"Invalid shortcut configuration\");\n    }\n    const uiLayout = defaultLayout && (!isObject(value.uiLayout) || !value.uiLayout.left) ? defaultLayout() : value.uiLayout;\n    if (!isUILayout(uiLayout)) {\n        throw new Error(\"Invalid dock configuration\");\n    }\n    return {keymap, uiLayout};\n};\n\nexport const systemConfig = (value: SystemAppConf, defaultLayout?: () => Config.IUiLayout): Config.IConf =>\n    ({...value, ...systemConfigCollections(value, defaultLayout)});\n","sourceCodeStart":145,"sourceCodeEnd":170,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/app/src/config/systemConfig.ts#L145-L170","documentation":"Generic validation guard in systemConfigCollections: a persisted dock entry fails structural checks — its instance is not one of Tab/Editor/Asset/Custom/Bookmark/Files/Tag, or its type/config sub-shape is invalid — indicating corrupt or version-mismatched dock configuration that cannot be safely restored.","triggerScenarios":"Thrown at app/src/config/systemConfig.ts:163 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reset the dock layout in 设置 - 外观","Remove or fix the offending entry in the workspace layout config","Restore layout.json from a backup"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9f775e8a12daef8255556097396f9b2739078892","analyzedAt":"2026-09-19T03:17:15.984Z","contentChangedAt":"2026-09-19T03:17:15.984Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}