Skip to content

Commit

Permalink
fix: Remove the session wrapper from the embedded widget app (#2158)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
mofojed committed Jul 23, 2024
1 parent f859e13 commit 6e32abe
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions packages/embed-widget/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ import {
ShortcutRegistry,
} from '@deephaven/components'; // Use the loading spinner from the Deephaven components package
import type { dh } from '@deephaven/jsapi-types';
import {
fetchVariableDefinition,
getSessionDetails,
loadSessionWrapper,
} from '@deephaven/jsapi-utils';
import { fetchVariableDefinition } from '@deephaven/jsapi-utils';
import Log from '@deephaven/log';
import { useDashboardPlugins } from '@deephaven/plugin';
import {
Expand Down Expand Up @@ -88,20 +84,14 @@ function App(): JSX.Element {
throw new Error('Missing URL parameter "name"');
}

const sessionDetails = await getSessionDetails();
const sessionWrapper = await loadSessionWrapper(
api,
connection,
sessionDetails
);
const storageService = client.getStorageService();
const layoutStorage = new GrpcLayoutStorage(
storageService,
import.meta.env.VITE_STORAGE_PATH_LAYOUTS ?? ''
);
const workspaceStorage = new LocalWorkspaceStorage(layoutStorage);
const loadedWorkspace = await workspaceStorage.load({
isConsoleAvailable: sessionWrapper !== undefined,
isConsoleAvailable: false,
});
const {
data: { settings },
Expand Down

0 comments on commit 6e32abe

Please sign in to comment.