Repository navigation
fix(app): the hello is always first, and device removal is confirmed in the future tense - #1983
Merged
Merged
Conversation
The desktop refuses a connection whose first line is not the hello. The backend is built on the server before Serve says hello, and on a slow start it can emit first: the idle sweep reads sync status every 30 seconds and, from #1971, emits sync.changed on that first read. A manual run of the release binary through the desktop core hit "first event is sync.changed, expected hello" and failed to start. The server now holds every frame queued before the hello and writes it straight after, in order, so sequence numbers still follow write order. A server closed without ever saying hello still writes what it held. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
devices.list's remove_line is shown before the person confirms, but it used
pair.ChatsRevokedLine ("… was removed — it can no longer sync your chats").
remove_line now uses pair.ChatsRemoveLine ("… will no longer sync your
chats") with the same warning about what removal cannot undo; the
devices.remove receipt and the terminal keep the after sentence.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
CI evidence, judged against a fresh app/v3 baseline (PRs into app/v3 don't trigger CI, so both were dispatched by hand):
|
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.
Summary
Two bugs from a post-merge manual check of #1971 and #1977. The check drove the release binary through the desktop's Rust core and rendered the Devices screen.
1.
sync.changedcould arrive beforehello(from #1971). The desktop refuses a connection whose first line isn'thello. One real start failed withfirst event is "sync.changed", expected "hello".The backend is built on the appwire server before
Servesendshello. On a slow start, the 30-second idle sweep can run first, and its first sync-status read emitssync.changed.appwire.Servernow holds every frame queued before the hello and writes it right after, in order, so sequence numbers still follow write order. That guarantee holds for any early emitter, not just this one. A server closed without ever saying hello still writes what it held, which keepsTestSequenceNumbersAreConsecutiveAcrossGoroutines' behaviour.2. The removal confirmation was in the past tense (from #1977).
remove_lineis shown before the person confirms, but it reusedpair.ChatsRevokedLine: "Home was removed — it can no longer sync your chats…".It now uses
pair.ChatsRemoveLine: "Home will no longer sync your chats.", followed by the same warning about what removal can't undo. Thedevices.removereceipt and the terminal'scodeaf devices removekeep the after-removal sentence.Test plan
TestAnEventEmittedBeforeTheHelloFollowsIt: fails without the fix (line 0 = sync.changed seq 1, want hello seq 1); passes 5/5 under-racewith itgo test -race ./internal/appwire/: only the two knownPROTOCOL.mdfailures, which are already on the app/v3 baseline listgo test ./internal/pair/okgo test -tags=engine ./cmd/codeaf -run '^(TestAppDevices|TestC[0-9]+App|TestAppNote|TestAnUnknownNote)'ok, including the updated remove_line assertions (it must differ from the receipt)go vet, gofmt cleanThe desktop side of the duplicated-receipt display is a separate codeaf-desk PR. It works with both the old and the new wording.
🤖 Generated with Claude Code