加固原生壳生产入口门禁

桌面壳深链打开失败改为显式日志记录

移动壳生产导出校验共享主站 URL

原生壳方案文档同步生产入口验收规则
This commit is contained in:
2026-06-20 05:47:44 +08:00
parent 0cac82e982
commit 52526bd2ae
6 changed files with 87 additions and 9 deletions
@@ -2859,6 +2859,13 @@
- 影响范围:`apps/desktop-shell/src-tauri/src/app.rs`、`apps/desktop-shell/src-tauri/src/shell/lifecycle.rs`、`apps/desktop-shell/src-tauri/src/shell/file_drop.rs`、`apps/desktop-shell/src-tauri/src/shell/webview.rs`、`apps/desktop-shell/scripts/check-config.mjs`、宿主壳能力统一协议文档。
- 验证方式:`cargo test --manifest-path apps/desktop-shell/src-tauri/Cargo.toml`、`npm run check:native-shells`、`npm run check:encoding`、`git diff --check`。
## 2026-06-20 桌面壳深链打开失败不可静默
- 背景:`genarrative://` 和同源 HTTPS 深链是桌面壳的生产入口;如果深链归一成功后 `window.navigate(...)` 或恢复主窗口失败却被静默忽略,用户会看到深链无反应且没有可排查日志。
- 决策:桌面壳深链打开必须让 `open_desktop_deep_link_url(...)` 返回 `tauri::Result<()>`,窗口导航和 `show_main_window(...)` 失败统一记录日志;配置检查拒绝深链模块继续使用 `let _ = window.navigate(...)` 或 `let _ = show_main_window(...)` 静默吞错。
- 影响范围:`apps/desktop-shell/src-tauri/src/shell/deep_link.rs`、`apps/desktop-shell/scripts/check-config.mjs`、宿主壳能力统一协议文档。
- 验证方式:`cargo test --manifest-path apps/desktop-shell/src-tauri/Cargo.toml`、`npm run desktop-shell:typecheck`、`npm run check:native-shells`、`npm run check:encoding`、`git diff --check`。
## 2026-06-20 移动壳 ShellApp HostBridge 事件注入必须可执行覆盖
- 背景:Expo 移动壳声明 `host.events`、`app.lifecycle`、`network.statusChanged` 和 `navigation.canGoBack`,但 ShellApp 真实 AppState、Network 和 WebView 返回栈注入链路需要和扫码链路一样有可执行测试覆盖,不能只靠字符串门禁。