Skip to content

Conversation

@arjita-mitra
Copy link
Contributor

@arjita-mitra arjita-mitra commented Aug 28, 2025

BugWPB-19630 [Web] After other user ignores connection request, their name becomes "Name Not Found"

Description

Ticket: WPB-19630
Symptom: After user B ignores a connection request from A, user A later logs out/in and sees an open conversation titled “Name Not Found” instead of the pending request.

Root cause

During the CREATE/early UPDATE path, we upsert a shell conversation whose participating_user_ids is empty. Our mapper then overwrites the existing in-memory conversation (which had participants) with this empty list, effectively erasing membership. The UI then falls back to “Name Not Found”.

Fix

In saveConversation:

When merging into an existing conversation, omit participating_user_ids from the patch if the previous conversation had participants and the incoming payload has none.

Additionally, if we’re creating a brand-new conversation and the incoming payload has an empty participating_user_ids, we drop that field to avoid persisting empty membership from shells.

This preserves membership across shell/early updates while still allowing legitimate membership changes when the incoming payload explicitly includes a non-empty list.

Checklist

  • mentions the JIRA issue in the PR name (Ex. [WPB-XXXX])
  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

@arjita-mitra arjita-mitra requested review from a team and otto-the-bot as code owners August 28, 2025 12:55
@arjita-mitra arjita-mitra changed the title [Web] Preserve participants on shell updates to avoid “Name Not Found” after connection request ignore (WPB-19630) fix: Preserve participants on shell updates to avoid “Name Not Found” after connection request ignore (WPB-19630) Aug 28, 2025
@codecov
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

❌ Patch coverage is 82.35294% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.71%. Comparing base (da3e685) to head (d9a16a7).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #19451      +/-   ##
==========================================
+ Coverage   42.69%   42.71%   +0.02%     
==========================================
  Files        1344     1344              
  Lines       32585    32601      +16     
  Branches     7201     7207       +6     
==========================================
+ Hits        13912    13927      +15     
+ Misses      17005    17004       -1     
- Partials     1668     1670       +2     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

🔗 Download Full Report Artifact

🧪 Playwright Test Summary

  • Passed: 10
  • Failed: 1
  • Skipped: 0
  • 🔁 Flaky: 3
  • 📊 Total: 14
  • Total Runtime: 807.3s (~ 13 min 27 sec)

Failed Tests:

❌ Messages in Groups (tags: TC-8751, crit-flow-web)

Location: specs/CriticalFlow/messagesInGroups-TC-8751.spec.ts:42
Duration: 34962ms

Errors:

TimeoutError: locator.click: Timeout 20000ms exceeded.
Call log:
  - waiting for locator('[data-uie-name="conversation-list-header"] [data-uie-name="go-create-group"]')
    - locator resolved to <button class="css-1pzkaq4" title="Create group" data-uie-name="go-create-group">…</button>
  - attempting click action
    2 × waiting for element to be visible, enabled and stable
      - element is visible, enabled and stable
      - scrolling into view if needed
      - done scrolling
      - <div tabindex="0" role="dialog" aria-modal="true" class=" css-r2fp0z" data-uie-name="modal-template-confirm">…</div> from <div class="css-18o04gs">…</div> subtree intercepts pointer events
    - retrying click action
    - waiting 20ms
    2 × waiting for element to be visible, enabled and stable
      - element is visible, enabled and stable
      - scrolling into view if needed
      - done scrolling
      - <div tabindex="0" role="dialog" aria-modal="true" class=" css-r2fp0z" data-uie-name="modal-template-confirm">…</div> from <div class="css-18o04gs">…</div> subtree intercepts pointer events
    - retrying click action
      - waiting 100ms
    38 × waiting for element to be visible, enabled and stable
       - element is visible, enabled and stable
       - scrolling into view if needed
       - done scrolling
       - <div tabindex="0" role="dialog" aria-modal="true" class=" css-1ocmba1" data-uie-name="modal-template-acknowledge">…</div> from <div class="css-18o04gs">…</div> subtree intercepts pointer events
     - retrying click action
       - waiting 500ms


   at pageManager/webapp/pages/conversationList.page.ts:104

  102 |
  103 |   async clickCreateGroup() {
> 104 |     await this.createGroupButton.click();
      |                                  ^
  105 |   }
  106 |
  107 |   private getConversationLocator(conversationName: string) {
    at ConversationListPage.clickCreateGroup (/home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/pageManager/webapp/pages/conversationList.page.ts:104:34)
    at setupUserA (/home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/messagesInGroups-TC-8751.spec.ts:69:45)
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/messagesInGroups-TC-8751.spec.ts:81:7
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/messagesInGroups-TC-8751.spec.ts:64:5

Flaky Tests:

⚠️ Planning group call with sending various messages during call (tags: TC-8632, crit-flow-web)

Location: specs/CriticalFlow/groupCalls-TC-8632.spec.ts:37

Attempt 1
Result: ❌ Failed
Duration: 25201ms

Errors:

Error: expect(received).toBeTruthy()

Received: false

  106 |
  107 |       await memberCalling.maximizeCell();
> 108 |       expect(await memberCalling.isFullScreenVisible()).toBeTruthy();
      |                                                         ^
  109 |     });
  110 |
  111 |     await test.step('Owner goes full screen', async () => {
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/groupCalls-TC-8632.spec.ts:108:57
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/groupCalls-TC-8632.spec.ts:96:5

Attempt 2
Result: ✅ Passed
Duration: 25778ms

⚠️ Messages in 1:1 (tags: TC-8750, crit-flow-web)

Location: specs/CriticalFlow/messagesIn1On1-TC-8750.spec.ts:47

Attempt 1
Result: ❌ Failed
Duration: 31121ms

Errors:

Error: expect(received).toBeTruthy()

Received: false

  131 |     // Verify that the detail view modal is visible
  132 |     expect(await memberBPM.webapp.modals.detailViewModal().isVisible()).toBeTruthy();
> 133 |     expect(await memberBPM.webapp.modals.detailViewModal().isImageVisible()).toBeTruthy();
      |                                                                              ^
  134 |   });
  135 |   await test.step('User B can download the image', async () => {
  136 |     // Click on the download button to download the image
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/messagesIn1On1-TC-8750.spec.ts:133:78
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/messagesIn1On1-TC-8750.spec.ts:127:3

Attempt 2
Result: ✅ Passed
Duration: 68907ms

⚠️ Messages in Channels (tags: TC-8753, crit-flow-web)

Location: specs/CriticalFlow/messagesInChannels-TC-8753.spec.ts:44

Attempt 1
Result: ❌ Failed
Duration: 24168ms

Errors:

Error: expect(received).toBeTruthy()

Received: false

  118 |       // Verify that the detail view modal is visible
  119 |       expect(await userBModals.detailViewModal().isVisible()).toBeTruthy();
> 120 |       expect(await userBModals.detailViewModal().isImageVisible()).toBeTruthy();
      |                                                                    ^
  121 |     });
  122 |
  123 |     await test.step('User B can download the image', async () => {
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/messagesInChannels-TC-8753.spec.ts:120:68
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/messagesInChannels-TC-8753.spec.ts:114:5

Attempt 2
Result: ✅ Passed
Duration: 66365ms

@arjita-mitra arjita-mitra enabled auto-merge (squash) September 5, 2025 12:05
@arjita-mitra arjita-mitra enabled auto-merge (squash) September 5, 2025 12:29
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 5, 2025

@arjita-mitra arjita-mitra merged commit 15925b5 into dev Sep 5, 2025
12 checks passed
@arjita-mitra arjita-mitra deleted the fix/fix/connect-ignore-name-not-found-WPB-19630 branch September 5, 2025 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants