Skip to content

Commit

Permalink
Remove TOTP URL from UI (#1674)
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng authored Jan 29, 2025
1 parent d1e0a17 commit 2166ab1
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 161 deletions.
27 changes: 0 additions & 27 deletions skyvern-frontend/src/routes/tasks/create/CreateNewTaskForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ function createTaskRequestObject(
proxy_location: formValues.proxyLocation ?? ProxyLocation.Residential,
navigation_payload: transform(formValues.navigationPayload),
extracted_information_schema: extractedInformationSchema,
totp_verification_url: transform(formValues.totpVerificationUrl),
totp_identifier: transform(formValues.totpIdentifier),
error_code_mapping: errorCodeMapping,
};
Expand Down Expand Up @@ -556,32 +555,6 @@ function CreateNewTaskForm({ initialValues }: Props) {
)}
/>
<Separator />
<FormField
control={form.control}
name="totpVerificationUrl"
render={({ field }) => (
<FormItem>
<div className="flex gap-16">
<FormLabel>
<div className="w-72">
<h1 className="text-lg">2FA Verification URL</h1>
<h2 className="text-base text-slate-400"></h2>
</div>
</FormLabel>
<div className="w-full">
<FormControl>
<Input
{...field}
placeholder="Provide your 2FA endpoint"
value={field.value === null ? "" : field.value}
/>
</FormControl>
<FormMessage />
</div>
</div>
</FormItem>
)}
/>
<FormField
control={form.control}
name="totpIdentifier"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ function CreateNewTaskFormPage() {
),
errorCodeMapping: null,
totpIdentifier: null,
totpVerificationUrl: null,
webhookCallbackUrl: null,
proxyLocation: null,
}}
Expand Down Expand Up @@ -127,8 +126,6 @@ function CreateNewTaskFormPage() {
: JSON.stringify(navigationPayload, null, 2),
maxStepsOverride,
totpIdentifier: data.workflow_definition.blocks[0].totp_identifier,
totpVerificationUrl:
data.workflow_definition.blocks[0].totp_verification_url,
errorCodeMapping: JSON.stringify(errorCodeMapping, null, 2),
}}
/>
Expand Down
28 changes: 0 additions & 28 deletions skyvern-frontend/src/routes/tasks/create/SavedTaskForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ function createTaskRequestObject(formValues: SavedTaskFormValues) {
extracted_information_schema: safeParseMaybeJSONString(
formValues.extractedInformationSchema,
),
totp_verification_url: transform(formValues.totpVerificationUrl),
totp_identifier: transform(formValues.totpIdentifier),
error_code_mapping: safeParseMaybeJSONString(formValues.errorCodeMapping),
};
Expand Down Expand Up @@ -98,7 +97,6 @@ function createTaskTemplateRequestObject(values: SavedTaskFormValues) {
values.extractedInformationSchema,
),
max_steps_per_run: values.maxStepsOverride,
totp_verification_url: values.totpVerificationUrl,
totp_identifier: values.totpIdentifier,
error_code_mapping: safeParseMaybeJSONString(values.errorCodeMapping),
},
Expand Down Expand Up @@ -705,32 +703,6 @@ function SavedTaskForm({ initialValues }: Props) {
)}
/>
<Separator />
<FormField
control={form.control}
name="totpVerificationUrl"
render={({ field }) => (
<FormItem>
<div className="flex gap-16">
<FormLabel>
<div className="w-72">
<h1 className="text-lg">2FA Verification URL</h1>
<h2 className="text-base text-slate-400"></h2>
</div>
</FormLabel>
<div className="w-full">
<FormControl>
<Input
{...field}
placeholder="Provide your 2FA endpoint"
value={field.value === null ? "" : field.value}
/>
</FormControl>
<FormMessage />
</div>
</div>
</FormItem>
)}
/>
<FormField
control={form.control}
name="totpIdentifier"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ function RetryTask() {
),
webhookCallbackUrl: task.request.webhook_callback_url ?? null,
totpIdentifier: task.request.totp_identifier ?? null,
totpVerificationUrl: task.request.totp_verification_url ?? null,
errorCodeMapping: task.request.error_code_mapping
? JSON.stringify(task.request.error_code_mapping, null, 2)
: "",
Expand Down
1 change: 0 additions & 1 deletion skyvern-frontend/src/routes/tasks/create/taskFormTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const createNewTaskFormSchemaBase = z.object({
navigationPayload: z.string().or(z.null()),
extractedInformationSchema: z.string().or(z.null()),
maxStepsOverride: z.number().or(z.null()).optional(),
totpVerificationUrl: z.string().or(z.null()),
totpIdentifier: z.string().or(z.null()),
errorCodeMapping: z.string().or(z.null()),
proxyLocation: z.nativeEnum(ProxyLocation).or(z.null()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,25 +339,6 @@ function ActionNode({ id, data }: NodeProps<ActionNode>) {
/>
</div>
<Separator />
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
2FA Verification URL
</Label>
<HelpTooltip
content={helpTooltips["action"]["totpVerificationUrl"]}
/>
</div>
<WorkflowBlockInputTextarea
nodeId={id}
onChange={(value) => {
handleChange("totpVerificationUrl", value);
}}
value={inputs.totpVerificationUrl ?? ""}
placeholder={placeholders["action"]["totpVerificationUrl"]}
className="nopan text-xs"
/>
</div>
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,27 +317,6 @@ function FileDownloadNode({ id, data }: NodeProps<FileDownloadNode>) {
/>
</div>
<Separator />
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
2FA Verification URL
</Label>
<HelpTooltip
content={helpTooltips["download"]["totpVerificationUrl"]}
/>
</div>
<WorkflowBlockInputTextarea
nodeId={id}
onChange={(value) => {
handleChange("totpVerificationUrl", value);
}}
value={inputs.totpVerificationUrl ?? ""}
placeholder={
placeholders["download"]["totpVerificationUrl"]
}
className="nopan text-xs"
/>
</div>
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,25 +331,6 @@ function LoginNode({ id, data }: NodeProps<LoginNode>) {
</div>
</div>
<Separator />
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
2FA Verification URL
</Label>
<HelpTooltip
content={helpTooltips["login"]["totpVerificationUrl"]}
/>
</div>
<WorkflowBlockInputTextarea
nodeId={id}
onChange={(value) => {
handleChange("totpVerificationUrl", value);
}}
value={inputs.totpVerificationUrl ?? ""}
placeholder={placeholders["login"]["totpVerificationUrl"]}
className="nopan text-xs"
/>
</div>
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,29 +358,6 @@ function NavigationNode({ id, data }: NodeProps<NavigationNode>) {
/>
</div>
<Separator />
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
2FA Verification URL
</Label>
<HelpTooltip
content={
helpTooltips["navigation"]["totpVerificationUrl"]
}
/>
</div>
<WorkflowBlockInputTextarea
nodeId={id}
onChange={(value) => {
handleChange("totpVerificationUrl", value);
}}
value={inputs.totpVerificationUrl ?? ""}
placeholder={
placeholders["navigation"]["totpVerificationUrl"]
}
className="nopan text-xs"
/>
</div>
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,25 +387,6 @@ function TaskNode({ id, data }: NodeProps<TaskNode>) {
/>
</div>
<Separator />
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
2FA Verification URL
</Label>
<HelpTooltip
content={helpTooltips["task"]["totpVerificationUrl"]}
/>
</div>
<WorkflowBlockInputTextarea
nodeId={id}
onChange={(value) => {
handleChange("totpVerificationUrl", value);
}}
value={inputs.totpVerificationUrl ?? ""}
placeholder={placeholders["task"]["totpVerificationUrl"]}
className="nopan text-xs"
/>
</div>
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
Expand Down

0 comments on commit 2166ab1

Please sign in to comment.