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

feat: Plugin loader and multi-user capabilities #2023

Merged
merged 110 commits into from
Mar 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
cb33f13
first commit of working prototype for mongoDB storage
benbrown Jan 8, 2020
72a4a8d
change mechanism for creating zip file for syncing to runtime
benbrown Jan 8, 2020
c415232
clean up console output
benbrown Jan 8, 2020
9cc8748
plugin loader looks for plugins, finds them
benbrown Jan 8, 2020
7067f30
dynamically load in the storage provider via plugin loader
benbrown Jan 9, 2020
772aafb
remove some debug traces
benbrown Jan 21, 2020
59f0a2e
clean up some minor code formatting things
benbrown Jan 21, 2020
2340c70
disable linter rule to allow for requiring in plugin modules
benbrown Jan 21, 2020
9aa0e82
slight refactor of plugin loader to encapsulate functionality
benbrown Jan 23, 2020
e70fa8a
functioning auth implementattion using passportjs
benbrown Feb 10, 2020
e0a9602
sample github auth
benbrown Feb 11, 2020
8e825c7
first round of changes for multi-user support
benbrown Feb 12, 2020
c3116d2
add in the bot project id into the route
benbrown Feb 14, 2020
0c480b9
Merge branch 'benbrown/storage-auth' into benbrown/plugins
benbrown Feb 18, 2020
8732c55
Merge branch 'benbrown/routes' into benbrown/plugins
benbrown Feb 18, 2020
80b9063
fix new bot
benbrown Feb 18, 2020
078a7cc
fix save as
benbrown Feb 18, 2020
08b023e
rationalize all the URLS used in context of a project
benbrown Feb 18, 2020
74020e7
plumb user identity down through storage
benbrown Feb 18, 2020
fe79d27
disable plugins
benbrown Feb 18, 2020
296af7e
add readme
benbrown Feb 19, 2020
4f1bcd8
plugin readme
benbrown Feb 19, 2020
5441911
plugin readme
benbrown Feb 19, 2020
cd04d80
plugin readme
benbrown Feb 19, 2020
ba4bd8f
plugin readme
benbrown Feb 19, 2020
5436622
import publisher controller from other branch
benbrown Feb 19, 2020
4d082d0
update to readme
benbrown Feb 19, 2020
4c0d41a
import prototype of publishing page
benbrown Feb 19, 2020
c4f9420
updates
benbrown Feb 20, 2020
81232c5
Merge branch 'master' of github.com:microsoft/BotFramework-Composer i…
benbrown Feb 20, 2020
ef1c2f1
Merge branch 'master' of github.com:microsoft/BotFramework-Composer i…
benbrown Feb 21, 2020
6d4cbaf
delete environment and connector
VanyLaw Feb 24, 2020
5745ed7
Merge branch 'master' of github.com:microsoft/BotFramework-Composer i…
benbrown Feb 24, 2020
3fc2d4c
add error checking for missing project by id
benbrown Feb 24, 2020
438a179
Better error handling for attempts to write to a missing or moved pro…
benbrown Feb 24, 2020
4bcc4c4
Merge remote-tracking branch 'origin/benbrown/plugins' into wenyluo/p…
VanyLaw Feb 25, 2020
dcfa81e
add publish method with localpublish plugin
VanyLaw Feb 27, 2020
b5f84bd
keep bot dir clean
boydc2014 Feb 28, 2020
5606ea4
basic publish of localpublish plugin
VanyLaw Feb 29, 2020
261430b
remove hostBot
VanyLaw Feb 29, 2020
7fd7ce0
add gitignore file
VanyLaw Feb 29, 2020
cbfafe4
change unzip template into copy template folder
VanyLaw Mar 2, 2020
ee89768
Fix build script
boydc2014 Mar 2, 2020
b0f8073
Fix default projectMap not exists
boydc2014 Mar 2, 2020
6d2533a
change luis operation to match local plugin
VanyLaw Mar 2, 2020
5879abc
polish default setting
VanyLaw Mar 2, 2020
1d50f81
use projectId
zhixzhan Mar 2, 2020
592f714
Merge branch 'wenyluo/plugins' of https://github.com/microsoft/BotFra…
zhixzhan Mar 2, 2020
8a939a3
clean up
zhixzhan Mar 2, 2020
dc44904
remove lib dir
boydc2014 Mar 2, 2020
76d55c8
Merge branch 'benbrown/plugins' of github.com:microsoft/BotFramework-…
benbrown Mar 2, 2020
ece9088
Merge branch 'master' into wenyluo/plugins
zhixzhan Mar 3, 2020
5e3a483
use projectId
zhixzhan Mar 3, 2020
dc846e8
use limit 'currentBotProjects' cache
zhixzhan Mar 3, 2020
0e6681f
remove unused
boydc2014 Mar 3, 2020
0821642
Update copy
boydc2014 Mar 3, 2020
e5b5355
return error response when publish failed
VanyLaw Mar 3, 2020
88960a2
Merge branch 'wenyluo/plugins' of https://github.com/microsoft/BotFra…
VanyLaw Mar 3, 2020
6e2376e
Merge branch 'benbrown/plugins' of github.com:microsoft/BotFramework-…
benbrown Mar 3, 2020
d15f356
Merge branch 'master' of github.com:microsoft/BotFramework-Composer i…
benbrown Mar 3, 2020
621b560
update name initialization process
liweitian Mar 4, 2020
a68f18e
fix some test,hide publish tab and change deploy script
VanyLaw Mar 4, 2020
5dd7f1d
Merge branch 'wenyluo/plugins' of https://github.com/microsoft/BotFra…
VanyLaw Mar 4, 2020
d68488b
fix UT integrity check
VanyLaw Mar 4, 2020
ee980a9
fix bf-cli version error
VanyLaw Mar 4, 2020
6b4eb73
update the version
lei9444 Mar 4, 2020
5b27457
remove @microsoft/bf-cli-command@1.0.0
lei9444 Mar 4, 2020
17dc68a
try to fix todo e2e test
VanyLaw Mar 4, 2020
ffc0c8c
Merge branch 'wenyluo/plugins' of https://github.com/microsoft/BotFra…
VanyLaw Mar 4, 2020
92bbdfb
fix lint
lei9444 Mar 4, 2020
32085a8
fix lint
lei9444 Mar 4, 2020
3102ee7
remove some unused test and skip some failed unit tests
lei9444 Mar 4, 2020
106bc78
Merge branch 'master' into benbrown/plugins
cwhitten Mar 4, 2020
e96c744
feat: Prevent old content from overwriting newer changes (#2156)
benbrown Mar 4, 2020
fb6e3c3
Merge remote-tracking branch 'origin/benbrown/plugins' into wenyluo/p…
VanyLaw Mar 5, 2020
e39ef68
change hint word deploy to publish
VanyLaw Mar 5, 2020
741c6f2
merge master and fix conflict
VanyLaw Mar 5, 2020
c0c3aa0
fix lint
VanyLaw Mar 5, 2020
5f46f54
fix some test syntax
benbrown Mar 5, 2020
d0c9a95
merge master and fix conflict
VanyLaw Mar 6, 2020
0d527f1
Merge branch 'wenyluo/plugins' of https://github.com/microsoft/BotFra…
lei9444 Mar 6, 2020
789f230
update the ui for notification page
lei9444 Mar 6, 2020
6f989ea
fix luis publish path not found
VanyLaw Mar 6, 2020
3e22acd
Merge branch 'wenyluo/plugins' of https://github.com/microsoft/BotFra…
VanyLaw Mar 6, 2020
14cc3b0
fix some e2e tests
VanyLaw Mar 6, 2020
cf49d6a
merge master and fix conflict
VanyLaw Mar 9, 2020
85e6113
fix onboarding when using projectId
VanyLaw Mar 9, 2020
b4ee1d1
fix notification page bug
lei9444 Mar 9, 2020
515fddd
Merge branch 'wenyluo/plugins' into benbrown/plugins
lei9444 Mar 9, 2020
2dd06e7
Back out simple overwrite protection, will replace with less error pr…
benbrown Mar 9, 2020
e525372
Merge branch 'master' of github.com:microsoft/BotFramework-Composer i…
benbrown Mar 9, 2020
2916a6f
add plugins volumn in docker
VanyLaw Mar 11, 2020
4e37249
fix docker up
VanyLaw Mar 11, 2020
86e23a4
fix unit test
lei9444 Mar 11, 2020
6ab95a0
fix the filesetting path
lei9444 Mar 11, 2020
bc38483
change docker to map multi ports. in order to support multi runtime
VanyLaw Mar 13, 2020
c24e50a
Merge branch 'benbrown/plugins' of https://github.com/microsoft/BotFr…
VanyLaw Mar 13, 2020
1c1a329
fix conflict
VanyLaw Mar 16, 2020
0dd34bc
add projectId when create and delete dialog
lei9444 Mar 17, 2020
fa009f4
fix botstatus
VanyLaw Mar 17, 2020
d085ece
Merge branch 'benbrown/plugins' of https://github.com/microsoft/BotFr…
VanyLaw Mar 17, 2020
408608f
fix botstatus
VanyLaw Mar 17, 2020
39f2b8c
Merge remote-tracking branch 'origin/master' into benbrown/plugins
VanyLaw Mar 17, 2020
004d91d
remove console log
VanyLaw Mar 17, 2020
fbc5b59
Merge branch 'master' into benbrown/plugins
lei9444 Mar 17, 2020
c799b3c
Merge branch 'benbrown/plugins' of https://github.com/microsoft/BotFr…
lei9444 Mar 17, 2020
70631ee
fix settings files path
VanyLaw Mar 18, 2020
2ede5bf
fix conflict
VanyLaw Mar 19, 2020
e59c3c8
update the moke data
lei9444 Mar 19, 2020
e205963
Merge branch 'benbrown/plugins' of https://github.com/microsoft/BotFr…
lei9444 Mar 19, 2020
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 deletions Composer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ COPY --from=build /src/Composer/package.json .
COPY --from=build /src/Composer/packages/server ./packages/server
COPY --from=build /src/Composer/packages/lib ./packages/lib
COPY --from=build /src/Composer/packages/tools ./packages/tools
COPY --from=build /src/Composer/plugins ./plugins

ENV NODE_ENV "production"
RUN yarn --production --frozen-lockfile --force && yarn cache clean
Expand Down
6 changes: 3 additions & 3 deletions Composer/cypress/integration/LUPage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
// Licensed under the MIT License.

context('LU Page', () => {
before(() => {
beforeEach(() => {
cy.visit(Cypress.env('COMPOSER_URL'));
cy.createBot('ToDoBotWithLuisSample');
});

it('can open language understanding page', () => {
cy.findByTestId('LeftNav-CommandBarButtonUser Input').click();

cy.wait(1000);
// left nav tree
cy.contains('ToDoBotWithLuisSample.Main');
cy.contains('__TestToDoBotWithLuisSample.Main');
cy.contains('All');

cy.get('.toggleEditMode button').should('not.exist');
Expand Down
11 changes: 5 additions & 6 deletions Composer/cypress/integration/LuisDeploy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@
context('Luis Deploy', () => {
beforeEach(() => {
cy.server();
cy.route('GET', '/api/launcher/connect?botEnvironment=production', 'OK');
cy.route('POST', '/api/launcher/sync', 'OK');
cy.route('POST', 'api/projects/opened/settings', 'OK');
cy.route('POST', '/api/publish/*/publish/default', 'OK');
cy.route('POST', '/api/projects/*/settings', 'OK');
cy.visit(Cypress.env('COMPOSER_URL'));
cy.createBot('ToDoBotWithLuisSample');
});

it('can deploy luis success', () => {
cy.findByTestId('LeftNav-CommandBarButtonUser Input').click();

cy.wait(1000);
cy.route({
method: 'POST',
url: '/api/projects/opened/luFiles/publish',
url: 'api/projects/*/luFiles/publish',
status: 200,
response: 'fixture:luPublish/success',
});
Expand All @@ -39,7 +38,7 @@ context('Luis Deploy', () => {

cy.route({
method: 'POST',
url: '/api/projects/opened/luFiles/publish',
url: 'api/projects/*/luFiles/publish',
status: 400,
response: 'fixture:luPublish/error',
});
Expand Down
10 changes: 5 additions & 5 deletions Composer/cypress/integration/NotificationPage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ context('Notification Page', () => {

cy.get('.toggleEditMode button').as('switchButton');
cy.get('@switchButton').click();
cy.get('textarea').type('test lg syntax error#');
cy.get('textarea').type('#');

cy.visitPage('Notifications');
cy.get('[data-testid="notifications-info-button"]').click();

cy.get('[data-testid="notifications-table-view"]').within(() => {
cy.findAllByText('common.lg')
Expand All @@ -35,9 +35,9 @@ context('Notification Page', () => {
});

cy.get('.toggleEditMode button').click();
cy.get('textarea').type('test lu syntax error');
cy.get('textarea').type('t');

cy.visitPage('Notifications');
cy.get('[data-testid="notifications-info-button"]').click();

cy.get('[data-testid="notifications-table-view"]').within(() => {
cy.findAllByText('Main.lu')
Expand Down Expand Up @@ -65,7 +65,7 @@ context('Notification Page', () => {
cy.get('.ObjectItem input').type('()');
});

cy.visitPage('Notifications');
cy.get('[data-testid="notifications-info-button"]').click();

cy.get('[data-testid="notifications-table-view"]').within(() => {
cy.findAllByText('Main.dialog')
Expand Down
3 changes: 2 additions & 1 deletion Composer/cypress/integration/ToDoBot.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
// Licensed under the MIT License.

context('ToDo Bot', () => {
beforeEach(() => {
before(() => {
cy.visit(Cypress.env('COMPOSER_URL'));
cy.createBot('TodoSample');
cy.wait(5000);
});

it('can open the main dialog', () => {
Expand Down
5 changes: 3 additions & 2 deletions Composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
"packages/tools/language-servers/*"
],
"scripts": {
"build": "node scripts/update.js && node scripts/begin.js && yarn build:prod",
"build": "node scripts/update.js && node scripts/begin.js && yarn build:prod && yarn build:plugins",
"build:prod": "yarn build:dev && yarn build:server && yarn build:client",
"build:dev": "yarn build:lib && yarn build:tools && yarn build:extensions",
"build:dev": "yarn build:lib && yarn build:tools && yarn build:extensions && yarn build:plugins",
"build:lib": "yarn workspace @bfc/libs build:all",
"build:extensions": "yarn workspace @bfc/extensions build:all",
"build:server": "yarn workspace @bfc/server build",
"build:client": "yarn workspace @bfc/client build",
"build:tools": "yarn workspace @bfc/tools build:all",
"build:plugins": "cd plugins/localPublish && yarn install && yarn build",
"start": "cross-env NODE_ENV=production PORT=3000 yarn start:server",
"startall": "node scripts/update.js && yarn start",
"start:dev": "concurrently \"npm:start:client\" \"npm:start:server:dev\"",
Expand Down
2 changes: 2 additions & 0 deletions Composer/packages/client/config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ function getClientEnvironment(publicUrl) {
.replace('\n', ''),
SDK_PACKAGE_VERSION: '4.7.0-preview-191208-1', // TODO: change this when Composer supports custom schema/custom runtime
COMPOSER_VERSION: 'Preview 2.0',
LOCAL_PUBLISH_PATH:
process.env.LOCAL_PUBLISH_PATH || path.resolve(process.cwd(), '../../plugins/localPublish/hostedBots'),
}
);
// Stringify all values so we can feed into Webpack DefinePlugin
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@
"webpack-manifest-plugin": "2.1.0",
"workbox-webpack-plugin": "4.3.1"
}
}
}
17 changes: 9 additions & 8 deletions Composer/packages/client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const Onboarding = React.lazy(() => import('./Onboarding'));
// eslint-disable-next-line react/display-name
const Content = forwardRef<HTMLDivElement>((props, ref) => <div css={content} {...props} ref={ref} />);

const topLinks = (botLoaded: boolean) => {
const topLinks = (projectId: string) => {
const botLoaded = !!projectId;
let links = [
{
to: '/home',
Expand All @@ -37,7 +38,7 @@ const topLinks = (botLoaded: boolean) => {
disabled: false,
},
{
to: '/dialogs/Main',
to: `/bot/${projectId}/dialogs/Main`,
iconName: 'SplitObject',
labelName: formatMessage('Design Flow'),
exact: false,
Expand All @@ -51,14 +52,14 @@ const topLinks = (botLoaded: boolean) => {
// disabled: true, // will delete
// },
{
to: '/language-generation',
to: `/bot/${projectId}/language-generation`,
iconName: 'Robot',
labelName: formatMessage('Bot Responses'),
exact: false,
disabled: !botLoaded,
},
{
to: '/language-understanding',
to: `/bot/${projectId}/language-understanding`,
iconName: 'People',
labelName: formatMessage('User Input'),
exact: false,
Expand All @@ -72,14 +73,14 @@ const topLinks = (botLoaded: boolean) => {
// disabled: true,
// },
{
to: '/notifications',
to: `/bot/${projectId}/notifications`,
iconName: 'Warning',
labelName: formatMessage('Notifications'),
exact: true,
disabled: !botLoaded,
},
{
to: '/setting/',
to: `/bot/${projectId}/setting/`,
iconName: 'Settings',
labelName: formatMessage('Settings'),
exact: false,
Expand Down Expand Up @@ -114,7 +115,7 @@ const bottomLinks = [
export const App: React.FC = () => {
const { state, actions } = useContext(StoreContext);
const [sideBarExpand, setSideBarExpand] = useState(false);
const { botName, creationFlowStatus } = state;
const { botName, projectId, creationFlowStatus } = state;
const { setCreationFlowStatus } = actions;
const mapNavItemTo = x => resolveToBasePath(BASEPATH, x);

Expand All @@ -136,7 +137,7 @@ export const App: React.FC = () => {
ariaLabel={sideBarExpand ? formatMessage('Collapse Nav') : formatMessage('Expand Nav')}
/>
<div css={dividerTop} />{' '}
{topLinks(!!botName).map((link, index) => {
{topLinks(projectId).map((link, index) => {
return (
<NavItem
key={'NavLeftBar' + index}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface FormDataError {
name?: string;
}

interface Bots {
interface Files {
name: '';
path: '';
}
Expand All @@ -40,13 +40,13 @@ interface DefineConversationProps {
onGetErrorMessage?: (text: string) => void;
focusedStorageFolder?: StorageFolder;
currentPath?: string;
bots?: Bots[];
files?: Files[];
}

const initialFormDataError: FormDataError = {};

export const DefineConversation: React.FC<DefineConversationProps> = props => {
const { onSubmit, onDismiss, onCurrentPathUpdate, focusedStorageFolder, currentPath, bots } = props;
const { onSubmit, onDismiss, onCurrentPathUpdate, focusedStorageFolder, currentPath, files } = props;
const { state } = useContext(StoreContext);
const { templateId } = state;

Expand All @@ -58,9 +58,9 @@ export const DefineConversation: React.FC<DefineConversationProps> = props => {
i++;
defaultName = `${bot}-${i}`;
} while (
bots &&
bots.find(bot => {
return bot.name === defaultName;
files &&
files.find(file => {
return file.name.toLowerCase() === defaultName.toLowerCase();
}) &&
i < MAXTRYTIMES
);
Expand Down Expand Up @@ -94,9 +94,9 @@ export const DefineConversation: React.FC<DefineConversationProps> = props => {
: '';
if (
name &&
bots &&
bots.find(bot => {
return bot.path === newBotPath;
files &&
files.find(bot => {
return bot.path.toLowerCase() === newBotPath.toLowerCase();
})
) {
errors.name = formatMessage('Duplication of names');
Expand All @@ -116,7 +116,7 @@ export const DefineConversation: React.FC<DefineConversationProps> = props => {
setDisable(false);
}
setFormDataErrors(errors);
}, [bots, formData.name]);
}, [files, formData.name]);

const handleSubmit = e => {
e.preventDefault();
Expand Down
20 changes: 7 additions & 13 deletions Composer/packages/client/src/CreationFlow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { navigateTo } from './../utils/navigation';

export function CreationFlow(props) {
const { state, actions } = useContext(StoreContext);
const [bots, setBots] = useState([]);
const [files, setFiles] = useState([]);
const [step, setStep] = useState();
// eslint-disable-next-line react/prop-types
const { creationFlowStatus, setCreationFlowStatus } = props;
Expand Down Expand Up @@ -47,13 +47,7 @@ export function CreationFlow(props) {
useEffect(() => {
const allFilesInFolder = get(focusedStorageFolder, 'children', []);

const botsInCurrentFolder = allFilesInFolder.filter(file => {
if (file.type === FileTypes.BOT) {
return file;
}
});

setBots(botsInCurrentFolder);
setFiles(allFilesInFolder);
if (Object.keys(focusedStorageFolder).length) {
setCurrentPath(Path.join(focusedStorageFolder.parent, focusedStorageFolder.name));
}
Expand Down Expand Up @@ -105,7 +99,7 @@ export function CreationFlow(props) {

const openBot = async botFolder => {
await openBotProject(botFolder);
navigateTo('/dialogs/Main');
// navigateTo(`/bot/${state.projectId}/dialogs/Main`);
handleDismiss();
};

Expand All @@ -114,7 +108,7 @@ export function CreationFlow(props) {
};

const handleSaveAs = async formData => {
await saveProjectAs(formData.name, formData.description, formData.location);
await saveProjectAs(state.projectId, formData.name, formData.description, formData.location);
};

const handleSubmit = formData => {
Expand All @@ -123,11 +117,11 @@ export function CreationFlow(props) {
case CreationFlowStatus.NEW_FROM_TEMPLATE:
case CreationFlowStatus.NEW:
handleCreateNew(formData);
navigateTo('/dialogs/Main');
//navigateTo(`/bot/${state.projectId}/dialogs/Main`);
break;
case CreationFlowStatus.SAVEAS:
handleSaveAs(formData);
navigateTo('/dialogs/Main');
navigateTo(`/bot/${state.projectId}/dialogs/Main`);
break;
default:
setStep(Steps.NONE);
Expand Down Expand Up @@ -167,7 +161,7 @@ export function CreationFlow(props) {
onCurrentPathUpdate={updateCurrentPath}
focusedStorageFolder={focusedStorageFolder}
currentPath={currentPath}
bots={bots}
files={files}
/>
),
},
Expand Down
7 changes: 4 additions & 3 deletions Composer/packages/client/src/Onboarding/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ const Onboarding: React.FC = () => {
state: {
dialogs,
onboarding: { complete },
projectId,
},
} = useContext(StoreContext);

const [stepSets, setStepSets] = useState<IStepSet[]>(defaultStepSets());
const [stepSets, setStepSets] = useState<IStepSet[]>(defaultStepSets(projectId));
const [currentSet, setCurrentSet] = useState<number>(getCurrentSet(stepSets));
const [currentStep, setCurrentStep] = useState<number>(0);
const [hideModal, setHideModal] = useState(true);
Expand Down Expand Up @@ -67,7 +68,7 @@ const Onboarding: React.FC = () => {
}, [currentSet, currentStep, setTeachingBubble]);

useEffect(() => {
const sets = defaultStepSets()
const sets = defaultStepSets(projectId)
.map(stepSet => ({
...stepSet,
steps: stepSet.steps.filter(({ targetId }) => {
Expand All @@ -85,7 +86,7 @@ const Onboarding: React.FC = () => {
}, [dialogs]);

useEffect(() => {
setHideModal(pathname !== '/dialogs/Main');
setHideModal(pathname !== `/bot/${projectId}/dialogs/Main`);
if (currentSet === 0) {
setCurrentStep(pathname === '/home' ? 0 : -1);
}
Expand Down
Loading