Make Comet local-first with optional multi-device sync - #30
Open
jsgrrchg wants to merge 18 commits into
Open
Conversation
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.
I tested this extensively on macOS, but I haven't been able to test it on Linux or Windows since I don't currently have environments set up for those platforms.
Please review this carefully, as these changes affect important parts of the app. I've also extended the E2E tests to improve macOS coverage.
Feel free to request any changes. I'll keep an eye out for feedback and address anything that comes up.
Closes #3
-- The following is AI-- :
Summary
What changed
Local-first engine profiles
Local,Synced, andDevelopmentworkspace scopes, resolve the active profile once at startup, and expose it through the newEngineInfoRPC.profiles/local/with a stable installation-local identity.orgs/{org_id}/{user_id}layout for authenticated profiles, so current synced installations reopen their existing data in place.Authentication and lifecycle
comet headlessand the Linux installer start immediately in local-only mode; signing in is no longer required to run the daemon.comet loginandcomet logoutselect the profile for the next engine start, while refusing to mutate credentials behind a running engine.comet status, with signed-out local mode treated as healthy.Desktop experience
EngineInfoas synced so they retain the previous authentication gate instead of being mistaken for local runtimes.Tests and documentation
Upgrade behavior
Testing
cargo test --workspace --features comet-sync/mock-server -- --skip repos_round_trip_add_branches_worktrees --skip falls_back_when_interactive_attempt_hangscargo test -p comet-rpc --example e2e_drivercargo clippy --workspace --all-targets --features comet-sync/mock-serverscripts/e2e-smoke.shgit diff --check upstream/main...HEADThe changes introduced by this branch pass Clippy. The workspace Clippy command exits successfully with only pre-existing warnings outside the modified hunks:
collapsible_ifincrates/update; fourcloned_ref_to_slice_refswarnings incrates/doc;needless_return, twoobfuscated_if_elsewarnings, and one unused test variable incrates/engine; and, incrates/ui, sevenunexpected_cfgswarnings from the macOS Objective-C macros plusmanual_is_multiple_of,collapsible_if,question_mark,unnecessary_sort_by, fourdoc_lazy_continuationwarnings, threetype_complexitywarnings,too_many_arguments, andlen_without_is_empty. Running Clippy with-D warningstherefore stops at the first unchangedcollapsible_ifwarning incrates/update/src/lib.rs. The workspace test command skips two unchanged baseline tests on macOS: one compares/var/...with its canonical/private/var/...path, and one is an existing interactive-shell timeout flake.cargo fmt --all -- --checkcurrently reports only pre-existing formatting drift in unchangedcrates/sync/src/room.rs, which is identical toupstream/main.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.