An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:white_check_mark: Align regression fixtures and settings write exemptions
Danielafb2fd95963c
diff --git a/app/src/protyle/render/listMindmap/rootConversion.test.ts b/app/src/protyle/render/listMindmap/rootConversion.test.tsindex 69627a0da2..550b611b12 100644--- a/app/src/protyle/render/listMindmap/rootConversion.test.ts+++ b/app/src/protyle/render/listMindmap/rootConversion.test.ts@@ -146,7 +146,7 @@ const getUpdateOperations = (element: ElementFixture, before: string) => {operations = {doOperations, undoOperations};}};new Function(...Object.keys(dependencies), updateSource + "; return updateTransaction;")(- ...Object.values(dependencies))({}, element, before);+ ...Object.values(dependencies))({wysiwyg: {element: element.parentElement}}, element, before);element.removeAttribute("data-editing");return operations;};diff --git a/app/src/protyle/util/tableCellRich.test.ts b/app/src/protyle/util/tableCellRich.test.tsindex 2a34f28d50..d2c021365d 100644--- a/app/src/protyle/util/tableCellRich.test.ts+++ b/app/src/protyle/util/tableCellRich.test.ts@@ -75,7 +75,7 @@ const browserCases = async (source: string) => {editable.appendChild(marked);const value = api.serializeTableCellRich(editor.innerHTML);api.updateTableCellEditingValue(cells[0], value);- const owner = {} as IProtyle;+ const owner = {wysiwyg: {element: fixture}} as IProtyle;api.updateTransaction(owner, table, oldHTML);check.equal(renders, 29, "formatting one cell only converts its changed source across do/undo cleanup");check.equal(transactions.length, 1);diff --git a/app/tests/exitWaiting.test.js b/app/tests/exitWaiting.test.jsindex f6601ae14d..ef0f8cdaea 100644--- a/app/tests/exitWaiting.test.js+++ b/app/tests/exitWaiting.test.js@@ -139,10 +139,10 @@ if (process.versions.electron && process.type === "browser") {const waiting = await win.webContents.executeJavaScript(`(() => {const container = document.querySelector("#exitProgress .b3-dialog__loading");const bounds = container.getBoundingClientRect();- const status = container.lastElementChild;+ const status = container.querySelector('[role="status"]');const mask = document.querySelector(".b3-dialog__scrim");const maskBounds = mask.getBoundingClientRect();- const stripe = getComputedStyle(container.firstElementChild.firstElementChild);+ const stripe = getComputedStyle(container.querySelector(".b3-dialog__progressbar"));const key = new KeyboardEvent("keydown", {key: "a", bubbles: true, cancelable: true});document.body.dispatchEvent(key);return {visible: bounds.width > 0 && bounds.left >= 0 && bounds.right <= innerWidth,diff --git a/app/tests/settingsBazaar.test.js b/app/tests/settingsBazaar.test.jsindex d26e629506..3d43bd9b0a 100644--- a/app/tests/settingsBazaar.test.js+++ b/app/tests/settingsBazaar.test.js@@ -108,7 +108,7 @@ for (const mode of ["settings-window", "main-window", "mobile"]) {},isBazaarPluginEnabledInPublish: () => false, getRatingKey: (_type, name) => name,escapeHtml: value => value, escapeAttr: value => value, genRatePackageActionHTML: () => "",- loadDownloadedRatings() {}, loadDownloadedUserRatings() {},+ loadDownloadedRatings() {}, loadDownloadedUserRatings() {}, renderBazaarInstall() {},window: {siyuan: {config: {publish: {enable: false}, bazaar: {petalDisabled: false}},languages: {config: "Settings", uninstall: "Uninstall", disable: "Disable", enable: "Enable"}}},});diff --git a/kernel/api/setting_write_contract_test.go b/kernel/api/setting_write_contract_test.goindex d7875088f1..d3c1db9571 100644--- a/kernel/api/setting_write_contract_test.go+++ b/kernel/api/setting_write_contract_test.go@@ -36,6 +36,8 @@ var settingWriteExemptions = map[string]string{"/api/repo/removeRepoTagSnapshot": "删除快照标签,不修改配置","/api/repo/removeCloudRepoTagSnapshot": "删除云端快照标签,不修改配置","/api/system/clearTempFiles": "清理临时文件,不修改配置",+ "/api/storage/clearRecentDocs": "清空最近文档记录,不修改应用配置",+ "/api/sync/confirmSyncCheckout": "确认窗口已排空输入,仅更新同步检出任务的运行状态",}// 写配置端点的命名约定:这些前缀下以写入动词开头的端点默认视为写配置。