Skip to content

fix(settings-sync): exclude enterForNewline from cross-device sync#880

Open
Just-Insane wants to merge 6 commits into
SableClient:devfrom
Just-Insane:fix/settings-sync
Open

fix(settings-sync): exclude enterForNewline from cross-device sync#880
Just-Insane wants to merge 6 commits into
SableClient:devfrom
Just-Insane:fix/settings-sync

Conversation

@Just-Insane
Copy link
Copy Markdown
Contributor

@Just-Insane Just-Insane commented May 19, 2026

Description

enterForNewline is 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 excludes enterForNewline from the cross-device settings sync set.

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).

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.

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.
@Just-Insane Just-Insane marked this pull request as ready for review May 19, 2026 23:15
@Just-Insane Just-Insane requested review from 7w1 and hazre as code owners May 19, 2026 23:15
Copilot AI review requested due to automatic review settings May 19, 2026 23:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 enterForNewline to NON_SYNCABLE_KEYS so 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 thread src/app/utils/settingsSync.ts Outdated
Comment on lines +19 to +20
// Input behaviour — mobile disables enter-for-newline; syncing would override that
'enterForNewline',
Comment thread src/app/utils/settingsSync.ts Outdated
'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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants