Skip to content

fix(sync): refresh cloud preferences and restore cleared shortcuts - #2881

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-account-settings-sync-coverage
Sep 8, 2026
Merged

fix(sync): refresh cloud preferences and restore cleared shortcuts#2881
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-account-settings-sync-coverage

Conversation

@bobleer

@bobleer bobleer commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Account settings could reach disk while the live font, language, appearance or shortcut runtime retained old preferences. Refresh these runtimes after settings-applied events, serialize overlapping refreshes, and restore registered shortcut defaults when synced overrides are cleared.

Exclude document write timestamps and informational build versions from settings hashes to avoid uploading unchanged preferences. Add configuration coverage and older supported payload round-trip tests, and document the actual synchronization scope and authoritative import behavior.

Type and Areas

Type: Bug fix / regression fix

Areas: Rust core settings sync, Web UI configuration and preference runtimes, documentation

Motivation / Impact

  • Cloud-applied font, language and appearance changes refresh without restarting the frontend. A failed preference refresh does not block the others.
  • Shortcut watchers work with startup bootstrap values, including deletion of all overrides; cleared bindings restore their original registered keys.
  • Identical settings no longer upload solely because another host changed the document timestamp or build metadata.
  • A two-instance export/import/restart fixture covers 33 representative preference paths and compares the complete settings document.

Verification

Passed:

  • cargo test -p openbitfun-core --no-default-features --lib service::config:: — 122 tests.
  • cargo test -p openbitfun-core --no-default-features --features remote-connect --lib service::remote_connect::settings_sync::tests — 6 tests.
  • cargo test -p openbitfun-core --no-default-features --features remote-connect --lib service::config::service::tests::account_settings_round_trip_covers_persisted_preference_groups — final coverage fixture passed.
  • pnpm --dir src/web-ui exec vitest run src/infrastructure/config/services/ConfigManager.test.ts src/infrastructure/account/settingsAppliedListener.test.ts src/infrastructure/font-preference/core/FontPreferenceService.test.ts src/infrastructure/services/ShortcutManager.test.ts — focused suites passed; the subsequently added refresh-order test also passed in the settings-applied suite (44 tests total).
  • pnpm run check:web completed the canvas, typography, Appearance and theme gates; its first type-check was blocked by missing generated API bindings. After pnpm --dir src/web-ui run gen:types, pnpm run type-check:web and the final pnpm --dir src/web-ui exec tsc --noEmit passed.
  • pnpm run fmt:rs and git diff --check passed.

Reviewer Notes

AI-assisted implementation with focused automated verification. Tests use isolated configuration directories and mocked frontend adapters. No live multi-device, SSH remote-workspace, remote-control, Peer Device Mode or Detached Dispatch end-to-end verification was performed; no rendered visual QA is claimed.

The settings wire format and import replacement semantics are unchanged. The hash adjustment can cause one upload on the next local change when an existing cursor still has the old hash. Custom Agent/Skill source files, Hook scripts, imported skin/pet assets and local credential-vault records remain outside the configuration payload; the documentation makes that boundary explicit.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@bobleer
bobleer merged commit c88b25f into GCWing:main Sep 8, 2026
13 checks passed
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.

1 participant