Keep streaming insertion enabled for migrated prefs#446
Merged
H-Chris233 merged 1 commit intoMay 15, 2026
Merged
Conversation
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 Open-Less#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.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Summary
Tests
Closes #440
PR Type
Enhancement, Bug fix, Documentation, Tests
Description
Default streaming input after updates
Migrate legacy prefs with marker
Preserve manual opt-outs after migration
Add release-note behavior warning
Diagram Walkthrough
File Walkthrough
persistence.rs
Migrate legacy streaming prefs on loadopenless-all/app/src-tauri/src/persistence.rs
read_preferencesto migrate legacy preference files.streamingInsert:false.types.rs
Add streaming migration marker to preferencesopenless-all/app/src-tauri/src/types.rs
streaming_insert_default_migratedonUserPreferences.streamingInsertto enabled.falsevalues.ipc.ts
Sync mocked preferences shape with backendopenless-all/app/src/lib/ipc.ts
streamingInsertDefaultMigratedto mock settings.types.ts
Document streaming default-on preferenceopenless-all/app/src/lib/types.ts
streamingInsertDefaultMigratedto the TS interface.streamingInsertdocs to default-on behavior.stylePrefs.test.ts
Update style preference test fixtureopenless-all/app/src/lib/stylePrefs.test.ts
UserPreferences.release-tauri.yml
Add release notes for default-on streaming.github/workflows/release-tauri.yml