Skip to content

fix(desktop): a direct call that cannot connect says so - #385

Merged
Aizen93 merged 1 commit into
developfrom
fix/direct-call-could-not-connect
Nov 29, 2026
Merged

Aizen93 merged 1 commit into
developfrom
fix/direct-call-could-not-connect

Conversation

@Aizen93

@Aizen93 Aizen93 commented Nov 29, 2026

Copy link
Copy Markdown
Owner

What was missing

A direct (one to one) call is peer to peer. When its peer connection failed, the voice store only logged it and destroyed the peer. The call panel stayed as it was, with no sound and no explanation.

What the code does now

  • When a direct call's peer connection reaches the failed state, the person gets one error toast in their language. The sentence depends on whether that connection had ever connected:
    • never connected: "The call could not connect: the two devices could not set up a direct connection."
    • connected, then lost: "The call lost its connection. End the call and start it again."
  • Each sentence is shown at most once per call. A peer made again within the call may add the other sentence, but never repeats one. A new call starts fresh.
  • Nothing is shown for a space voice session, for a call that is ending, or for a peer that has already been replaced.
  • The call's state, its teardown and the reconnection logic are unchanged: the peer is destroyed and the failure logged exactly as before.

This is the message part of #59 only. A relay for direct calls is a separate decision and is not in this change.

Key files

  • apps/desktop/src/stores/voiceStore.ts (tellDMCallConnectionGivenUp, connectedDMPeers, onconnectionstatechange in createPeerInternal)
  • apps/desktop/src/i18n/locales/*.json (e2e.callConnectFailed, e2e.callConnectionLost, 11 locales)
  • apps/desktop/src/__tests__/stores/voiceStore.test.ts

Migrations

None. The server is unchanged.

Tests

  • Voice store tests: each sentence for its own state, at most once per call, one of each in one call, a fresh start in a new call, and the silent cases (a call that is ending, a space voice session, a replaced peer).
  • The existing key-parity test covers both keys in all 11 locales; the French typography test covers the French strings.
  • Results: desktop suite 310 files (5896 passed, 1 skipped), typecheck and lint clean.

To check by hand

  1. A direct call between two devices that cannot reach each other: after the connection fails, the first sentence appears once.
  2. A call that connects, then one device loses its network for good: after the connection fails, the second sentence appears once.
  3. End the call and call again: a new failure shows its sentence again.

A direct call whose peer connection reaches the failed state tells the
person once, in their language, what happened, with the sentence that is
true for that connection: one for a connection that never connected (the
two devices could not set up a direct connection), another for one that
connected and was then lost (end the call and start it again).

Each sentence is shown at most once per call, only for the peer the call
holds now in a call that is still up. A new call starts fresh. A space
voice session and a call that is ending say nothing. The call's state,
its teardown and the reconnection logic are unchanged: the peer is
destroyed and the failure logged as before.

Both sentences exist in all 11 locales beside the other direct-call
strings.

Refs #59
@Aizen93
Aizen93 merged commit ba28cea into develop Nov 29, 2026
7 checks passed
@Aizen93
Aizen93 deleted the fix/direct-call-could-not-connect branch November 29, 2026 03:24
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.

1 participant