收口桌面壳导航诊断日志

桌面壳 H5 history 追踪脚本同步失败只记录稳定标签

更新桌面壳导航脚本测试禁止打印 error 对象

扩展桌面壳配置门禁防止恢复 console.warn error 参数

补充宿主壳方案中的桌面诊断日志边界
This commit is contained in:
2026-06-20 23:33:03 +08:00
parent 636880d4df
commit da00cac294
3 changed files with 20 additions and 3 deletions
+15 -1
View File
@@ -2635,7 +2635,7 @@ const requiredRustHostSnippets = [
'window.history.replaceState',
"window.addEventListener('popstate'",
'__genarrativeDesktopHistoryIndex',
"console.warn('desktop navigation state sync failed', error)",
"console.warn('desktop navigation state sync failed')",
'file.imageDropped',
'normalize_desktop_drop_position',
'.round().max(0.0) as i32',
@@ -2704,6 +2704,20 @@ const requiredRustHostSnippets = [
'replay_state.complete(slot, response)',
];
const desktopNavigationStateScriptBody = extractFunctionBody(
desktopShellNavigationSource,
'desktop_navigation_state_script',
);
if (
desktopNavigationStateScriptBody.includes(
"console.warn('desktop navigation state sync failed', error)",
)
) {
throw new Error(
'desktop shell navigation state diagnostics must not log native error objects',
);
}
assertSameList(
allowedTauriCommands,
['host_bridge_request'],