remove browser_session_id local storage caching for workflow runs (#3638)
This commit is contained in:
@@ -38,13 +38,11 @@ import { KeyValueInput } from "@/components/KeyValueInput";
|
|||||||
import { toast } from "@/components/ui/use-toast";
|
import { toast } from "@/components/ui/use-toast";
|
||||||
import { useApiCredential } from "@/hooks/useApiCredential";
|
import { useApiCredential } from "@/hooks/useApiCredential";
|
||||||
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
|
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
|
||||||
import { useSyncFormFieldToStorage } from "@/hooks/useSyncFormFieldToStorage";
|
|
||||||
import { useLocalStorageFormDefault } from "@/hooks/useLocalStorageFormDefault";
|
|
||||||
import { useBlockScriptsQuery } from "@/routes/workflows/hooks/useBlockScriptsQuery";
|
import { useBlockScriptsQuery } from "@/routes/workflows/hooks/useBlockScriptsQuery";
|
||||||
import { constructCacheKeyValueFromParameters } from "@/routes/workflows/editor/utils";
|
import { constructCacheKeyValueFromParameters } from "@/routes/workflows/editor/utils";
|
||||||
import { useWorkflowQuery } from "@/routes/workflows/hooks/useWorkflowQuery";
|
import { useWorkflowQuery } from "@/routes/workflows/hooks/useWorkflowQuery";
|
||||||
import { type ApiCommandOptions } from "@/util/apiCommands";
|
import { type ApiCommandOptions } from "@/util/apiCommands";
|
||||||
import { apiBaseUrl, lsKeys } from "@/util/env";
|
import { apiBaseUrl } from "@/util/env";
|
||||||
|
|
||||||
import { MAX_SCREENSHOT_SCROLLS_DEFAULT } from "./editor/nodes/Taskv2Node/types";
|
import { MAX_SCREENSHOT_SCROLLS_DEFAULT } from "./editor/nodes/Taskv2Node/types";
|
||||||
import { getLabelForWorkflowParameterType } from "./editor/workflowEditorUtils";
|
import { getLabelForWorkflowParameterType } from "./editor/workflowEditorUtils";
|
||||||
@@ -188,10 +186,6 @@ function RunWorkflowForm({
|
|||||||
const credentialGetter = useCredentialGetter();
|
const credentialGetter = useCredentialGetter();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const browserSessionIdDefault = useLocalStorageFormDefault(
|
|
||||||
lsKeys.browserSessionId,
|
|
||||||
(initialValues.browserSessionId as string | undefined) ?? null,
|
|
||||||
);
|
|
||||||
const apiCredential = useApiCredential();
|
const apiCredential = useApiCredential();
|
||||||
const { data: workflow } = useWorkflowQuery({ workflowPermanentId });
|
const { data: workflow } = useWorkflowQuery({ workflowPermanentId });
|
||||||
|
|
||||||
@@ -200,7 +194,7 @@ function RunWorkflowForm({
|
|||||||
...initialValues,
|
...initialValues,
|
||||||
webhookCallbackUrl: initialSettings.webhookCallbackUrl,
|
webhookCallbackUrl: initialSettings.webhookCallbackUrl,
|
||||||
proxyLocation: initialSettings.proxyLocation,
|
proxyLocation: initialSettings.proxyLocation,
|
||||||
browserSessionId: browserSessionIdDefault,
|
browserSessionId: null,
|
||||||
cdpAddress: initialSettings.cdpAddress,
|
cdpAddress: initialSettings.cdpAddress,
|
||||||
maxScreenshotScrolls: initialSettings.maxScreenshotScrolls,
|
maxScreenshotScrolls: initialSettings.maxScreenshotScrolls,
|
||||||
extraHttpHeaders: initialSettings.extraHttpHeaders
|
extraHttpHeaders: initialSettings.extraHttpHeaders
|
||||||
@@ -211,8 +205,6 @@ function RunWorkflowForm({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
useSyncFormFieldToStorage(form, "browserSessionId", lsKeys.browserSessionId);
|
|
||||||
|
|
||||||
const runWorkflowMutation = useMutation({
|
const runWorkflowMutation = useMutation({
|
||||||
mutationFn: async (values: RunWorkflowFormType) => {
|
mutationFn: async (values: RunWorkflowFormType) => {
|
||||||
const client = await getClient(credentialGetter);
|
const client = await getClient(credentialGetter);
|
||||||
|
|||||||
Reference in New Issue
Block a user