Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
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
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export const ProjectTree: React.FC<Props> = ({

useEffect(() => {
setSelectedLink(defaultSelected);
}, [defaultSelected]);
}, [defaultSelected?.projectId, defaultSelected?.skillId, defaultSelected?.dialogId, defaultSelected?.trigger]);

const rootProjectId = useRecoilValue(rootBotProjectIdSelector);
const botProjectSpace = useRecoilValue(botProjectSpaceSelector);
Expand Down
8 changes: 3 additions & 5 deletions Composer/packages/client/src/pages/design/DesignPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ const DesignPage: React.FC<RouteComponentProps<{ dialogId: string; projectId: st
const [brokenSkillInfo, setBrokenSkillInfo] = useState<undefined | TreeLink>(undefined);
const [brokenSkillRepairCallback, setBrokenSkillRepairCallback] = useState<undefined | (() => void)>(undefined);
const [dialogJsonVisible, setDialogJsonVisibility] = useState(false);
const [currentDialog, setCurrentDialog] = useState<DialogInfo>(dialogs[0] as DialogInfo);
const [warningIsVisible, setWarningIsVisible] = useState(true);
const [breadcrumbs, setBreadcrumbs] = useState<Array<BreadcrumbItem>>([]);

const shell = useShell('DesignPage', skillId ?? rootProjectId);
const shellForFlowEditor = useShell('FlowEditor', skillId ?? rootProjectId);
const shellForPropertyEditor = useShell('PropertyEditor', skillId ?? rootProjectId);
const currentDialog = (dialogs.find(({ id }) => id === dialogId) ?? dialogs[0]) as DialogInfo;

const { setPageElementState } = useRecoilValue(dispatcherState);

Expand All @@ -210,11 +210,9 @@ const DesignPage: React.FC<RouteComponentProps<{ dialogId: string; projectId: st
}, [skills, skillId]);

useEffect(() => {
const currentDialog = dialogs.find(({ id }) => id === dialogId) as DialogInfo | undefined;
if (currentDialog) {
setCurrentDialog(currentDialog);
if (!warningIsVisible) {
setWarningIsVisible(true);
}
setWarningIsVisible(true);
}, [dialogId, dialogs, location]);

// migration: add id to dialog when dialog doesn't have id
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/client/src/shell/lgApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function createLgApi(
addLgTemplate: updateLgTemplate,
getLgTemplates,
updateLgTemplate,
debouncedUpdateLgTemplate: debounce(updateLgTemplate, 250, { leading: true, trailing: true }),
debouncedUpdateLgTemplate: debounce(updateLgTemplate, 250),
removeLgTemplate,
removeLgTemplates,
copyLgTemplate,
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/client/src/shell/luApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function createLuApi(
getLuIntents,
getLuIntent,
updateLuIntent,
debouncedUpdateLuIntent: debounce(updateLuIntent, 250, { leading: true, trailing: true }),
debouncedUpdateLuIntent: debounce(updateLuIntent, 250),
renameLuIntent,
removeLuIntent,
};
Expand Down