万象成文 2.0:Windows 产品化与平台稳定性升级 - #1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4219185f4d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if TRANSCRIPTION_PROVIDER == "local_sensevoice" and sensevoice_ready: | ||
| return LocalSenseVoiceProvider() | ||
| if TRANSCRIPTION_PROVIDER == "auto": |
There was a problem hiding this comment.
Accept SenseVoice-only configurations in preflight
When a local installation selects the new local_sensevoice provider, or selects auto with only the SenseVoice model installed, scripts.start_api still calls runtime_preflight._check_transcription_provider(), which unconditionally requires the Faster-Whisper MODEL_PATH for every non-OpenAI provider. With the normal non-degraded setting, startup therefore aborts before either of these newly added branches can run; preflight needs to apply the same provider-specific readiness rules as this selection logic.
AGENTS.md reference: AGENTS.md:L11-L11
Useful? React with 👍 / 👎.
| $code = "import fastapi, uvicorn, faster_whisper, ctranslate2, av, httpx, requests, yt_dlp, playwright, opencc" | ||
| & $VenvPython -c $code *> $null |
There was a problem hiding this comment.
Include sherpa-onnx in the venv readiness probe
On upgrades from the previous release, an existing Python 3.11 .venv can contain every module in this probe but not the newly added sherpa-onnx dependency. Ensure-Venv then returns without installing the updated requirements, and the first SenseVoice transcription fails at the lazy import sherpa_onnx; include this dependency in the readiness/version check so existing environments are actually upgraded when required.
AGENTS.md reference: AGENTS.md:L11-L11
Useful? React with 👍 / 👎.
| useEffect(() => { | ||
| void import("@tauri-apps/api/core") | ||
| .then(({ invoke }) => invoke("set_background_task_active", { active: phase === "processing" })) | ||
| .catch(() => undefined); | ||
| }, [phase]); |
There was a problem hiding this comment.
Keep the backend alive while assets finish
For image results, the capture changes to done while asset_preparation_pending remains true, so phase === "processing" becomes false even though the backend is still downloading images and building the ZIP. Closing the window at that point is treated as an idle close and exits Tauri, killing the sidecar and interrupting asset generation; mark the desktop task active while the current capture has pending assets as well.
Useful? React with 👍 / 👎.
| const runtimeSetupRequired = | ||
| !loadingDeepLink && | ||
| phase === "idle" && | ||
| config?.runtime_target === "windows_desktop" && | ||
| runtimePacks.length > 0; |
There was a problem hiding this comment.
Surface runtime-manifest failures in setup
If /v1/runtime/packs fails because the bundled manifest is missing, corrupt, or temporarily unreadable, the catch sets runtimeError but leaves runtimePacks empty. This predicate therefore skips RuntimeSetup, the only component that renders that error, and presents the normal capture UI even though required local components cannot be installed; the setup/error state should also be selected when runtimeError is nonempty.
Useful? React with 👍 / 👎.
交付\n- Windows Tauri 2 + Python sidecar 安装包与按需运行包\n- 平台提取、音频交付、结构化错误与 text-ready 状态\n- Cloudflare Worker 安全封口、许可证、CI/SBOM/attestation\n- 移动端 44pt、图片切换 crossfade、最近记录摘要与品牌展示\n\n## 验证\n- Python: 156 passed, 1 live skipped\n- Worker: 4 passed\n- UI smoke: 7 passed\n- TypeScript / Vite / cargo fmt / clippy: passed\n- npm audit: 0 vulnerabilities\n- clean NSIS install + WebView/API handshake + orphan cleanup: passed\n\n## 已知外部边界\n- 小红书图文与 Live 已实测;视频样本当前触发平台会话验证\n- YouTube 在当前中国网络不可达,约 53 秒内给出可行动错误