Skip to content

Commit b76c1d7

Browse files
authored
fix: Remove the session wrapper from the embedded widget app (#2158)
- We creating a new session and getting the session details, even though that was unnecessary for fetching the object itself since we already have a connection - Just pass `isConsoleAvailable: false` here, since we will never have the console available in the embedded widget scenario - Should speed up the embed-widget fetch quite a bit
1 parent 6362eb7 commit b76c1d7

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

packages/embed-widget/src/App.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ import {
1919
ShortcutRegistry,
2020
} from '@deephaven/components'; // Use the loading spinner from the Deephaven components package
2121
import type { dh } from '@deephaven/jsapi-types';
22-
import {
23-
fetchVariableDefinition,
24-
getSessionDetails,
25-
loadSessionWrapper,
26-
} from '@deephaven/jsapi-utils';
22+
import { fetchVariableDefinition } from '@deephaven/jsapi-utils';
2723
import Log from '@deephaven/log';
2824
import { useDashboardPlugins } from '@deephaven/plugin';
2925
import {
@@ -88,20 +84,14 @@ function App(): JSX.Element {
8884
throw new Error('Missing URL parameter "name"');
8985
}
9086

91-
const sessionDetails = await getSessionDetails();
92-
const sessionWrapper = await loadSessionWrapper(
93-
api,
94-
connection,
95-
sessionDetails
96-
);
9787
const storageService = client.getStorageService();
9888
const layoutStorage = new GrpcLayoutStorage(
9989
storageService,
10090
import.meta.env.VITE_STORAGE_PATH_LAYOUTS ?? ''
10191
);
10292
const workspaceStorage = new LocalWorkspaceStorage(layoutStorage);
10393
const loadedWorkspace = await workspaceStorage.load({
104-
isConsoleAvailable: sessionWrapper !== undefined,
94+
isConsoleAvailable: false,
10595
});
10696
const {
10797
data: { settings },

0 commit comments

Comments
 (0)