Skip to content

Sync the dictionary and snippets with iPhone, Android and other Macs - #23

Merged
chiranjeebhub merged 4 commits into
mainfrom
claude/project-thread-xh5lbz
Nov 14, 2026
Merged

chiranjeebhub merged 4 commits into
mainfrom
claude/project-thread-xh5lbz

Conversation

@chiranjeebhub

Copy link
Copy Markdown
Owner

Requested by Chiranjeeb · project thread

What

End-to-end encrypted sync of the dictionary and snippets across Mac, iPhone and Android, with no accounts. One device creates a 32-byte secret, and other devices pair by scanning its QR code or typing its HT1-… code.

  • HushtypeCore
    • SyncVocabulary: the shared JSON format (same as Android). Items merge one at a time, the newest updatedAt wins, removals are tombstones (dropped after 30 days), and reconciled turns local edits into timestamped changes.
    • SyncKeys: HKDF-SHA256 derives the group id, the auth token and the AES-256-GCM key. Also handles the Crockford pairing code and sealing and opening the blob.
    • SyncClient: GET, merge, then compare-and-swap PUT (If-Match / If-None-Match: *), retrying on 412.
  • Mac app: DeviceSync syncs on launch, on wake, 2 s after an edit and every 10 min. Settings › General gets a Your devices section: Turn On, Show Pairing Code… (QR plus text), Enter Code…, Sync Now and Turn Off. iCloud sync stops touching the dictionary and snippets while this is on.
  • sync-server/: a Cloudflare Worker with D1, its tests, the protocol spec (README) and a JS reference that generates test vectors for the Swift and Kotlin tests.

Testing

  • On the Mac: swift build passes, and swift test passes 57 tests with 0 failures (format vectors, merge, a fake-server client with a 412 retry).
  • node --test sync-server/test.mjs passes 3 of 3.
  • The live test (HUSHTYPE_SYNC_LIVE=1 swift test --filter LiveSyncTests) is still to run, after the Worker is deployed.

The iOS side is in HushType-Keyboard on the same branch name. Its project.yml points at this branch until this PR merges.


Generated by Claude Code

End-to-end encrypted sync with no accounts: one device makes a secret,
others pair by scanning its QR code or typing the code. HushtypeCore gets
the shared format (SyncVocabulary with per-item merge and tombstones),
the keys and AES-GCM sealing (SyncKeys) and the client (SyncClient). The
Mac app adds a Your devices section in Settings > General. sync-server/
is the Cloudflare Worker + D1 server with tests and the protocol spec.
iCloud sync leaves the dictionary and snippets alone while this is on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H6HfURkfdoEWCjjJLphzQX
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H6HfURkfdoEWCjjJLphzQX
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H6HfURkfdoEWCjjJLphzQX
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-14T08:52:44.402360Z
We couldn’t complete this review. Comment @codex review to try again.
7c93409 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chiranjeebhub
chiranjeebhub merged commit 38ca6bd into main Nov 14, 2026
1 check passed
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.

2 participants