Repository navigation
Sync global placeholders, brand profiles and language with guides - #187
Merged
Merged
Conversation
5 tasks
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.
Why
Cloud sync only ever uploaded guides. Global placeholders and brand profiles stayed on each computer, so a guide using
[[Company]]or a brand profile exported differently on every computer. It showed raw[[Company]]text, unbranded output, or quality-check warnings on a computer missing the values.What syncs now
On by default whenever guide sync is on, with no separate toggle:
settings.language). Nothing onmainsets it yet, so in practice this starts with the translations branch (see below).Other capture options, AI, storage and backups stay per computer.
How
settings-v1archive per version, versioned exactly like a guide: immutable versions,parent/mergedproperties, heads, and pruning to the current version plus two before it (one on Free up space). It's a plain zip rather than parts, so old StepForge versions running part cleanup can't delete anything it depends on.core/shared-settings.js) is three-way by key, like guide merge:updatedAt.BrandingStore.addAsset(SVGs sanitized again; I checked that the sanitizer is idempotent, so this can't loop), and unknown entries are refused with "synced by a newer StepForge" so an older version can't merge them away.BrandingStore.replaceProfiles), so a synced profile doesn't come back as a new edit, and unchanged files aren't rewritten.listSettings()was added to Google Drive and to folder storage (OneDrive, Dropbox, WebDAV).Notes
languagethroughsettings.set, but nothing reloads the window. Once translations lands,onSharedChangeinapp/main.jsshould reload whenchangesincludes'language', and the docs' "Settings that sync" list should gain Language. A stored'en'already counts as an explicit choice there, so it syncs as one.Tests
npm test: 1029 pass. Newtests/unit/shared-settings.test.jscovers:Writing these caught a bug before commit: a computer with no sync history was using the cloud version as its merge base, so its empty settings would have deleted everyone's.
Recording shortcuts
Capture and Pause/resume shortcuts from Settings → Capture → Hotkeys now sync too. Each binding has its own edit clock, so edits to different shortcuts combine and unrelated capture changes do not promote an older binding. Cleared bindings and explicit resets to defaults sync; untouched defaults on a new computer do not override existing choices. Incoming shortcuts re-register immediately in the running app. Other capture options stay local.
Validation for this addition:
npm test— 1,046 passed, 20 skipped, zero failures. Five new regression cases fail on the prior implementation and pass with the change; repository structure and whitespace checks pass.