收口桌面壳导航诊断日志

桌面壳 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
@@ -79,7 +79,7 @@ pub(crate) fn desktop_navigation_state_script() -> Result<String, serde_json::Er
try {{
originalReplaceState(stateWithIndex(window.history.state, currentIndex), '', window.location.href);
}} catch (error) {{
console.warn('desktop navigation state sync failed', error);
console.warn('desktop navigation state sync failed');
}}
}};
@@ -393,7 +393,8 @@ mod tests {
assert!(script.contains("(currentIndex > 0)"));
assert!(script.contains("\\\"canGoBack\\\":true"));
assert!(script.contains("\\\"canGoBack\\\":false"));
assert!(script.contains("console.warn('desktop navigation state sync failed', error)"));
assert!(script.contains("console.warn('desktop navigation state sync failed')"));
assert!(!script.contains("console.warn('desktop navigation state sync failed', error)"));
assert!(script.contains("window.__GENARRATIVE_DESKTOP_NAVIGATION_STATE_INSTALLED__"));
}
}