feat(core): WebRTC TURN/ICE diagnostics and env-configurable Matrix VoIP#2218
Draft
webguru-hypha wants to merge 30 commits into
Draft
feat(core): WebRTC TURN/ICE diagnostics and env-configurable Matrix VoIP#2218webguru-hypha wants to merge 30 commits into
webguru-hypha wants to merge 30 commits into
Conversation
…baseURL Relative page.goto paths failed when tests ran without apps/web-e2e playwright.config.ts (wrong CWD), yielding "Cannot navigate to invalid URL". Centralize BASE_URL-aligned absolute URLs via resolveAppUrl/gotoApp. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Drop the second-line Matrix ID / technical handle from mention rows. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Insert `@` + zero-width space + Hypha/profile label when picking a member, strip `@` from labels for stable tokens, and rewrite to MXIDs plus explicit m.mentions user_ids before sendMessage/editRoomMessage so Matrix notifications and interoperability stay correct. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
When AI + Human panels wrap the layout, the main scroll root allowed overflow-x; panning revealed empty space beside the fixed chat rail. Add overflow-x-hidden on the scrollport so content cannot shift sideways. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Replace Container max-width centering with full-width plus horizontal padding so hero and secondary chrome span the scroll column when panels narrow the viewport. Clip horizontal overflow on the dual-panel main scroll root to avoid dead gaps next to fixed side rails. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Share Matrix→Privy→Person resolution between picker rows and composer: insert the same resolved label as display tokens; merge overrides into mention maps so wire send + timeline pills match the dropdown (not shortened MXID fallbacks). Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
…ll guard - Pass resolveMentionMemberLabel into HumanChatPanelCallStage for roster/Person labels on video tiles (not Matrix shortened MXIDs). - Auto-leave after 5 minutes when connected solo (othersInRoom === 0). - Abort hung GroupCall.enter() after 90s with recoverable error + telemetry. - i18n for idle-leave banner (en, de, es, fr, pt). Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Clear mention display overrides after roomId is declared. Widen resolveMemberLabel typing to accept undefined for call tiles. Gate keyboard mention pick until Hypha name resolution completes. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Avoid redirect-dependent navigation per CodeRabbit review on PR #2209. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Align baseURL parsing with resolveBaseUrl() for consistent navigation. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Person lookup uses usePersonBySub which does not fetch until JWT exists; keep busy until auth finishes loading the token when a privySub path is active. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
When sanitized labels collide, map keys and composer tokens include a shortened MXID suffix so wire send resolves to the intended user. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Cold loads map history before `getUserId()` is available, so own rows were stored as member with technical display labels. Reconcile role, senderName, and avatar when currentUserId or profile avatar resolves. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Message body used synchronous resolveMatrixMemberLabel only; Matrixoften shows bridged Privy MXIDs until roster/Hypha hydrate. Mirror sender pills: use matrix_user_links + Person when label still looks technical. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
…s lag Emit connected/media_snapshot/remote_media_stall telemetry in dev; detect when participants exist without remote userMedia feeds for 45s and show an inline banner with dismiss. Periodic snapshots every 12s while connected. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Prefer roster merge over raw Matrix member displaynames; resolve Person via matrix_user_links when labels still look bridged. Apply same logic to connecting placeholders. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Remove ring outline; use minimal horizontal padding and smaller corner radius so the background sits close to the @ name. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Parse http(s) URLs in plaintext bodies, trim trailing punctuation from hrefs, and wrap with anchor target _blank rel noopener noreferrer. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Copy link now omits redundant chat param (?msg only). Resolve msg-only deep links when viewing the same space. Render Hypha chat URLs as compact # slug chips instead of raw long URLs. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
CodeQL flagged repeated regex tests on user-controlled chat text. Strip trailing URL punctuation with a constant-time character set and scan http(s) URLs without a nested-quantifier regex. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
The first-unread marker used accent-tinted backgrounds that read as a green strip next to messages (including reply context). Use neutral border and muted row tint instead, aligned with mention-highlight styling. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Address known advisories: bump hono to a patched 4.12.x, ensure @hono/node-server stays on the 1.19.x line >=1.19.13 for static middleware fixes, enforce dompurify >=3.4.0 for transitive mermaid chains, and pin @xmldom/xmldom >=0.9.9 under mathjax tooling. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
String index can be undefined under strict indexing; guard before Set.has so web deploy check-types passes. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
…wing t
CodeRabbit: inner variable shadowed useTranslations('HumanChatPanel') t.
Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
CodeRabbit: wirePlain substitutes MXIDs; keep user-facing preview as typed text. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Horizontally scroll the tab rail so Chat, Members, and Mentions stay fully visible when the panel is narrow or the rail was scrolled. Runs on active tab change and after tab clicks (including re-selecting the same tab). Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
- Use distinct other-Matrix-user count for onlyLocalInRoomCall (not device count) so one person on two devices no longer mis-labels Start vs Join. - When remote media stall is detected, show stall copy and stop the infinite spinner on remote placeholder tiles; pass remoteMediaStall from useSpaceGroupCall into the call stage. - i18n: add callRemoteParticipantMediaStalled in all HumanChatPanel locales. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Export renderTextWithMentions for the mention inbox excerpt: MXID tokens get the same pills and async Person resolution as the timeline. Add MentionInboxSenderName for senders whose Matrix display is still technical (Privy-bridged) so the header line uses Person after load. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Sum unread @-mentions across joined Matrix rooms for bell and Chat/Mentions tabs. Mentions tab lists mentions from all rooms with room labels; selecting another space’s mention navigates via ?msg= when slug is known from session or storage. Persist room→space slug in sessionStorage for routing. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
…etry) Wire createClient VoIP options from NEXT_PUBLIC_MATRIX_WEBRTC_* env vars, log privacy-safe turn_probe / ice_gather_probe / webrtc_summary events after gc.enter(), and optionally enable Matrix SDK summary stats collection. Co-authored-by: webguru-hypha <webguru-hypha@users.noreply.github.com>
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Implements deployment-friendly tracing for Matrix group calls after
gc.enter(): TURN credential / ICE server shape, optional STUN gather probe when no TURN is configured, and optional Matrix JS SDK summary WebRTC stats (privacy-safe aggregates).Also wires Matrix
createClientVoIP options fromNEXT_PUBLIC_MATRIX_WEBRTC_*so infra can force relay, enable public STUN fallback when the HS returns no ICE servers, or bump ICE candidate pooling without code changes.Env vars (optional)
NEXT_PUBLIC_MATRIX_WEBRTC_FORCE_TURNforceTURN— relay-only peer connections (iceTransportPolicy: relay).NEXT_PUBLIC_MATRIX_WEBRTC_FALLBACK_ICE_ALLOWEDNEXT_PUBLIC_MATRIX_WEBRTC_ICE_POOL_SIZEiceCandidatePoolSizefor faster first candidate gather.NEXT_PUBLIC_MATRIX_WEBRTC_GROUP_STATS_MSGroupCallperiodic summary stats and logshypha.group_call.webrtc_summary(dev console).Telemetry events (development console, filter
hypha.group_call)hypha.group_call.turn_probe—checkTurnServers()result, approximate TURN TTL, ICE entry/url counts, STUN/TURN/TURNS flags, short host hints (no URIs/passwords).hypha.group_call.ice_gather_probe— only when no TURN/TURNS and no fallback: quickRTCPeerConnectiongather smoke test (state ortimeout).hypha.group_call.webrtc_summary— when group stats interval > 0: SDK aggregate receive %, jitter, packet loss, peer connection counts vs opponents.Notes
GET /voip/turnServerreturning TURN URIs + credentials; client-side logging helps prove when that path is broken or empty.feat(core): WebRTC diagnostics for Matrix group calls (TURN/ICE telemetry)