Skip to content

[Bugfix:Forum] Fix Clear Messages Socket#12072

Merged
bmcutler merged 7 commits intomainfrom
live-chat-cypress-fix
Oct 10, 2025
Merged

[Bugfix:Forum] Fix Clear Messages Socket#12072
bmcutler merged 7 commits intomainfrom
live-chat-cypress-fix

Conversation

@JManion32
Copy link
Contributor

@JManion32 JManion32 commented Sep 19, 2025

Why is this Change Important & Necessary?

The live chat clearing test module of live_chat.spec.js is failing on CI. This failure was introduced in commit b66259f of #12008 when I merged main into it. There were other live lecture chat features (namely #11863) introduced in this merge, however, I could not locate a failing test for the clear socket on any of them. NOTE: The clear feature worked as expected up until that commit.

What is the New Behavior?

N / A. I assume the change has to come from ChatroomController.php. It is not the Cypress test that is broken, but rather the websocket for live chat clearing.

How to Test

Delete all of the tests in live_chat_spec.js except for the bottom so you don't have to wait 5 minutes for it to pass.

Other information

This is not a breaking change. This PR is currently marked as a draft since I have been unable to come up with a fix. The current diff was from when I thought the issue was timing before discovering it was unrelated to Cypress.

Error on 10/03/2025 11:30:00
image
Looks promising, will continue to investigate.

Found another PR that touches live chat sockets:
#11634 (Add Verification of WebSocket Pages) - a lot of types were changed. Seems like a small bug was introduced that broke websockets for in #12008 (Clear Button for Live Chat) - still investigating, but narrowing it down.

Passed locally.
@codecov
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.68%. Comparing base (b4fa1ef) to head (d71cf93).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12072   +/-   ##
=========================================
  Coverage     21.68%   21.68%           
  Complexity     9591     9591           
=========================================
  Files           268      268           
  Lines         36618    36614    -4     
  Branches        475      475           
=========================================
  Hits           7940     7940           
+ Misses        28207    28203    -4     
  Partials        471      471           
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.07% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.69% <0.00%> (+<0.01%) ⬆️
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 90.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 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.

@JManion32 JManion32 changed the title [Bugfix: Developer] Fix Failing Live Chat Test [Bugfix:Developer] Fix Failing Live Chat Test Sep 19, 2025
@JManion32 JManion32 marked this pull request as draft September 20, 2025 01:06
@automateprojectmangement automateprojectmangement bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Sep 20, 2025
@JManion32 JManion32 closed this Sep 24, 2025
@JManion32 JManion32 reopened this Sep 25, 2025
@IDzyre
Copy link
Member

IDzyre commented Sep 26, 2025

I looked into this test when fixing the sidebar tests, and I came to the same conclusion that it is the websocket for clearing while on the page that is problematic. If you refresh the page the messages are gone, but that doesn't help when you want to clear it with websockets and clear it live.

@JManion32 JManion32 changed the title [Bugfix:Developer] Fix Failing Live Chat Test [Bugfix:Forum] Fix Clear Messages Socket Oct 3, 2025
@lavalleeale
Copy link
Contributor

@JManion32 I believe I just pushed a change to this branch that should fix the test

@JManion32 JManion32 marked this pull request as ready for review October 7, 2025 21:09
@JManion32
Copy link
Contributor Author

It works! Thank you @lavalleeale, please approve on my behalf.

Copy link
Member

@bmcutler bmcutler left a comment

Choose a reason for hiding this comment

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

on justin's behalf

@bmcutler bmcutler merged commit 88bca84 into main Oct 10, 2025
24 of 28 checks passed
@bmcutler bmcutler deleted the live-chat-cypress-fix branch October 10, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants