Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove socket-io and websocket connections #37784

Merged
merged 2 commits into from
Nov 28, 2024
Merged

Conversation

sharat87
Copy link
Member

@sharat87 sharat87 commented Nov 27, 2024

We don't use the websocket connection for anything of consequence. This PR removes it and the socket-io dependency from the client.

The RTS still has it, will be removed in a subsequent PR.

Automation

/test sanity

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12062399334
Commit: 4f018b1
Cypress dashboard.
Tags: @tag.Sanity
Spec:


Thu, 28 Nov 2024 04:55:02 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

Release Notes

  • New Features

    • None
  • Bug Fixes

    • None
  • Refactor

    • Removed websocket and collaborative editing functionality, simplifying the application architecture.
    • Eliminated related constants, actions, reducers, and sagas to streamline codebase.
  • Chores

    • Updated test configurations by removing references to websocket sagas.

Copy link
Contributor

coderabbitai bot commented Nov 27, 2024

Walkthrough

The pull request involves the removal of various WebSocket-related functionalities from the appsmith project. Key changes include the deletion of multiple files associated with collaborative editing, WebSocket actions, and sagas. Additionally, the package.json file has been updated to remove the socket.io-client dependency. This indicates a significant shift in the project's architecture regarding real-time communication and collaborative features.

Changes

File Path Change Summary
app/client/package.json Removed dependency: "socket.io-client": "^4.5.4"
app/client/src/actions/appCollabActions.ts Deleted file containing collaborative editing and pointer sharing functions and Redux actions.
app/client/src/actions/pageVisibilityActions.ts Deleted file responsible for handling page visibility events.
app/client/src/actions/websocketActions.ts Deleted file with functions for managing WebSocket connections and events.
app/client/src/ce/constants/ReduxActionConstants.tsx Removed WebsocketActions and AppCollabActionTypes constants.
app/client/src/ce/reducers/index.tsx Removed type imports and properties related to WebSocket and collaboration from AppState.
app/client/src/ce/reducers/uiReducers/index.tsx Removed websocketReducer and appCollabReducer from imports and uiReducerObject.
app/client/src/ce/sagas/ApplicationSagas.tsx Removed websocket reconnection logic from createApplicationSaga.
app/client/src/ce/sagas/index.tsx Removed PageVisibilitySaga and websocketSagas from the sagas array.
app/client/src/ce/sagas/userSagas.tsx Removed calls to initialize socket connections from runUserSideEffectsSaga.
app/client/src/constants/WebsocketConstants.tsx Deleted file containing WebSocket-related constants and functions.
app/client/src/constants/WidgetValidation.ts Removed WebSocket entry from JAVASCRIPT_KEYWORDS.
app/client/src/reducers/uiReducers/appCollabReducer.ts Deleted file containing the appCollabReducer.
app/client/src/reducers/uiReducers/websocketReducer.ts Deleted file containing the websocketReducer.
app/client/src/sagas/PageVisibilitySagas.ts Deleted file responsible for tracking page visibility.
app/client/src/sagas/WebsocketSagas/WebsocketSagas.ts Deleted file managing application and page-level WebSocket connections.
app/client/src/sagas/WebsocketSagas/handleAppLevelSocketEvents.tsx Deleted function handling app-level socket events.
app/client/src/sagas/WebsocketSagas/handlePageLevelSocketEvents.ts Deleted function handling page-level socket events.
app/client/src/sagas/WebsocketSagas/socketEvents.ts Deleted file defining socket connection event constants.
app/client/test/sagas.ts Removed import and references to websocketSagas from test configuration.

Possibly related PRs

Suggested reviewers

  • ApekshaBhosale
  • ayushpahwa
  • mohanarpit
  • pratapaprasanna

🎉 In the code's dance, we bid farewell,
To websockets and collab, we wish them well.
With cleaner paths and simpler ways,
The app moves forward, brightening days!
So raise a cheer for the code we mend,
In the world of software, this is not the end! 🎊


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between c190024 and 4f018b1.

