Skip to content

Add a committed, project-level auto-sync default (autoSync.default).…#243

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Jun 24, 2026
Merged

Add a committed, project-level auto-sync default (autoSync.default).…#243
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

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.yml and 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.default is true | false | null (null/absent = ask, the previous behavior) and seeds each machine's autoSync.enabled on 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-machine autoSync.enabled setting stays gitignored and per-machine.

* 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

@inkeep-internal-ci inkeep-internal-ci Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@inkeep-oss-sync inkeep-oss-sync Bot merged commit 27ddd38 into main Jun 24, 2026
2 checks passed
@inkeep-oss-sync inkeep-oss-sync Bot deleted the copybara/sync branch June 24, 2026 02:41
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