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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@
"showdown": "^1.9.1",
"simplebar-react": "^2.4.3",
"smartlook-client": "^8.0.0",
"socket.io-client": "^4.5.4",
"sql-formatter": "12.2.0",
"styled-components": "^5.3.6",
"tailwindcss": "^3.3.3",
Expand Down
78 changes: 0 additions & 78 deletions app/client/src/actions/appCollabActions.ts

This file was deleted.

8 changes: 0 additions & 8 deletions app/client/src/actions/pageVisibilityActions.ts

This file was deleted.

44 changes: 0 additions & 44 deletions app/client/src/actions/websocketActions.ts

This file was deleted.

24 changes: 0 additions & 24 deletions app/client/src/ce/constants/ReduxActionConstants.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
import type { ERROR_CODES } from "ee/constants/ApiConstants";
import type { AffectedJSObjects } from "sagas/EvaluationsSagaUtils";

const WebsocketActions = {
WEBSOCKET_APP_LEVEL_WRITE_CHANNEL: "WEBSOCKET_APP_LEVEL_WRITE_CHANNEL",
WEBSOCKET_PAGE_LEVEL_WRITE_CHANNEL: "WEBSOCKET_PAGE_LEVEL_WRITE_CHANNEL",
INIT_APP_LEVEL_SOCKET_CONNECTION: "INIT_APP_LEVEL_SOCKET_CONNECTION",
INIT_PAGE_LEVEL_SOCKET_CONNECTION: "INIT_PAGE_LEVEL_SOCKET_CONNECTION",
SET_IS_APP_LEVEL_WEBSOCKET_CONNECTED: "SET_IS_APP_LEVEL_WEBSOCKET_CONNECTED",
SET_IS_PAGE_LEVEL_WEBSOCKET_CONNECTED:
"SET_IS_PAGE_LEVEL_WEBSOCKET_CONNECTED",
};

const ActionSelectorReduxActionTypes = {
EVALUATE_ACTION_SELECTOR_FIELD: "EVALUATE_ACTION_SELECTOR_FIELD",
SET_EVALUATED_ACTION_SELECTOR_FIELD: "SET_EVALUATED_ACTION_SELECTOR_FIELD",
Expand Down Expand Up @@ -307,18 +297,6 @@ const EvaluationActionErrorTypes = {
FAILED_CORRECTING_BINDING_PATHS: "FAILED_CORRECTING_BINDING_PATHS",
};

const AppCollabActionTypes = {
APP_COLLAB_SET_CONCURRENT_PAGE_EDITORS:
"APP_COLLAB_SET_CONCURRENT_PAGE_EDITORS",
APP_COLLAB_LIST_EDITORS: "APP_COLLAB_LIST_EDITORS",
APP_COLLAB_RESET_EDITORS: "APP_COLLAB_RESET_EDITORS",
APP_COLLAB_SET_EDITORS_POINTER_DATA: "APP_COLLAB_SET_EDITORS_POINTER_DATA",
APP_COLLAB_UNSET_EDITORS_POINTER_DATA:
"APP_COLLAB_UNSET_EDITORS_POINTER_DATA",
APP_COLLAB_RESET_EDITORS_POINTER_DATA:
"APP_COLLAB_RESET_EDITORS_POINTER_DATA",
};

const OmniSearchActionTypes = {
SET_SEARCH_FILTER_CONTEXT: "SET_SEARCH_FILTER_CONTEXT",
SET_GLOBAL_SEARCH_QUERY: "SET_GLOBAL_SEARCH_QUERY",
Expand Down Expand Up @@ -1280,7 +1258,6 @@ export const ReduxActionTypes = {
...AdminSettingsActionTypes,
...AnalyticsActionTypes,
...AIActionTypes,
...AppCollabActionTypes,
...ApplicationActionTypes,
...AppThemeActionsTypes,
...AppViewActionTypes,
Expand Down Expand Up @@ -1316,7 +1293,6 @@ export const ReduxActionTypes = {
...ThemeActionTypes,
...UserAuthActionTypes,
...UserProfileActionTypes,
...WebsocketActions,
...WidgetCanvasActionTypes,
...WidgetOperationsActionTypes,
...WorkspaceActionTypes,
Expand Down
4 changes: 0 additions & 4 deletions app/client/src/ce/reducers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import type { GlobalSearchReduxState } from "reducers/uiReducers/globalSearchRed
import type { ActionSelectorReduxState } from "reducers/uiReducers/actionSelectorReducer";
import type { ReleasesState } from "reducers/uiReducers/releasesReducer";
import type { LoadingEntitiesState } from "reducers/evaluationReducers/loadingEntitiesReducer";
import type { WebsocketReducerState } from "reducers/uiReducers/websocketReducer";
import type { DebuggerReduxState } from "reducers/uiReducers/debuggerReducer";
import type { TourReducerState } from "reducers/uiReducers/tourReducer";
import type { TableFilterPaneReduxState } from "reducers/uiReducers/tableFilterPaneReducer";
Expand All @@ -45,7 +44,6 @@ import type { JSCollectionDataState } from "ee/reducers/entityReducers/jsActions
import type { CanvasSelectionState } from "reducers/uiReducers/canvasSelectionReducer";
import type { JSObjectNameReduxState } from "reducers/uiReducers/jsObjectNameReducer";
import type { GitSyncReducerState } from "reducers/uiReducers/gitSyncReducer";
import type { AppCollabReducerState } from "reducers/uiReducers/appCollabReducer";
import type { CrudInfoModalReduxState } from "reducers/uiReducers/crudInfoModalReducer";
import type { FormEvaluationState } from "reducers/evaluationReducers/formEvaluationReducer";
import type { widgetReflow } from "reducers/uiReducers/reflowReducer";
Expand Down Expand Up @@ -121,14 +119,12 @@ export interface AppState {
onBoarding: OnboardingState;
globalSearch: GlobalSearchReduxState;
releases: ReleasesState;
websocket: WebsocketReducerState;
debugger: DebuggerReduxState;
tour: TourReducerState;
jsPane: JsPaneReduxState;
canvasSelection: CanvasSelectionState;
jsObjectName: JSObjectNameReduxState;
gitSync: GitSyncReducerState;
appCollab: AppCollabReducerState;
crudInfoModal: CrudInfoModalReduxState;
widgetReflow: widgetReflow;
appTheming: AppThemingState;
Expand Down
4 changes: 0 additions & 4 deletions app/client/src/ce/reducers/uiReducers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ import onBoardingReducer from "reducers/uiReducers/onBoardingReducer";
import globalSearchReducer from "reducers/uiReducers/globalSearchReducer";
import actionSelectorReducer from "reducers/uiReducers/actionSelectorReducer";
import releasesReducer from "reducers/uiReducers/releasesReducer";
import websocketReducer from "reducers/uiReducers/websocketReducer";
import debuggerReducer from "reducers/uiReducers/debuggerReducer";
import tourReducer from "reducers/uiReducers/tourReducer";
import tableFilterPaneReducer from "reducers/uiReducers/tableFilterPaneReducer";
import jsPaneReducer from "reducers/uiReducers/jsPaneReducer";
import appCollabReducer from "reducers/uiReducers/appCollabReducer";
import canvasSelectionReducer from "reducers/uiReducers/canvasSelectionReducer";
import gitSyncReducer from "reducers/uiReducers/gitSyncReducer";
import crudInfoModalReducer from "reducers/uiReducers/crudInfoModalReducer";
Expand Down Expand Up @@ -78,14 +76,12 @@ export const uiReducerObject = {
onBoarding: onBoardingReducer,
globalSearch: globalSearchReducer,
releases: releasesReducer,
websocket: websocketReducer,
debugger: debuggerReducer,
tour: tourReducer,
jsPane: jsPaneReducer,
jsObjectName: jsObjectNameReducer,
canvasSelection: canvasSelectionReducer,
gitSync: gitSyncReducer,
appCollab: appCollabReducer,
crudInfoModal: crudInfoModalReducer,
widgetReflow: widgetReflowReducer,
appTheming: appThemingReducer,
Expand Down
10 changes: 0 additions & 10 deletions app/client/src/ce/sagas/ApplicationSagas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ import {
deleteRecentAppEntities,
getEnableStartSignposting,
} from "utils/storage";
import {
reconnectAppLevelWebsocket,
reconnectPageLevelWebsocket,
} from "actions/websocketActions";
import { getFetchedWorkspaces } from "ee/selectors/workspaceSelectors";

import { fetchPluginFormConfigs, fetchPlugins } from "actions/pluginActions";
Expand Down Expand Up @@ -648,12 +644,6 @@ export function* createApplicationSaga(
basePageId: defaultPage?.baseId,
}),
);

// subscribe to newly created application
// users join rooms on connection, so reconnecting
// ensures user receives the updates in the app just created
yield put(reconnectAppLevelWebsocket());
yield put(reconnectPageLevelWebsocket());
}
}
} catch (error) {
Expand Down
4 changes: 0 additions & 4 deletions app/client/src/ce/sagas/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import LintingSaga from "sagas/LintingSagas";
import modalSagas from "sagas/ModalSagas";
import onboardingSagas from "sagas/OnboardingSagas";
import pageSagas from "ee/sagas/PageSagas";
import PageVisibilitySaga from "sagas/PageVisibilitySagas";
import pluginSagas from "sagas/PluginSagas";
import queryPaneSagas from "sagas/QueryPaneSagas";
import replaySaga from "sagas/ReplaySaga";
Expand All @@ -42,7 +41,6 @@ import snapshotSagas from "sagas/SnapshotSagas";
import snipingModeSagas from "sagas/SnipingModeSagas";
import templateSagas from "sagas/TemplatesSagas";
import themeSagas from "sagas/ThemeSaga";
import websocketSagas from "sagas/WebsocketSagas/WebsocketSagas";
import actionExecutionChangeListeners from "sagas/WidgetLoadingSaga";
import widgetOperationSagas from "sagas/WidgetOperationSagas";
import oneClickBindingSaga from "sagas/OneClickBindingSaga";
Expand Down Expand Up @@ -83,7 +81,6 @@ export const sagas = [
actionExecutionChangeListeners,
formEvaluationChangeListener,
globalSearchSagas,
websocketSagas,
debuggerSagas,
saaSPaneSagas,
selectionCanvasSagas,
Expand All @@ -94,7 +91,6 @@ export const sagas = [
appThemingSaga,
NavigationSagas,
editorContextSagas,
PageVisibilitySaga,
AutoHeightSagas,
tenantSagas,
JSLibrarySaga,
Expand Down
7 changes: 0 additions & 7 deletions app/client/src/ce/sagas/userSagas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ import {
getCurrentUser,
getFeatureFlagsFetched,
} from "selectors/usersSelectors";
import {
initAppLevelSocketConnection,
initPageLevelSocketConnection,
} from "actions/websocketActions";
import {
getEnableStartSignposting,
getFirstTimeUserOnboardingApplicationIds,
Expand Down Expand Up @@ -181,9 +177,6 @@ export function* runUserSideEffectsSaga() {
);
}

yield put(initAppLevelSocketConnection());
yield put(initPageLevelSocketConnection());

if (currentUser.emptyInstance) {
history.replace(SETUP);
}
Expand Down
22 changes: 0 additions & 22 deletions app/client/src/constants/WebsocketConstants.tsx

This file was deleted.

1 change: 0 additions & 1 deletion app/client/src/constants/WidgetValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ export const DEDICATED_WORKER_GLOBAL_SCOPE_IDENTIFIERS = {
webkitRequestFileSystemSync: "webkitRequestFileSystemSync",
webkitResolveLocalFileSystemSyncURL: "webkitResolveLocalFileSystemSyncURL",
webkitResolveLocalFileSystemURL: "webkitResolveLocalFileSystemURL",
WebSocket: "WebSocket",
WebTransport: "WebTransport",
WebTransportBidirectionalStream: "WebTransportBidirectionalStream",
WebTransportDatagramDuplexStream: "WebTransportDatagramDuplexStream",
Expand Down
Loading
Loading