⛔ Files ignored due to path filters (1)
  • app/client/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (20)
  • app/client/package.json (0 hunks)
  • app/client/src/actions/appCollabActions.ts (0 hunks)
  • app/client/src/actions/pageVisibilityActions.ts (0 hunks)
  • app/client/src/actions/websocketActions.ts (0 hunks)
  • app/client/src/ce/constants/ReduxActionConstants.tsx (0 hunks)
  • app/client/src/ce/reducers/index.tsx (0 hunks)
  • app/client/src/ce/reducers/uiReducers/index.tsx (0 hunks)
  • app/client/src/ce/sagas/ApplicationSagas.tsx (0 hunks)
  • app/client/src/ce/sagas/index.tsx (0 hunks)
  • app/client/src/ce/sagas/userSagas.tsx (0 hunks)
  • app/client/src/constants/WebsocketConstants.tsx (0 hunks)
  • app/client/src/constants/WidgetValidation.ts (0 hunks)
  • app/client/src/reducers/uiReducers/appCollabReducer.ts (0 hunks)
  • app/client/src/reducers/uiReducers/websocketReducer.ts (0 hunks)
  • app/client/src/sagas/PageVisibilitySagas.ts (0 hunks)
  • app/client/src/sagas/WebsocketSagas/WebsocketSagas.ts (0 hunks)
  • app/client/src/sagas/WebsocketSagas/handleAppLevelSocketEvents.tsx (0 hunks)
  • app/client/src/sagas/WebsocketSagas/handlePageLevelSocketEvents.ts (0 hunks)
  • app/client/src/sagas/WebsocketSagas/socketEvents.ts (0 hunks)
  • app/client/test/sagas.ts (0 hunks)
💤 Files with no reviewable changes (20)
  • app/client/package.json
  • app/client/src/actions/appCollabActions.ts
  • app/client/src/actions/pageVisibilityActions.ts
  • app/client/src/actions/websocketActions.ts
  • app/client/src/ce/constants/ReduxActionConstants.tsx
  • app/client/src/ce/reducers/index.tsx
  • app/client/src/ce/reducers/uiReducers/index.tsx
  • app/client/src/ce/sagas/ApplicationSagas.tsx
  • app/client/src/ce/sagas/index.tsx
  • app/client/src/ce/sagas/userSagas.tsx
  • app/client/src/constants/WebsocketConstants.tsx
  • app/client/src/constants/WidgetValidation.ts
  • app/client/src/reducers/uiReducers/appCollabReducer.ts
  • app/client/src/reducers/uiReducers/websocketReducer.ts
  • app/client/src/sagas/PageVisibilitySagas.ts
  • app/client/src/sagas/WebsocketSagas/WebsocketSagas.ts
  • app/client/src/sagas/WebsocketSagas/handleAppLevelSocketEvents.tsx
  • app/client/src/sagas/WebsocketSagas/handlePageLevelSocketEvents.ts
  • app/client/src/sagas/WebsocketSagas/socketEvents.ts
  • app/client/test/sagas.ts

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Nov 27, 2024
@sharat87 sharat87 added the ok-to-test Required label for CI label Nov 27, 2024
@sharat87 sharat87 marked this pull request as ready for review November 28, 2024 04:13
@sharat87 sharat87 merged commit a1c8cb6 into release Nov 28, 2024
45 checks passed
@sharat87 sharat87 deleted the chore/no-sockets branch November 28, 2024 05:28
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Dec 2, 2024
We don't use the websocket connection for anything of consequence. This
PR removes it and the `socket-io` dependency from the client.

The RTS still has it, will be removed in a subsequent PR.

## Automation

/test sanity

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/12062399334>
> Commit: 4f018b1
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12062399334&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Thu, 28 Nov 2024 04:55:02 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

- **New Features**
	- None

- **Bug Fixes**
	- None

- **Refactor**
- Removed websocket and collaborative editing functionality, simplifying
the application architecture.
- Eliminated related constants, actions, reducers, and sagas to
streamline codebase.

- **Chores**
- Updated test configurations by removing references to websocket sagas.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants