Skip to content

Show peer display name on video tile and peer list#690

Draft
iamgabrielsoft wants to merge 41 commits intosecurity-union:mainfrom
iamgabrielsoft:fix/peer-tile-display-name
Draft

Show peer display name on video tile and peer list#690
iamgabrielsoft wants to merge 41 commits intosecurity-union:mainfrom
iamgabrielsoft:fix/peer-tile-display-name

Conversation

@iamgabrielsoft
Copy link
Collaborator

This PR fixes the display of peer names in the video call interface, showing actual display names instead of raw session IDs.

Changes Made

VideoCallClient Enhancement

  • Added get_peer_display_name() method that reads peer.display_name from PeerDecodeManager (updated via heartbeat packets)
  • Provides a clean API to access the current display name for any peer

Canvas Generator Updates

  • Updated floating name labels on video tiles (full-bleed, grid, and screen-share layouts) to use get_peer_display_name()
  • Added peer_display_name prop to PeerTileProps so Yew re-renders the tile when the name changes
  • Props change triggers re-render, ensuring UI stays in sync with name updates

Peer List Improvements

  • Pass peer_display_names map to PeerList component
  • Sidebar attendant list now shows real names instead of raw session_id numbers
  • Improves user experience by making it easier to identify participants

Attendants Component Updates

  • Pass peer_display_name per-tile in attendants.rs view() function
  • Ensures each video tile displays the correct current name for that peer

Testing

Testing Performed

  • Verified display names update correctly when changed via heartbeat
  • Confirmed UI re-renders with new names
  • Tested both grid and full-bleed layouts show proper names
  • Sidebar participant list shows real names instead of session IDs
@github-actions
Copy link

👋 Thanks for your contribution!

A maintainer will review your changes shortly.

✅ Automated Checks

CI/CD tests will run automatically. Please ensure all checks pass before requesting review.

🚀 Preview Deployments

Maintainers can test this PR in a live environment using these commands:

  • /build-images — Build Docker images for this PR (~10-15 min)
  • /deploy — Deploy preview environment (~3-5 min)
  • /build-and-deploy — Build images and deploy in one step (~15-20 min)
  • /undeploy — Tear down preview environment

Preview URLs will be posted automatically once deployed.

📚 PR Deployment Documentation

@testradav
Copy link
Collaborator

Can you post a before and after screenshot please?

@testradav
Copy link
Collaborator

/build-and-deploy

@github-actions
Copy link

🚀 Building images and deploying preview...

Started by @testradav

Phase 1: Building Docker images (~10-15 min)

  • Media Server (WebSocket/WebTransport)
  • Meeting API (REST backend)
  • Web UI (WASM frontend)

Phase 2: Deploying preview (~3-5 min)

  • Creating namespace preview-690
  • Deploying services

⏱️ Total time expected: ~15-20 minutes

I'll post updates in this thread as each phase completes.

View workflow run

@github-actions
Copy link

Images built successfully!

📦 Images pushed to GHCR:

  • ghcr.io/security-union/videocall-media-server:pr-690
  • ghcr.io/security-union/videocall-meeting-api:pr-690
  • ghcr.io/security-union/videocall-web-ui:pr-690

🚀 Starting deployment...

View workflow logs

@github-actions
Copy link

All preview slots are in use (3/3)

Cannot deploy preview for PR #690 because all deployment slots are occupied.

Active deployments:

Action required: Comment /undeploy on one of the PRs above to free a slot, then try again.

@github-actions
Copy link

Deployment failed

Check the workflow logs for details.

1 similar comment
@github-actions
Copy link

Deployment failed

Check the workflow logs for details.

@testradav
Copy link
Collaborator

/deploy

@github-actions
Copy link

🚀 Deploying PR preview to available slot...

Started by @testradav

Infrastructure:

  • Assigning deployment slot (1-3 available)
  • Creating namespace & database for the slot
  • Deploying NATS, WebSocket, Meeting API, and UI

⏱️ Deployment typically takes 3-5 minutes, I'll post another comment when it's ready.

View workflow run

@github-actions
Copy link

Deployment failed

Check the workflow logs for details.

@testradav
Copy link
Collaborator

/build-and-deploy

@github-actions
Copy link

🚀 Building images and deploying preview...

Started by @testradav

Phase 1: Building Docker images (~10-15 min)

  • Media Server (WebSocket/WebTransport)
  • Meeting API (REST backend)
  • Web UI (WASM frontend)

Phase 2: Deploying preview (~3-5 min)

  • Creating namespace preview-690
  • Deploying services

⏱️ Total time expected: ~15-20 minutes

I'll post updates in this thread as each phase completes.

View workflow run

@github-actions
Copy link

Images built successfully!

📦 Images pushed to GHCR:

  • ghcr.io/security-union/videocall-media-server:pr-690
  • ghcr.io/security-union/videocall-meeting-api:pr-690
  • ghcr.io/security-union/videocall-web-ui:pr-690

🚀 Starting deployment...

View workflow logs

@github-actions
Copy link

Deployment failed

Check the workflow logs for details.

@iamgabrielsoft
Copy link
Collaborator Author

There's an helm chat issue @testradav

@testradav
Copy link
Collaborator

There's an helm chat issue @testradav

I see that. Thanks. Was trying to see the feature as I thought we already did display the username and the peer list. That's why providing a screenshot with the PR is something useful thanks

@testradav
Copy link
Collaborator

There's an helm chat issue @testradav

I see that. Thanks. Was trying to see the feature as I thought we already did display the username and the peer list. That's why providing a screenshot with the PR is something useful thanks

Never mind. Now I see this is on the tile.

Copy link
Collaborator

@testradav testradav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #690 Review: "Show peer display name on video tile and peer list"

39 files changed, +991/-368 — This PR is doing too much. The stated goal is showing display names instead of session IDs, but it bundles unrelated migrations, models, proto changes, config changes, and formatting tweaks.

Critical / Blocking

  1. Protobuf wire-incompatible breaking change (generated code)
    The regenerated media_packet.rs has renumbered the MediaType enum — MEDIA_TYPE_UNKNOWN (value 0) was removed and all values shifted down (VIDEO is now 0 instead of 1, AUDIO is now 1 instead of 2, etc.). The VideoMetadata.codec field was also
    silently dropped. These changes don't appear in the .proto file diff, meaning the generated Rust code is out of sync with the proto definitions. Any deployed server/client running the old code will misinterpret packets from the new code. This
    alone should block the PR.

  2. Session ID storage key mismatch (bug)
    In yew-ui/src/components/attendants.rs:get_or_create_session_id():
    // Reads with literal key:
    if let Ok(Some(id)) = storage.get_item("session_id") { ... }
    // Writes with constant:
    let _ = storage.set_item(SESSION_ID_KEY, &new_id); // SESSION_ID_KEY = "vc_session_id"
    These are different keys. The session ID will never be found on subsequent loads, generating a new one every time — defeating the purpose of a stable session ID.

  3. get_peer_email now returns session_id instead of email
    video_call_client.rs:559 — The function still called get_peer_email was changed to return peer.session_id instead of peer.email (which was renamed to display_name). This breaks the users_allowed_to_stream() allowlist check in
    canvas_generator.rs, which compares against email addresses.

  4. Host detection broken after name change
    canvas_generator.rs now compares host_display_name (set at join time from the email/username) against peer_display_name (mutable, updated via heartbeat). After a user renames themselves, these won't match and the host crown icon disappears.

Should Not Be In This PR

  1. Unrelated database migrations — Three new migration files (20251221011540, 20251221011853, 20251221012015) adding meeting_protection_fields, meeting_owners table, and waiting_room_queue table. These are for a completely different feature.

  2. meeting_owner.rs model — A full new model with raw SQL queries for meeting ownership, unrelated to display names.

  3. DEFAULT_SALT constant — bcrypt salt added to actix-api/src/constants.rs, not used by this PR.

  4. Rename-bug-fix.md — Personal brainstorming/design doc committed to repo root. Should not be checked in.

  5. webTransportEnabled changed to false in yew-ui/scripts/config.js — Local dev config change that would affect all developers.

  6. Migration CASCADE added — 20260203000003 changed DROP CONSTRAINT to use CASCADE, which can silently drop dependent foreign keys and views. This is a separate concern that needs explicit review.

Bugs / Code Quality

  1. Dioxus-ui gets no benefit — New fields are set to empty strings with no callback:
    session_id: String::new(),
    display_name: String::new(),
    on_peer_display_name_changed: None,

  2. Peer.email field left as comment — // pub email: String, should be fully removed, not commented out.

  3. Unused code added — PeerStatus::NameChanged variant is never constructed. is_meeting_metadata_packet in ws_chat_session.rs is #[allow(dead_code)]. session_id and display_name fields added to MediaPacket proto (fields 10, 11) but never
    populated on the send path.

  4. Debug-level logging at info level — host.rs has log::info!(">>> SaveChangeName triggered...") style debug breadcrumbs that should be removed or downgraded.

  5. Format-only changes scattered throughout — Many files have format!("{}", x) → format!("{x}") changes that inflate the diff and should be a separate PR.

Recommendation

Do not merge as-is. This needs to be split into smaller PRs:

  1. Proto changes + regeneration (done correctly, without renumbering existing enum values)
  2. Display name feature (client + yew-ui + dioxus-ui)
  3. Database migrations for meeting ownership (separate feature)
  4. Formatting cleanup (separate trivial PR)

The session ID key bug and get_peer_email semantic change need to be fixed before the display name feature can work correctly.

-- migrate:up

ALTER TABLE meetings
ADD COLUMN meeting_title VARCHAR(255) NULL,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need DB changes to show peer display name on video tile and peer list @iamgabrielsoft ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR came from the bug-fix-user-rename branch, that why its seems like I touched it. The pull was from the bug-rename branch. I'll put this PR on draft mode until the bug-rename is merged

@iamgabrielsoft iamgabrielsoft self-assigned this Mar 4, 2026
@iamgabrielsoft iamgabrielsoft marked this pull request as draft March 4, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants