fix(settings-sync): exclude enterForNewline from cross-device sync#880
Open
Just-Insane wants to merge 6 commits into
Open
fix(settings-sync): exclude enterForNewline from cross-device sync#880Just-Insane wants to merge 6 commits into
Just-Insane wants to merge 6 commits into
Conversation
The setting is disabled on mobile by default and reflects device-specific input behaviour. Syncing it across devices would cause a desktop preference to override the mobile-appropriate default.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the cross-device settings sync filter to treat enterForNewline as device-local, preventing desktop/mobile ergonomics preferences from overriding each other via sync.
Changes:
- Added
enterForNewlinetoNON_SYNCABLE_KEYSso it is excluded from uploaded sync payloads and always restored from local settings during merges. - Added a Changeset entry documenting the patch-level change.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/app/utils/settingsSync.ts |
Excludes enterForNewline from the cross-device sync set via NON_SYNCABLE_KEYS. |
.changeset/settings-sync.md |
Adds a patch changeset noting the sync exclusion. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+19
to
+20
| // Input behaviour — mobile disables enter-for-newline; syncing would override that | ||
| 'enterForNewline', |
| 'memberSortFilterIndex', | ||
| // Developer / diagnostic | ||
| 'developerTools', | ||
| // Input behaviour — mobile disables enter-for-newline; syncing would override that |
…BLE_KEYS test - Reword comment to clarify it's the toggle that mobile disables, not that mobile always uses newline behavior - Add 'enterForNewline' to the expected-set assertion in settingsSync.test.ts
…rch branch The setting does not exist in the Settings type on this branch — it is introduced in feat/encrypted-search-idb. Excluding a non-existent key causes a TS2769 typecheck failure. The exclusion will be added to that branch alongside the setting definition.
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.
Description
enterForNewlineis a device-ergonomic setting — a keyboard user on desktop typically wants Enter to send, while the same user on mobile may prefer Enter to insert a newline. Syncing this setting across devices causes one device to override the other's preference. This change excludesenterForNewlinefrom the cross-device settings sync set.Fixes #
Type of change
Checklist:
AI disclosure:
The change removes the key from the set of setting keys included in the cross-device sync payload so each device retains its own value independently.