feat(client-sync): add home-server settings sync - #1573
Draft
hmans wants to merge 17 commits into
Draft
Conversation
* origin/main: fix(api): batch presence hydration (#1597) fix(frontend): scope thread click-outside dismissal (#1595) fix(release): make next prerelease alpha (#1596) docs(api): rewrite compatibility guidance (#1593) docs: expand operator CLI guide (#1590) feat(api): add client-server compatibility discovery (#1586) fix(frontend): enforce server description limit (#1587) fix(core): forbid threads in direct messages (#1583) refactor(core): lease snapshot work per pass (#1581) # Conflicts: # apps/docs-website/src/content/docs/reference/connectrpc-api/index.mdx # apps/docs-website/src/content/docs/reference/connectrpc-api/server-discovery.mdx # apps/docs-website/src/content/docs/reference/connectrpc-api/types.mdx # apps/docs-website/src/generated/connectrpc-api/discovery.raw.mdx # apps/frontend/src/lib/ServerIcon.svelte # apps/frontend/src/lib/ServerSidebarEntry.svelte # apps/frontend/src/lib/api-client-tests/server.spec.ts # apps/frontend/src/lib/state/server/store.svelte.spec.ts # apps/frontend/src/routes/layout.svelte.spec.ts # cli/internal/connectapi/server.go # cli/internal/pb/chatto/discovery/v1/server.pb.go # docs/architecture/runtime-components.md # docs/fdr/INDEX.md # packages/api-types/src/chatto/discovery/v1/server_pb.ts # proto/chatto/discovery/v1/server.proto # tools/split-connectrpc-docs.mjs
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
Chatto's multi-server client needs a portable, instance-independent home for
personal settings and the known-server directory before it can ship cleanly as
a standalone web, desktop, or mobile client. A new device should be able to
restore those settings naturally from a Chatto server the user already trusts,
without asking them to configure a separate sync URL.
What changed
discovery and exposed through the dedicated public
chatto.clientsync.api.v1ConnectRPC packagechatto.clientsync.v1package atclient_sync.{userId}.{preferences,servers}in the existing backed-upRUNTIME_STATEKV bucket; this data does not enter EVTis selected automatically, while multiple eligible servers require an
explicit choice
/settingsscreen and app-header gear for theme,language, timezone/time format, and notification sounds
format, and up to 100 public known-server records
passwords, cookies, bearer tokens, passkeys, or sessions
connecting or following a remote home-server redirect
destination cannot accept the transfer
leaving an explicit path to keep the current capable home
discovery to settle before automatically choosing a home
and continuously retries durable pending cleanup on every replica; a
post-write fence check prevents concurrent mutations from recreating erased
data
settings back link to parsed same-origin paths
and an accessible label
inventory, configuration reference, generated API docs, and translations
Compatibility, security, and operations
with client sync disabled simply remain ineligible as a home server
[client_sync].enabledorCHATTO_CLIENT_SYNC_ENABLEDUNIMPLEMENTED, allowing mixed-version clients tofail soft and retain device-local settings
metadata cannot replace an authenticated local origin or redirect its token
account to avoid shared-device cross-account leakage
RUNTIME_STATE; the renamed keys and API areunreleased, so no storage migration is required
Test plan
mise codegen-protomise x -- buf lint --path proto/chatto/clientsync --path proto/chatto/discovery/v1/server.proto protomise lint-frontend— Svelte check: 0 errors and 0 warnings; ESLint cleanmise test-cli— production frontend build and all Go packages passedcharset-normalizerextra because the repository wrapper's isolated installcurrently lacks an encoding detector)
regression tests before the final clean pass
Interactive in-app browser control was unavailable in this environment;
browser-mounted Vitest coverage supplied runtime UI verification. The home
marker remains worth a quick manual aesthetic check before merge.
Closes #1565.
Closes #148.