From f009ebd662dc7da3b6155e0652158465ee7781f6 Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Tue, 30 Sep 2025 18:20:45 -0300 Subject: [PATCH] feat: minor prompt redesign (#20045) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When I navigate to tasks, the prompt doesn’t feel prominent enough—even though it should be the primary element on the screen. To give it more focus, I made some small design changes. Here are both versions: **Before:** Screenshot 2025-09-30 at 12 10 58 **After:** Screenshot 2025-09-30 at 12 10 46 --- site/src/pages/TasksPage/TaskPrompt.tsx | 144 ++++++++++++------------ 1 file changed, 73 insertions(+), 71 deletions(-) diff --git a/site/src/pages/TasksPage/TaskPrompt.tsx b/site/src/pages/TasksPage/TaskPrompt.tsx index 2de93005ae..c08f0ee8a7 100644 --- a/site/src/pages/TasksPage/TaskPrompt.tsx +++ b/site/src/pages/TasksPage/TaskPrompt.tsx @@ -1,3 +1,4 @@ +import type { SelectTriggerProps } from "@radix-ui/react-select"; import { API } from "api/api"; import { getErrorDetail, getErrorMessage } from "api/errors"; import { templateVersionPresets } from "api/queries/templates"; @@ -29,15 +30,16 @@ import { } from "components/Tooltip/Tooltip"; import { useAuthenticated } from "hooks/useAuthenticated"; import { useExternalAuth } from "hooks/useExternalAuth"; -import { RedoIcon, RotateCcwIcon, SendIcon } from "lucide-react"; +import { ArrowUpIcon, RedoIcon, RotateCcwIcon } from "lucide-react"; import { AI_PROMPT_PARAMETER_NAME } from "modules/tasks/tasks"; import { type FC, useEffect, useState } from "react"; import { useMutation, useQuery, useQueryClient } from "react-query"; -import TextareaAutosize from "react-textarea-autosize"; +import TextareaAutosize, { + type TextareaAutosizeProps, +} from "react-textarea-autosize"; +import { cn } from "utils/cn"; import { docs } from "utils/docs"; -const textareaPlaceholder = "Prompt your AI agent to start a task..."; - type TaskPromptProps = { templates: Template[] | undefined; error: unknown; @@ -92,23 +94,14 @@ const TaskPromptLoadingError: FC<{ const TaskPromptSkeleton: FC = () => { return ( -
-
- {/* Textarea skeleton */} - +
+ {/* Textarea skeleton */} + - {/* Bottom controls skeleton */} -
- - -
+ {/* Bottom controls skeleton */} +
+ +
); @@ -225,7 +218,7 @@ const CreateTaskForm: FC = ({ templates, onSuccess }) => { {externalAuthError && }
-
-
+
-
- {isLoadingPresets ? ( -
- +
+ + {isLoadingPresets ? ( -
- ) : ( - presets && - presets.length > 0 && ( -
- + ) : ( + presets && + presets.length > 0 && ( -
- ) - )} + ) + )} +
@@ -340,7 +306,12 @@ const CreateTaskForm: FC = ({ templates, onSuccess }) => { /> )} -
@@ -359,6 +330,23 @@ const CreateTaskForm: FC = ({ templates, onSuccess }) => { ); }; +const PromptSelectTrigger: FC = ({ + className, + ...props +}) => { + return ( + + ); +}; + type ExternalAuthButtonProps = { template: Template; missedExternalAuth: TemplateVersionExternalAuth[]; @@ -379,7 +367,7 @@ const ExternalAuthButtons: FC = ({ return (