Repository navigation
fix(sync): add the conditional-write switch to the join screen - #11
Merged
Merged
Conversation
The first-run join screen started from DEFAULT_SYNC_CONFIG (cas: false) and rendered no switch for it, so a device that joined an S3 remote stored cas: false and ran on unconditional writes until someone opened Settings > Sync. Settings' Behaviour block moves into SyncBehaviour, shared by both forms: the "Endpoint honours conditional writes" switch with its off-note on S3, the "nothing here to turn on" note on WebDAV. The join screen renders it into the config it already sends to sync_join and stores. The default stays off: the app never probes the endpoint. Closes #3
This was referenced Oct 2, 2026
Merged
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.
What
The first-run join screen now renders the same Behaviour block as Settings >
Sync: the "Endpoint honours conditional writes" switch and its off-note on S3,
and the "nothing here to turn on" note on WebDAV.
Why
Closes #3.
The join screen started from
DEFAULT_SYNC_CONFIG(cas: false) and renderedno switch for it, so a device that joined an S3 remote stored
cas: falseandran on unconditional writes until someone opened Settings > Sync.
How
SyncSection.tsxintosrc/settings/components/SyncBehaviour.tsx, besideSyncField, the othercomponent both sync forms share. Text, classes,
roleandaria-labelareunchanged. The component takes
{ config, onChange }, and Settings' handlerstill clears the "Saved" flag.
JoinSyncScreen.tsxrenders it between the sync passphrase and the masterpassword, writing into the
configthe join already holds.useJoinSyncalready sendsconfigSubset(config), whichcarries
cas, tosync_joinand stores{ ...config, enabled: true }, andRust's
provider_configalready passescasto S3 and drops it for WebDAV.so turning it on is the user's call.
Testing
pnpm exec tsc --noEmit,pnpm run lint:imports,pnpm run format:check,pnpm run verify(17/17), with no test edits.A Playwright run against
pnpm dev, withvault_status,vault_listandsync_joinstubbed on top of the browser IPC shim, exercised:sync_joinreceivesconfig.cas: true, and the storedsync config has
cas: true, enabled: truethe note back
Replacing the join screen's
onChange={setConfig}with a no-op turns that runred at "switch turns on" and at
sync_join(cas was false). Restoring itturns it green again.
pnpm exec tsc --noEmitcleanManual smoke-test of the affected feature
(If you touched
src-tauri/)cargo checkclean(If UI) tested in
pnpm tauri:dev(isolated dev data dir)No changes under
src-tauri/. Not tested inpnpm tauri:devyet, nor againsta real S3 endpoint.
Screenshots / GIFs
None attached. The join screen gains Settings > Sync's Behaviour block as it
already looks there.
Notes for reviewer
have none. It keeps the block identical in both forms.