Skip to content

[MM-70234] Calls v2: Revert call_ended event name back to call_end - #1280

Open
bgardner8008 wants to merge 1 commit into
v2from
MM-70234-revert-call-ended-event
Open

[MM-70234] Calls v2: Revert call_ended event name back to call_end#1280
bgardner8008 wants to merge 1 commit into
v2from
MM-70234-revert-call-ended-event

Conversation

@bgardner8008

Copy link
Copy Markdown
Contributor

Summary

  • Reverts wsEventCallEnd = "call_ended" back to "call_end" in server/websocket.go
  • Updates the custom_<pluginId>_call_ended handler registration in webapp/src/index.tsx and standalone/src/index.ts to call_end
  • Renames the internal Redux constant CALL_ENDEDCALL_END and its wire value in webapp/src/state/session/action_types.ts, propagated to all consumers (reducers.ts, session/reducer.ts, session/actions.ts, screen_sharing_ids/reducer.ts)
  • Updates three test comments in server/websocket_test.go

The rename from call_end to call_ended that landed in PR #1199 was a gratuitous wire-protocol break. Mobile subscribes to call_end today (app/constants/websocket.ts: CALLS_CALL_END) and has to support both v1 and v2 servers — keeping call_ended would force two handlers for one event indefinitely. It was also the only renamed event; every other wsEvent* constant is byte-identical between main and v2. Reverting now while v2 is unreleased is cheap; the cost only goes up after release.

Test plan

  • grep for call_ended / CALL_ENDED in .go/.ts/.tsx returns nothing
  • End a call (host-end and natural last-participant-leave paths) — call tears down in webapp and standalone
  • Existing websocket_test.go tests pass (go test ./server/... -run TestWebSocket)

The rename from call_end to call_ended in PR #1199 was a gratuitous wire-protocol break. Mobile must support both v1 and v2 servers and already subscribes to call_end; call_ended was the only renamed event — every other event name is byte-identical between v1 and v2. Reverts the wire string and renames the internal CALL_ENDED Redux constant back to CALL_END for consistency.
@bgardner8008

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eadc3bf9-ed9a-4345-9dcd-c5d7f47acb4e

📥 Commits

Reviewing files that changed from the base of the PR and between 8add3b0 and d2781ec.

📒 Files selected for processing (9)
  • server/websocket.go
  • server/websocket_test.go
  • standalone/src/index.ts
  • webapp/src/index.tsx
  • webapp/src/reducers.ts
  • webapp/src/state/screen_sharing_ids/reducer.ts
  • webapp/src/state/session/action_types.ts
  • webapp/src/state/session/actions.ts
  • webapp/src/state/session/reducer.ts

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

The call termination event changed from call_ended to call_end across the server WebSocket broadcast, client WebSocket listeners, session action, and state reducers.

Changes

Call-end event rename

Layer / File(s) Summary
Server event contract
server/websocket.go, server/websocket_test.go
The server event value and related test comments now use call_end.
Client action handling
webapp/src/state/session/action_types.ts, webapp/src/state/session/actions.ts, webapp/src/state/session/reducer.ts, webapp/src/reducers.ts, webapp/src/state/screen_sharing_ids/reducer.ts
The session action changed from CALL_ENDED to CALL_END. All affected reducers handle the renamed action.
Client WebSocket wiring
standalone/src/index.ts, webapp/src/index.tsx
Both client entry points listen for custom_${pluginId}_call_end and dispatch handleCallEnd.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to d2781

This PR restores the call-end event name and updates its consumers consistently; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Calls v2 event rename and its reversion from "call_ended" to "call_end".
Description check ✅ Passed The description directly explains the event rename, affected files, compatibility rationale, and test plan.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch MM-70234-revert-call-ended-event

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (v2@8add3b0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
webapp/src/index.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##             v2    #1280   +/-   ##
=====================================
  Coverage      ?   31.55%           
=====================================
  Files         ?      250           
  Lines         ?    13933           
  Branches      ?     1764           
=====================================
  Hits          ?     4396           
  Misses        ?     9047           
  Partials      ?      490           
Files with missing lines Coverage Δ
server/websocket.go 29.00% <ø> (ø)
webapp/src/reducers.ts 28.86% <ø> (ø)
webapp/src/state/screen_sharing_ids/reducer.ts 12.00% <ø> (ø)
webapp/src/state/session/action_types.ts 100.00% <100.00%> (ø)
webapp/src/state/session/actions.ts 80.00% <ø> (ø)
webapp/src/state/session/reducer.ts 5.00% <ø> (ø)
webapp/src/index.tsx 0.00% <0.00%> (ø)
🚀 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.

@bgardner8008

Copy link
Copy Markdown
Contributor Author

@M-ZubairAhmed E2E test failure is just flakey stuff not related to this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants