Repository navigation
feat: keep user configurations in sync between computers via a shared file (#3058) - #3063
Merged
Merged
Conversation
#3058) Add a shared configuration file to the Settings page. Agent exports the configuration there when it is saved to the keyboard, watches the file for changes, and offers to load changes made on another computer. - configurable shared configuration file path via a native file picker - change detection checkbox that is only enabled once a custom path is set - top notification panel (matching the other top panels) showing the full path instead of a native popup - persisted acknowledged content hash so a change made while Agent was not running is offered on startup, and applied/ignored changes are not offered again until the file changes - fs.watch plus a polling fallback for sync folders and network shares
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.
Implements #3058.
Adds a Configuration file section to Settings that lets two computers share one keyboard configuration through a file in a synced folder (Dropbox, Google Drive, a network share, ...).
Behavior
(default path)/(custom path).autoSave: false), so the config is previewed and the usual Save to keyboard progress button appears.Detecting changes while Agent is not running
The acknowledged content hash (SHA-256) is persisted (
shared-config-acknowledged-content-hash). On startup the file is compared against it, so a change made while Agent was not running is still offered. Applying or ignoring records acknowledgement, so the same content is not offered again (including after a restart) until the file changes. Agent's own exports are also marked acknowledged.Watching
fs.watchon the file's directory plus a 3 s polling fallback (some sync clients and network shares don't emit reliable events). Bursts are coalesced without starving the check, and a generation guard prevents a staleconfigure()from re-enabling watching.Notes
FileDialogService).uhk-commonbuild,uhk-agentwebpack + eslint,uhk-webrenderer build +ng lint+ unit tests all pass.