{"record":{"id":"5c471e04e6eb31af","repo":"siyuan-note/siyuan","slug":"invalid-shortcut-configuration","errorCode":null,"errorMessage":"Invalid shortcut configuration","messagePattern":"Invalid shortcut configuration","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/config/systemConfig.ts","lineNumber":159,"sourceCode":"        return value.resize == null || value.resize === \"tb\" || value.resize === \"lr\";\n    }\n    if (value.instance === \"Backlink\" || value.instance === \"Outline\") {\n        return value.type == null || value.type === \"pin\" || value.type === \"local\";\n    }\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":141,"sourceCodeEnd":170,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/app/src/config/systemConfig.ts#L141-L170","documentation":"Generic validation guard in systemConfigCollections: a persisted uiLayout entry fails the structural type checks (unknown instance name, invalid Dock type, malformed Search config), so the stored layout is corrupt or was written by an incompatible version and is rejected before being applied.","triggerScenarios":"Thrown at app/src/config/systemConfig.ts:159 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reset the UI layout from 设置 - 外观 or remove the stored uiLayout entry from workspace layout config","Restore layout.json from backup","Align the SiYuan version with the one that wrote the layout"],"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"}