veza/apps/web/src/features/chat/components
senke b8eed72f96 feat(webrtc): coturn ICE config endpoint + frontend wiring + ops template (v1.0.9 item 1.2)
Closes FUNCTIONAL_AUDIT.md §4 #1: WebRTC 1:1 calls had working
signaling but no NAT traversal, so calls between two peers behind
symmetric NAT (corporate firewalls, mobile carrier CGNAT, Incus
container default networking) failed silently after the SDP exchange.

Backend:
  - GET /api/v1/config/webrtc (public) returns {iceServers: [...]}
    built from WEBRTC_STUN_URLS / WEBRTC_TURN_URLS / *_USERNAME /
    *_CREDENTIAL env vars. Half-config (URLs without creds, or vice
    versa) deliberately omits the TURN block — a half-configured TURN
    surfaces auth errors at call time instead of falling back cleanly
    to STUN-only.
  - 4 handler tests cover the matrix.

Frontend:
  - services/api/webrtcConfig.ts caches the config for the page
    lifetime and falls back to the historical hardcoded Google STUN
    if the fetch fails.
  - useWebRTC fetches at mount, hands iceServers synchronously to
    every RTCPeerConnection, exposes a {hasTurn, loaded} hint.
  - CallButton tooltip warns up-front when TURN isn't configured
    instead of letting calls time out silently.

Ops:
  - infra/coturn/turnserver.conf — annotated template with the SSRF-
    safe denied-peer-ip ranges, prometheus exporter, TLS for TURNS,
    static lt-cred-mech (REST-secret rotation deferred to v1.1).
  - infra/coturn/README.md — Incus deploy walkthrough, smoke test
    via turnutils_uclient, capacity rules of thumb.
  - docs/ENV_VARIABLES.md gains a 13bis. WebRTC ICE servers section.

Coturn deployment itself is a separate ops action — this commit lands
the plumbing so the deploy can light up the path with zero code
changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 23:38:42 +02:00
..
chat-interface refactor(frontend): eliminate ~45 'any' types in production code 2026-02-22 17:44:49 +01:00
chat-sidebar fix(e2e): unambiguous chat conversation + new-channel locators — rc1-day2 root cause #1 2026-04-18 17:11:57 +02:00
virtualized-chat-messages fix(web): resolve all 568 TypeScript errors — tsc --noEmit now passes with zero errors 2026-02-13 00:32:08 +01:00
ActiveCallBar.stories.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
ActiveCallBar.tsx feat(chat): add call signaling types 2026-02-22 03:46:10 +01:00
CallButton.stories.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
CallButton.tsx feat(webrtc): coturn ICE config endpoint + frontend wiring + ops template (v1.0.9 item 1.2) 2026-04-26 23:38:42 +02:00
ChatInput.stories.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
ChatInput.test.tsx test: fix and improve unit tests across multiple features 2026-03-25 23:34:42 +01:00
ChatInput.tsx stabilisation commit: while implementing v0.10.5 2026-03-09 19:36:33 +01:00
ChatInterface.stories.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
ChatInterface.tsx refactor(web): split ChatInterface into chat-interface module 2026-02-06 14:24:41 +01:00
ChatMessage.stories.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
ChatMessage.test.tsx test: fix and improve unit tests across multiple features 2026-03-25 23:34:42 +01:00
ChatMessage.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
ChatMessages.stories.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
ChatMessages.test.tsx test(web): add unit tests for chat feature (P3.3) 2026-02-11 22:15:13 +01:00
ChatMessages.tsx feat(ui): unsaved changes warning + chat date separators 2026-02-10 00:07:19 +01:00
ChatRoom.stories.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
ChatRoom.tsx feat(webrtc): coturn ICE config endpoint + frontend wiring + ops template (v1.0.9 item 1.2) 2026-04-26 23:38:42 +02:00
ChatSidebar.stories.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
ChatSidebar.tsx refactor(chat): decompose ChatSidebar into sub-components 2026-02-05 20:07:09 +01:00
CreateRoomDialog.stories.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
CreateRoomDialog.tsx feat(v0.10.7): Collaboration Temps Réel F481-F483 2026-03-10 13:34:16 +01:00
IncomingCallModal.stories.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
IncomingCallModal.tsx fix: stabilize frontend — 98 TS errors to 0, align API endpoints, optimize bundle 2026-03-24 21:18:49 +01:00
InviteRoomModal.tsx fix: stabilize frontend — 98 TS errors to 0, align API endpoints, optimize bundle 2026-03-24 21:18:49 +01:00
MentionAutocomplete.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
MessageSearch.stories.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
MessageSearch.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
RoomMembersModal.tsx fix: stabilize frontend — 98 TS errors to 0, align API endpoints, optimize bundle 2026-03-24 21:18:49 +01:00
TypingIndicator.stories.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
TypingIndicator.tsx ui(tokens): migrate text-kodo-content-dim to text-muted-foreground (35 files, 160 instances) 2026-02-09 00:03:33 +01:00
VirtualizedChatMessages.stories.tsx fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
VirtualizedChatMessages.tsx refactor(web): split VirtualizedChatMessages into module (item, empty, loading, scroll btn, skeleton) 2026-02-07 04:44:26 +01:00