Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Made changes to support datasources configuration page for workspace#41324

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
tomjose92 wants to merge14 commits intorelease
base:release
Choose a base branch
Loading
fromfeat/issue-35669/workspace-datasources
Open
Show file tree
Hide file tree
Changes from6 commits
Commits
Show all changes
14 commits
Select commitHold shift + click to select a range
228474d
Made changes to support datasources configuration page for workspaces…
tomjose92Oct 27, 2025
ad664c8
Fixed build error.
tomjose92Oct 27, 2025
e4c0ba2
Made fix to support /datasource/NEW. Also fixed the datasource url fo…
tomjose92Oct 27, 2025
5aa777b
Moved workspace datasource routes to constant values and using it in …
tomjose92Oct 28, 2025
1a30e1b
Added empty div inside IDERight styled component.
tomjose92Oct 29, 2025
3f3d190
On clicking the workspace name from Editor or Workspace Datasources p…
tomjose92Oct 29, 2025
9698179
Removed number of queries from under the Datasource name.
tomjose92Nov 10, 2025
ca19f3f
Modified hasCreateDSActionPermissionInApp to check if IDE Type is a w…
tomjose92Nov 11, 2025
aacb669
Updated the workspaceIDE to use takeLatest in the ee file. Moved work…
tomjose92Nov 11, 2025
547f3f7
Reusing the CreateNewDatasourceTab component directly in WorkspaceDat…
tomjose92Nov 11, 2025
7582821
Updated workspace page index to use render for WorkspaceDatasourcesPa…
tomjose92Nov 20, 2025
385b5e0
Showing DatasourceBlankState when there are no datasources available.…
tomjose92Nov 29, 2025
af290de
Removed commenting out of other test cases. Fixed lint issues.
tomjose92Nov 29, 2025
9caf3ed
Fixed linting and prettier issues for WorkspaceDatasourceSettings_spe…
tomjose92Nov 29, 2025
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: 1 addition & 0 deletionsapp/client/src/ce/IDE/Interfaces/IDETypes.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,6 +2,7 @@ export const IDE_TYPE = {
None: "None",
App: "App",
UIPackage: "UIPackage",
Workspace: "Workspace",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue |🔴 Critical

🧩 Analysis chain

LGTM — new IDE type addition is consistent.
No concerns here. Please ensure downstream switch/route maps cover IDE_TYPE.Workspace.

Run to spot any missing cases:


🏁 Script executed:

#!/bin/bashrg -nP --type=ts'\bIDE_TYPE\.Workspace\b|:\s*IDEType\b' -C2

Length of output: 8283


---🏁 Script executed:```shell#!/bin/bash# Find switch statements handling IDE_TYPErg -nP --type=ts 'switch\s*\(\s*(type|ideType|.*IDE_TYPE)' -A 15 | head -100

Length of output: 8750


🏁 Script executed:

#!/bin/bash# Find other enum-like mappings that use IDE_TYPE keysrg -nP --type=ts'\[IDE_TYPE\.' -C 1| head -150

Length of output: 498


🏁 Script executed:

#!/bin/bash# Check if there are any references to IDE_TYPE.Workspace that might be missingrg -nP --type=ts'IDE_TYPE\.Workspace' -C 3

Length of output: 386


🏁 Script executed:

#!/bin/bash# Get full getIDEFocusStrategy function to check if Workspace case is handledcat app/client/src/ce/navigation/FocusStrategy/index.ts

Length of output: 528


🏁 Script executed:

#!/bin/bash# Search for getIDETypeByUrl to see if it handles Workspacecat app/client/src/ce/entities/IDE/utils/getIDETypeByUrl.ts

Length of output: 434


🏁 Script executed:

#!/bin/bash# Search for EE FocusStrategy implementationsfd -t f'FocusStrategy' -path'*/ee/*'

Length of output: 168


🏁 Script executed:

#!/bin/bash# Check if UIPackageFocusStrategy or WorkspaceFocusStrategy existsrg -nP --type=ts'UIPackageFocusStrategy|WorkspaceFocusStrategy' -l

Length of output: 0


🏁 Script executed:

#!/bin/bash# Find AppIDEFocusStrategy to understand implementation patternrg -nP --type=ts'class AppIDEFocusStrategy|export.*AppIDEFocusStrategy' -C 3

Length of output: 784


🏁 Script executed:

#!/bin/bash# Search more broadly for strategy files in EE folderfind. -path"*/ee/*" -name"*FocusStrategy*"2>/dev/null| head -20

Length of output: 179


🏁 Script executed:

#!/bin/bash# Check if there's an EE version of the focus strategy indexfind. -path"*/ee/*" -name"index.ts"| xargs grep -l"getIDEFocusStrategy\|FocusStrategy"2>/dev/null| head -10

Length of output: 53


🏁 Script executed:

#!/bin/bash# Check the EE version of getIDEFocusStrategycat app/client/src/ee/navigation/FocusStrategy/index.ts

Length of output: 44


🏁 Script executed:

#!/bin/bash# Check if getIDEFocusStrategy is called with Workspace anywhererg -nP --type=ts'getIDEFocusStrategy' -C 3

Length of output: 2489


Add case for IDE_TYPE.Workspace in getIDEFocusStrategy or update default handler.

The switch statement inapp/client/src/ce/navigation/FocusStrategy/index.ts only handlesIDE_TYPE.None andIDE_TYPE.App, butIDE_TYPE.Workspace is now inIDEBasePaths. SinceFocusRetentionSaga callsgetIDEFocusStrategy(ideType) whereideType comes fromgetIDETypeByUrl(), this will throw an error if Workspace paths are configured.

Currently,IDE_TYPE.Workspace has an empty path array, so it won't trigger at runtime yet—but this is a latent bug waiting to happen.

🤖 Prompt for AI Agents
In app/client/src/ce/IDE/Interfaces/IDETypes.ts around line 5,IDE_TYPE.Workspace was added but getIDEFocusStrategy (inapp/client/src/ce/navigation/FocusStrategy/index.ts) only handles IDE_TYPE.Noneand IDE_TYPE.App; add a case for IDE_TYPE.Workspace to the switch ingetIDEFocusStrategy (or update the switch default to handle unknown/added IDEtypes safely) so FocusRetentionSaga won't throw when getIDETypeByUrl() returnsWorkspace; implement the Workspace case to return the appropriate focus strategy(match App behavior or a no-op strategy) and ensure the default branch logs awarning and returns a safe fallback strategy.

} as const;

export type IDEType = keyof typeof IDE_TYPE;
1 change: 1 addition & 0 deletionsapp/client/src/ce/IDE/constants/routes.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,4 +42,5 @@ export const IDEBasePaths: Readonly<Record<IDEType, string[]>> = {
[IDE_TYPE.None]: [],
[IDE_TYPE.App]: [BUILDER_PATH, BUILDER_PATH_DEPRECATED, BUILDER_CUSTOM_PATH],
[IDE_TYPE.UIPackage]: [],
[IDE_TYPE.Workspace]: [],
};
8 changes: 8 additions & 0 deletionsapp/client/src/ce/RouteBuilder.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -197,6 +197,14 @@ export const queryAddURL = (props: URLBuilderParams): string =>
suffix: `queries/add`,
});

export const workspaceDatasourcesURL = (workspaceId: string): string =>
`/workspace/${workspaceId}/datasources`;

export const workspaceDatasourceEditorURL = (
workspaceId: string,
datasourceId: string,
): string => `/workspace/${workspaceId}/datasource/${datasourceId}`;

export const appLibrariesURL = (): string =>
urlBuilder.build({
suffix: "libraries",
Expand Down
10 changes: 10 additions & 0 deletionsapp/client/src/ce/actions/workspaceIDEActions.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
import { ReduxActionTypes } from "ee/constants/ReduxActionConstants";

export interface InitWorkspaceIDEPayload {
workspaceId: string;
}

export const initWorkspaceIDE = (payload: InitWorkspaceIDEPayload) => ({
type: ReduxActionTypes.INITIALIZE_WORKSPACE_IDE,
payload,
});
3 changes: 3 additions & 0 deletionsapp/client/src/ce/constants/ReduxActionConstants.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -411,6 +411,8 @@ const IDEActionTypes = {
INITIALIZE_CURRENT_PAGE: "INITIALIZE_CURRENT_PAGE",
INITIALIZE_EDITOR: "INITIALIZE_EDITOR",
INITIALIZE_EDITOR_SUCCESS: "INITIALIZE_EDITOR_SUCCESS",
INITIALIZE_WORKSPACE_IDE: "INITIALIZE_WORKSPACE_IDE",
INITIALIZE_WORKSPACE_IDE_SUCCESS: "INITIALIZE_WORKSPACE_IDE_SUCCESS",
INITIALIZE_PAGE_VIEWER: "INITIALIZE_PAGE_VIEWER",
INITIALIZE_PAGE_VIEWER_SUCCESS: "INITIALIZE_PAGE_VIEWER_SUCCESS",
SET_EXPLORER_PINNED: "SET_EXPLORER_PINNED",
Expand DownExpand Up@@ -478,6 +480,7 @@ const IDEActionTypes = {
const IDEActionErrorTypes = {
SETUP_PAGE_ERROR: "SETUP_PAGE_ERROR",
SETUP_PUBLISHED_PAGE_ERROR: "SETUP_PUBLISHED_PAGE_ERROR",
INITIALIZE_WORKSPACE_IDE_ERROR: "INITIALIZE_WORKSPACE_IDE_ERROR",
};

const ErrorManagementActionTypes = {
Expand Down
109 changes: 109 additions & 0 deletionsapp/client/src/ce/entities/Engine/WorkspaceEditorEngine.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
import{call,put}from"redux-saga/effects";
importCodemirrorTernServicefrom"utils/autocomplete/CodemirrorTernService";
import{
ReduxActionErrorTypes,
ReduxActionTypes,
}from"ee/constants/ReduxActionConstants";
import{isAirgapped}from"ee/utils/airgapHelpers";
import{fetchPluginFormConfigs,fetchPlugins}from"actions/pluginActions";
import{
fetchDatasources,
fetchMockDatasources,
}from"actions/datasourceActions";
import{failFastApiCalls}from"sagas/InitSagas";
import{
PluginFormConfigsNotFoundError,
PluginsNotFoundError,
}from"entities/Engine";
importtype{ReduxAction}from"actions/ReduxActionTypes";
import{waitForFetchEnvironments}from"ee/sagas/EnvironmentSagas";
import{fetchingEnvironmentConfigs}from"ee/actions/environmentAction";

exportdefaultclassWorkspaceEditorEngine{
constructor(){
this.setupEngine=this.setupEngine.bind(this);
this.loadWorkspace=this.loadWorkspace.bind(this);
this.loadPluginsAndDatasources=this.loadPluginsAndDatasources.bind(this);
this.completeChore=this.completeChore.bind(this);
}

*loadWorkspace(workspaceId:string){
// Set the current workspace context
yieldput({
type:ReduxActionTypes.SET_CURRENT_WORKSPACE_ID,
payload:{
workspaceId,
editorId:workspaceId,// Use workspaceId as editorId for workspace context
},
});

// Fetch environment configs for the workspace
yieldput(
fetchingEnvironmentConfigs({
workspaceId,
editorId:workspaceId,
fetchDatasourceMeta:true,
}),
);

// Wait for environments to be fetched
yieldcall(waitForFetchEnvironments);
}

public*setupEngine(){
yieldput({type:ReduxActionTypes.START_EVALUATION});
CodemirrorTernService.resetServer();
}

*loadPluginsAndDatasources(workspaceId:string){
constisAirgappedInstance=isAirgapped();
constinitActions:ReduxAction<unknown>[]=[
fetchPlugins({ workspaceId}),
fetchDatasources({ workspaceId}),
];

constsuccessActions=[
ReduxActionTypes.FETCH_PLUGINS_SUCCESS,
ReduxActionTypes.FETCH_DATASOURCES_SUCCESS,
];

consterrorActions=[
ReduxActionErrorTypes.FETCH_PLUGINS_ERROR,
ReduxActionErrorTypes.FETCH_DATASOURCES_ERROR,
];

if(!isAirgappedInstance){
initActions.push(fetchMockDatasources());
successActions.push(ReduxActionTypes.FETCH_MOCK_DATASOURCES_SUCCESS);
errorActions.push(ReduxActionErrorTypes.FETCH_MOCK_DATASOURCES_ERROR);
}

constinitActionCalls:boolean=yieldcall(
failFastApiCalls,
initActions,
successActions,
errorActions,
);

if(!initActionCalls)
thrownewPluginsNotFoundError("Unable to fetch plugins");

constpluginFormCall:boolean=yieldcall(
failFastApiCalls,
[fetchPluginFormConfigs()],
[ReduxActionTypes.FETCH_PLUGIN_FORM_CONFIGS_SUCCESS],
[ReduxActionErrorTypes.FETCH_PLUGIN_FORM_CONFIGS_ERROR],
);

if(!pluginFormCall)
thrownewPluginFormConfigsNotFoundError(
"Unable to fetch plugin form configs",
);
}

*completeChore(){
yieldput({
type:ReduxActionTypes.INITIALIZE_WORKSPACE_IDE_SUCCESS,
});
}
}
48 changes: 44 additions & 4 deletionsapp/client/src/ce/entities/URLRedirect/URLAssembly.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,6 +13,7 @@ import { APP_MODE } from "entities/App";
import { generatePath } from "react-router";
import getQueryParamsObject from "utils/getQueryParamsObject";
import { isNil } from "lodash";
import { objectKeys } from "@appsmith/utils";

export interface URLBuilderParams {
suffix?: string;
Expand All@@ -26,6 +27,7 @@ export interface URLBuilderParams {
// This is used to pass ID if the sender doesn't know the type of the entity
// base version of parent entity id, can be basePageId or moduleId
baseParentEntityId?: string;
workspaceId?: string;
generateEditorPath?: boolean;
}

Expand DownExpand Up@@ -65,7 +67,7 @@ export interface PageURLParams {
export function getQueryStringfromObject(
params: Record<string, string> = {},
): string {
const paramKeys =Object.keys(params);
const paramKeys =objectKeys(params);
const queryParams: string[] = [];

if (paramKeys) {
Expand DownExpand Up@@ -241,9 +243,24 @@ export class URLBuilder {
}

generateBasePath(basePageId: string, mode: APP_MODE) {
// Check if we're in workspace context
if (this.isWorkspaceContext()) {
return this.generateBasePathForWorkspace(basePageId);
}

return this.generateBasePathForApp(basePageId, mode);
}

isWorkspaceContext(): boolean {
const currentUrl = window.location.pathname;

return currentUrl.startsWith("/workspace");
}

generateBasePathForWorkspace(workspaceId: string) {
return `/workspace/${workspaceId}/datasources`;
}

getCustomSlugPathPreview(basePageId: string, customSlug: string) {
const urlPattern =
baseURLRegistry[URL_TYPE.CUSTOM_SLUG][APP_MODE.PUBLISHED];
Expand DownExpand Up@@ -284,9 +301,26 @@ export class URLBuilder {
}

resolveEntityId(builderParams: URLBuilderParams): string {
// Check if we're in workspace context
if (this.isWorkspaceContext()) {
return this.resolveEntityIdForWorkspace(builderParams);
}

return this.resolveEntityIdForApp(builderParams);
}

resolveEntityIdForWorkspace(builderParams: URLBuilderParams): string {
// Extract workspaceId from current URL if not provided
if (builderParams?.workspaceId) {
return builderParams.workspaceId;
}

const currentUrl = window.location.pathname;
const workspaceMatch = currentUrl.match(/^\/workspace\/([^\/]+)/);

return workspaceMatch ? workspaceMatch[1] : "";
}

Comment on lines +314 to +325
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue |🟠 Major

Validate workspaceId; don’t fall back to empty string.

Returning "" yields “/workspace//…” URLs. Align with app path behavior and throw.

-    const workspaceMatch = currentUrl.match(/^\/workspace\/([^\/]+)/);--    return workspaceMatch ? workspaceMatch[1] : "";+    const workspaceMatch = currentUrl.match(/^\/workspace\/([^\/]+)/);+    const id = workspaceMatch ? workspaceMatch[1] : "";+    if (!id) {+      throw new URIError("Missing workspaceId. Provide builderParams.workspaceId or navigate under /workspace/:workspaceId.");+    }+    return id;
🤖 Prompt for AI Agents
In app/client/src/ce/entities/URLRedirect/URLAssembly.ts around lines 312 to323, the resolver returns an empty string when no workspaceId is found whichproduces malformed paths like "/workspace//…"; change the logic to validate andrequire a workspaceId: if builderParams.workspaceId is present return it;otherwise attempt to extract from window.location.pathname and if extractionfails throw a clear Error (or assert) indicating missing workspaceId instead ofreturning ""; ensure the thrown error message includes context (e.g., "MissingworkspaceId in URL or builderParams") so callers can handle or surface it.

/**
* @throws {URIError}
* @param builderParams
Expand All@@ -304,7 +338,15 @@ export class URLBuilder {

const entityId = this.resolveEntityId(builderParams);

const basePath = this.generateBasePath(entityId, mode);
// Handle workspace-specific URL generation
let basePath = this.generateBasePath(entityId, mode);
let suffixPath = suffix ? `/${suffix}` : "";

if (this.isWorkspaceContext() && suffix?.startsWith("datasource/")) {
// For workspace datasource URLs, use singular /datasource path
basePath = `/workspace/${entityId}/datasource`;
suffixPath = `/${suffix.replace("datasource/", "")}`;
}

const queryParamsToPersist = fetchQueryParamsToPersist(
persistExistingParams,
Expand All@@ -320,8 +362,6 @@ export class URLBuilder {

const queryString = getQueryStringfromObject(modifiedQueryParams);

const suffixPath = suffix ? `/${suffix}` : "";

const hashPath = hash ? `#${hash}` : "";

// hash fragment should be at the end of the href
Expand Down
13 changes: 13 additions & 0 deletionsapp/client/src/ce/pages/Applications/WorkspaceMenu.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -166,6 +166,19 @@ function WorkspaceMenu({
workspaceId={workspace.id}
workspacePermissions={workspace.userPermissions || []}
/>
{hasManageWorkspacePermissions && (
<CustomMenuItem
className="workspace-menu-item"
onClick={() =>
getOnSelectAction(DropdownOnSelectActions.REDIRECT, {
path: `/workspace/${workspace.id}/datasources`,
})
}
>
<Icon name="database-2-line" size="md" />
Datasources
</CustomMenuItem>
)}
{canInviteToWorkspace && (
<CustomMenuItem
className="error-menuitem workspace-menu-item"
Expand Down
11 changes: 11 additions & 0 deletionsapp/client/src/ce/pages/common/AppHeader.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,10 +16,13 @@ import {
CUSTOM_WIDGETS_EDITOR_ID_PATH,
CUSTOM_WIDGETS_EDITOR_ID_PATH_CUSTOM,
CUSTOM_WIDGETS_DEPRECATED_EDITOR_ID_PATH,
WORKSPACE_DATASOURCES_PAGE_URL,
WORKSPACE_DATASOURCE_EDITOR_PAGE_URL,
} from "constants/routes";
import Navigation from "pages/AppViewer/Navigation";
import type { RouteComponentProps } from "react-router";
import { Header as AppIDEHeader } from "pages/AppIDE/layouts/components/Header";
import WorkspaceDatasourceHeader from "pages/workspace/WorkspaceDatasourceHeader";

export type Props = RouteComponentProps;

Expand All@@ -43,6 +46,14 @@ export const Routes = () => {
exact
path={CUSTOM_WIDGETS_DEPRECATED_EDITOR_ID_PATH}
/>
<Route
component={WorkspaceDatasourceHeader}
path={WORKSPACE_DATASOURCES_PAGE_URL}
/>
<Route
component={WorkspaceDatasourceHeader}
path={WORKSPACE_DATASOURCE_EDITOR_PAGE_URL}
/>
<Route component={AppIDEHeader} path={BUILDER_PATH_DEPRECATED} />
<Route component={Navigation} path={VIEWER_PATH_DEPRECATED} />
<Route component={AppIDEHeader} path={BUILDER_PATH} />
Expand Down
10 changes: 10 additions & 0 deletionsapp/client/src/ce/reducers/uiReducers/editorReducer.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,6 +15,7 @@ import type { UpdateCanvasPayload } from "actions/pageActions";
export const initialState: EditorReduxState = {
widgetConfigBuilt: false,
initialized: false,
isWorkspaceEditorInitialized: false,
loadingStates: {
publishing: false,
publishingError: false,
Expand DownExpand Up@@ -65,6 +66,14 @@ export const handlers = {
[ReduxActionTypes.INITIALIZE_EDITOR_SUCCESS]: (state: EditorReduxState) => {
return { ...state, initialized: true };
},
[ReduxActionTypes.INITIALIZE_WORKSPACE_IDE]: (state: EditorReduxState) => {
return { ...state, isWorkspaceEditorInitialized: false };
},
[ReduxActionTypes.INITIALIZE_WORKSPACE_IDE_SUCCESS]: (
state: EditorReduxState,
) => {
return { ...state, isWorkspaceEditorInitialized: true };
},
Comment on lines +69 to +76
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue |🟠 Major

Handle initialization error to avoid infinite spinner.

Add INITIALIZE_WORKSPACE_IDE_ERROR handler and store the error so UI can show a fallback.

   [ReduxActionTypes.INITIALIZE_WORKSPACE_IDE]: (state: EditorReduxState) => {     return { ...state, isWorkspaceEditorInitialized: false };   },   [ReduxActionTypes.INITIALIZE_WORKSPACE_IDE_SUCCESS]: (     state: EditorReduxState,   ) => {     return { ...state, isWorkspaceEditorInitialized: true };   },+  [ReduxActionErrorTypes.INITIALIZE_WORKSPACE_IDE_ERROR]: (+    state: EditorReduxState,+    action: ReduxAction<{ error: unknown }>,+  ) => {+    return {+      ...state,+      isWorkspaceEditorInitialized: false,+      workspaceEditorInitError: action.payload?.error,+    };+  },

Additionally add the field to state shape and initial state:

 // initialState   onLoadActionExecution: false,+  workspaceEditorInitError: undefined,
 export interface EditorReduxState { ...   onLoadActionExecution?: boolean;+  workspaceEditorInitError?: unknown;
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[ReduxActionTypes.INITIALIZE_WORKSPACE_IDE]:(state:EditorReduxState)=>{
return{ ...state,isWorkspaceEditorInitialized:false};
},
[ReduxActionTypes.INITIALIZE_WORKSPACE_IDE_SUCCESS]:(
state:EditorReduxState,
)=>{
return{ ...state,isWorkspaceEditorInitialized:true};
},
[ReduxActionTypes.INITIALIZE_WORKSPACE_IDE]:(state:EditorReduxState)=>{
return{ ...state,isWorkspaceEditorInitialized:false};
},
[ReduxActionTypes.INITIALIZE_WORKSPACE_IDE_SUCCESS]:(
state:EditorReduxState,
)=>{
return{ ...state,isWorkspaceEditorInitialized:true};
},
[ReduxActionErrorTypes.INITIALIZE_WORKSPACE_IDE_ERROR]:(
state:EditorReduxState,
action:ReduxAction<{error:unknown}>,
)=>{
return{
...state,
isWorkspaceEditorInitialized:false,
workspaceEditorInitError:action.payload?.error,
};
},
🤖 Prompt for AI Agents
In app/client/src/ce/reducers/uiReducers/editorReducer.tsx around lines 69 to76, add a new ReduxActionTypes.INITIALIZE_WORKSPACE_IDE_ERROR case that setsisWorkspaceEditorInitialized to false and stores the error payload on state(e.g., workspaceInitError or initializeWorkspaceError) so the UI can stop thespinner and show a fallback; also add that error field to the EditorReduxStatetype/shape and initialize it in the reducer's initial state (null or undefinedby default), and ensure the SUCCESS and INITIALIZE handlers clear/reset theerror.

[ReduxActionTypes.UPDATE_PAGE_SUCCESS]: (
state: EditorReduxState,
action: ReduxAction<UpdatePageResponse>,
Expand DownExpand Up@@ -318,6 +327,7 @@ const editorReducer = createReducer(initialState, handlers);
export interface EditorReduxState {
widgetConfigBuilt: boolean;
initialized: boolean;
isWorkspaceEditorInitialized: boolean;
pageWidgetId?: string;
currentLayoutId?: string;
currentPageName?: string;
Expand Down
2 changes: 2 additions & 0 deletionsapp/client/src/ce/sagas/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,6 +57,7 @@ import PostEvaluationSagas from "sagas/PostEvaluationSagas";
/* Sagas that are registered by a module that is designed to be independent of the core platform */
import ternSagas from "sagas/TernSaga";
import gitApplicationSagas from "git-artifact-helpers/application/sagas";
import workspaceIDESagas from "ee/sagas/workspaceIDESagas";

export const sagas = [
initSagas,
Expand All@@ -75,6 +76,7 @@ export const sagas = [
templateSagas,
pluginSagas,
workspaceSagas,
workspaceIDESagas,
curlImportSagas,
snipingModeSagas,
queryPaneSagas,
Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp