Repository navigation
fix(desktop): echo skillRecommend in the remote settings reply - #824
Merged
Merged
Conversation
A paired phone could not turn "智能技能推荐 / Skill recommendations" off: the switch flipped back on as soon as the write returned. `update_desktop_settings` accepted the field and the store persisted it, but `reply_settings` never echoed `skillRecommend`, so the snapshot the phone renders did not contain it. The phone reads that snapshot after every write and falls back to `?? true` when a field is absent (the fallback exists for desktops that predate the toggle), so every read looked like "on" no matter what was stored - the value was saved, just never reported. Echo the field, and make the bridge test patch every writable field so `assert_eq!(updated["data"], patch)` fails if the reply ever drops one again. The screenshot mock now reports it too, so the harness exercises the real path instead of the older-desktop fallback.
huichen
enabled auto-merge (squash)
September 25, 2026 09:34
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.
fix(desktop): echo skillRecommend in the remote settings reply
A paired phone could not turn "智能技能推荐 / Skill recommendations" off: the
switch flipped back on as soon as the write returned.
update_desktop_settingsaccepted the field and the store persisted it, butreply_settingsnever echoedskillRecommend, so the snapshot the phonerenders did not contain it. The phone reads that snapshot after every write and
falls back to
?? truewhen a field is absent (the fallback exists for desktopsthat predate the toggle), so every read looked like "on" no matter what was
stored — the value was saved, just never reported.
Echo the field, and make the bridge test patch every writable field so
assert_eq!(updated["data"], patch)fails if the reply ever drops one again.The screenshot mock now reports it too, so the harness exercises the real path
instead of the older-desktop fallback.
Root cause
parse_settings_patch(the remote write surface) andUpdateAppSettingsInputboth gained
skill_recommendin #798, but the reply builder that returns thesnapshot to the phone was not updated:
The phone discards the write reply and re-reads via
get_desktop_settings(
SettingsScreen.changeSettings→resource.reload()), so the missing field —not a failed write — is what made the toggle look stuck on.
Verification
cargo test --manifest-path desktop/src-tauri/Cargo.toml— 1296 passed.left: Null, right: trueat the defaults assertion in
desktop_settings_management_is_shared_and_allowlisted).cargo fmt --check,cargo clippy --all-targets, andclippy --no-default-features --all-targetsondesktop/src-tauri: clean.npm run typecheck+eslintinmobile/for the mock change: clean.Note for whoever captures screenshots
The mobile harness mock (
mobile/shot/mock/RemoteContext.tsx) had the sameomission, which is why a capture never showed the problem. It now reports
skillRecommend, so the harness can show the toggle off.