Keep streaming insertion enabled for migrated prefs

Older builds could persist the old default streamingInsert=false into preferences.json, which is indistinguishable from a user opt-out if the value is treated as an ordinary bool. Add a one-time migration marker, persist normalized legacy prefs on load, and keep later user opt-outs durable after migration.

Constraint: issue #440 requests streaming input/output defaults on for fresh installs and updates, plus release notes for the behavior change.

Rejected: treating any stored false as manual opt-out | old default writes would keep update users off forever.

Rejected: overriding every false forever | would erase a user's post-migration manual opt-out.

Confidence: high

Scope-risk: moderate

Directive: Keep UserPreferencesWire serde defaults and migration markers aligned with persisted UserPreferences fields.

Tested: cargo test --manifest-path src-tauri/Cargo.toml --lib streaming_insert -- --nocapture

Tested: cargo test --manifest-path src-tauri/Cargo.toml --lib legacy_streaming_insert_false_is_migrated_and_marker_is_persisted -- --nocapture

Tested: npm run build

Tested: cargo test --manifest-path openless-all/app/src-tauri/Cargo.toml --lib

Tested: git diff --check

Not-tested: cargo fmt --check fails on pre-existing unrelated formatting drift in volcengine.rs and commands.rs.
This commit is contained in:
H-Chris233 committed 2026-05-15 18:59:45 +08:00
1 parent 74208322bb
commit b0c469dbd4
6 files changed
+152 -6

No files matched your search

+5
View File
@@ -505,6 +505,11 @@ jobs:
- 以 `-tauri` 结尾的 tag 是**正式版**(自动推送给所有 in-app 检查更新的用户)。
- 以 `-beta-tauri` 结尾的 tag 是 **Beta 版**(GitHub 标 pre-release,**不**通过 in-app updater 推送给正式版用户;只对在「设置 → 关于 → 加入 Beta 渠道」开关切到 Beta 的用户可见,且需要手动从此页面下载安装)。
### 行为变更提示
- 流式输入默认开启;不兼容场景会自动回落到一次性插入。可在「设置 → 高级」关闭。
- 流式输入成功后默认把最终文本同步到剪贴板,方便再次粘贴;可在「设置 → 高级」关闭。
append_body: true
# Matrix jobs all upload assets to the same release. Generate notes once
# so macOS, Windows, and Linux jobs do not duplicate the release body.