Repository navigation
The desktop app shows a contact's safety number to verify - #234
Merged
Merged
Conversation
Chat Options > View Safety Number... in a contact's chat, and View Safety Number under "Your safety number with ... changed", open the Mac app's sheet: the QR code, the 60 digits in 3 rows of 4 groups of 5 (selectable), the explanation, the no-number-yet and failure states, Done.
…er sheet Review fixes: the sheet closes when a chat is selected, so the keys never go to a composer under it; its window test also checks that the keys return to the composer, and that Settings and the chat shortcuts wait while it's open.
Owner
Author
Review (
|
This was referenced Nov 28, 2026
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 changed
src/app/safety.rs, the Mac app'sSafetyNumberView): "Safety Number with {name}", a spinner while the core reads it, then the QR code their phone scans, the 60 digits in 3 rows of 4 groups of 5 (monospace, selectable and copyable, read digit by digit to a screen reader) and the explanation; "There's no safety number with {name} yet: there is one once you've exchanged messages." when there is no session yet; "Couldn't read the safety number: …" (or "Not linked yet.") in red when the read fails; Done, Enter or Esc closes it and gives the keys back to the composer; opening a chat (from a notification or the tray) closes it too. An answer for a sheet closed or reopened for someone else meanwhile is dropped.contactAci), named as the chat's title.qr::codetakes bytes as well as text (a safety number's code is libsignal's scannable bytes); the link screen's call is unchanged.--snapshotrenders a newsafety-numberscreen (Ana's chat with a made-up number).Why
Desktop parity (#157): the core already had
Client::safety_numberand the event text already showed; the desktop app had no way to see the number. Every claim in the issue checked out against the code; nothing was dropped.How it was tested
safety::tests::the_digits_show_in_three_rows_of_four_groups_of_five(and the spoken form)options::tests::a_contacts_chat_offers_their_safety_number(not Note to Self, phone-number chats or groups)events::window_tests::a_safety_number_change_offers_the_number_with_whom_it_is_about(direct chat and group)safety::window_tests::the_sheet_says_why_the_core_couldnt_read_it_and_closes(no core: "Not linked yet."; an unlinked core: "Couldn't read the safety number: …"; the chat shortcuts and Settings wait, checked with real keystrokes; Esc closes and the composer has the keys)safety::window_tests::a_chat_opened_from_a_notification_closes_the_sheet(review fix)core/:cargo fmt --checkpass;cargo clippy --all-targets -q -- -D warningspass;cargo clippy --all-targets --features hush-desktop/snapshot -q -- -D warningspass;cargo test --features hush-desktop/snapshot -qpass (desktop 278, sig-core 537), after the review fixes too.app/orcore/sig-corechanges.safety-number(the sheet with its code, digits and explanation, matching the Mac app's layout) andevents(View Safety Number under the safety number change, in the accent like Reset Secure Session…). The Chat Options menu isn't in a snapshot (a gpui-kit dropdown can't be opened without a click), and the live window wasn't run (the desktop app isn't linked on this Mac), so a real number from the core was not seen on screen.Closes #223