Add a committed, project-level auto-sync default (autoSync.default).…#243
Merged
Conversation
* feat(open-knowledge): add committed auto-sync default for projects Add a git-committed, project-scoped autoSync.default (true | false | null) that seeds each machine's autoSync.enabled on first open. A maintainer can set Settings > Sync > 'Default for everyone' to Off (suppress the onboarding prompt, default sync off), On (default sync on), or Ask (previous behavior). The value travels with the repo so collaborators stop being re-prompted on every clone. It is a soft default: a per-machine autoSync.enabled choice still overrides it. The server's readProjectAutoSyncEnabled resolves per-machine enabled first, then the committed default; the legacy committed autoSync.enabled read is removed (that field is project-local-scoped, so a committed value was a scope mismatch). The onboarding gate gains a projectSynced signal so committed-default projects stay flash-free. * address review feedback for committed auto-sync default - server-factory: log a correlation warning when the committed config is invalid, so a maintainer debugging sync-disabled-despite-default-true can connect it to the parse error (mirrors the project-local path). Adds a degraded-path test. - add dedicated useSyncDefaultWriter unit tests that pin the committed projectBinding scope, catching a scope-collision regression that would silently write per-machine config instead of committed. - test the Settings committed-default ToggleGroup disabled-until-synced cold-start guard. - EditorPane: drop the stale gate-input count from the onboarding comment. * Style committed-default sync options with spacing and primary blue Add 8px spacing between the Ask/On/Off options (ToggleGroup spacing prop, which also gives each option its own rounded outline) and style the selected option with the app's primary blue (bg-primary / text-primary-foreground / border-primary) instead of the muted ToggleGroup default. Matches the Button default variant's accent used elsewhere in the app. * Refine shared-default copy and drop per-option hint text - Rename the Settings > Sync committed-default control from 'Default for everyone' to 'Shared default'. - Replace the description with: 'Set the auto-sync default for users opening this project for the first time. This setting is committed to your repository.' - Remove the dynamic hint line that appeared under the options on selection. - Regenerate Lingui en + pseudo catalogs. * Shorten committed-default option labels to None / On / Off The Shared default options are now None / On / Off (previously On by default / Off by default / Ask each person). None means no committed default, so first-time openers are prompted. Selection values and test ids are unchanged. Regenerate Lingui en + pseudo catalogs. * Add Shared default docs and enable the committed default on this repo - docs/github-sync: document the Settings > Sync > Shared default control for setting a project-wide auto-sync default for first-time openers. - .ok/config.yml: set autoSync.default: false so this repo opens with auto-sync off and no onboarding prompt, dogfooding the feature. GitOrigin-RevId: 6116b531f3dccf50ec714ece802a6757b0af7017
Contributor
There was a problem hiding this comment.
Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28071332738). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.
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.
Add a committed, project-level auto-sync default (
autoSync.default). A maintainer can now ship a project that opens quietly for collaborators: set Settings → Sync → Default for everyone to "Off by default" (or "On by default") and the choice is committed to.ok/config.ymland travels with the repo via git. New clones then skip the "enable auto-sync" onboarding prompt and open with sync in the chosen state.autoSync.defaultistrue | false | null(null/absent = ask, the previous behavior) and seeds each machine'sautoSync.enabledon first open. It is a soft default — anyone can still change auto-sync for their own machine in Settings, which overrides the committed default for that machine only. The per-machineautoSync.enabledsetting stays gitignored and per-machine.