Skip to content

Commit 55251f7

Browse files
Copilottomek-iUsername-must-be-unique
authored
XS⚠️ ◾ feat: Add context descriptions and source badges to prompt selection screen (#773)
* Initial plan * feat: add context descriptions to prompt selection screen - Improve PromptSelectionDialog confirm view title and description to explain what prompts are and what happens when confirmed - Improve PromptSelectionDialog select view title and description to clarify prompt purpose and local vs portal distinction - Replace plain-text source indicators with Badge components for clearer visual communication in both dialog views - Update CustomPromptManager description to explain the active prompt role and that it can be overridden at runtime Co-authored-by: tomek-i <3699937+tomek-i@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Thomas Iwainski <Tomek.iwainski@gmail.com> * Update PromptSelectionDialog.tsx --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tomek-i <3699937+tomek-i@users.noreply.github.com> Co-authored-by: Thomas Iwainski <Tomek.iwainski@gmail.com> Co-authored-by: Tom Iwainski <tomiwainski@ssw.com.au>
1 parent 2645c36 commit 55251f7

File tree

2 files changed

+30
-21
lines changed

2 files changed

+30
-21
lines changed

src/ui/src/components/settings/custom-prompt/CustomPromptManager.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ export function CustomPromptSettingsPanel({
231231
<header className="flex flex-col gap-1">
232232
<h2 className="text-xl font-semibold">Custom Prompt Manager</h2>
233233
<p className="text-muted-foreground text-sm">
234-
Manage your saved prompts and choose which one YakShaver should use.
234+
Manage your prompt templates. The active prompt is the default template YakShaver uses
235+
when writing issues from your recordings.
235236
</p>
236237
</header>
237238
<ScrollArea className="flex-1">

src/ui/src/components/workflow/PromptSelectionDialog.tsx

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
AlertDialogHeader,
1313
AlertDialogTitle,
1414
} from "../ui/alert-dialog";
15+
import { Badge } from "../ui/badge";
1516
import { Button } from "../ui/button";
1617
import { Input } from "../ui/input";
1718
import { ScrollArea } from "../ui/scroll-area";
@@ -131,20 +132,21 @@ export function PromptSelectionDialog({
131132
{view === "confirm" ? (
132133
<>
133134
<AlertDialogHeader>
134-
<AlertDialogTitle>Confirm Project Prompt Selection</AlertDialogTitle>
135+
<AlertDialogTitle>Confirm Prompt Selection</AlertDialogTitle>
135136
<AlertDialogDescription>
136-
YakShaver has selected a Project prompt for this video. Do you want to proceed with
137-
this prompt?
137+
YakShaver analysed your video and selected the most relevant prompt template below.
138+
Prompts control how your issue is written — confirm to proceed, or switch to a
139+
different one.
138140
</AlertDialogDescription>
139141
</AlertDialogHeader>
140142

141143
<div className="bg-secondary/20 p-4 rounded-md space-y-2 mt-2">
142-
<h3 className="font-medium text-lg text-primary">
143-
{initialProject.name}{" "}
144-
<span className="text-secondary-foreground/60 text-sm font-normal">
145-
({initialProject.source === "local" ? "local prompt" : "portal prompt"})
146-
</span>
147-
</h3>
144+
<div className="flex items-center gap-2 flex-wrap">
145+
<h3 className="font-medium text-lg text-primary">{initialProject.name}</h3>
146+
<Badge variant="outline">
147+
{initialProject.source === "local" ? "local" : "portal"}
148+
</Badge>
149+
</div>
148150
{initialProject.description && (
149151
<p className="text-sm text-muted-foreground">{initialProject.description}</p>
150152
)}
@@ -194,9 +196,14 @@ export function PromptSelectionDialog({
194196
) : (
195197
<>
196198
<AlertDialogHeader>
197-
<AlertDialogTitle>Select a Prompt for your project</AlertDialogTitle>
199+
<AlertDialogTitle>Select a Prompt</AlertDialogTitle>
198200
<AlertDialogDescription>
199-
Search and select the correct prompt for this video.
201+
Prompts are templates that control how YakShaver writes your issue. Select the one
202+
that best fits your project.{" "}
203+
<span className="text-foreground/60">
204+
Local prompts are saved on your device; portal prompts are synced from YakShaver
205+
Portal.
206+
</span>
200207
</AlertDialogDescription>
201208
</AlertDialogHeader>
202209

@@ -230,17 +237,18 @@ export function PromptSelectionDialog({
230237
}`}
231238
onClick={() => setTempSelectedProjectId(project.id)}
232239
>
233-
<div className="font-medium">
234-
{project.name}{" "}
235-
<span
236-
className={`text-xs font-normal ${
240+
<div className="flex items-center gap-2 flex-wrap">
241+
<span className="font-medium">{project.name}</span>
242+
<Badge
243+
variant="outline"
244+
className={
237245
tempSelectedProjectId === project.id
238-
? "text-primary-foreground/80"
239-
: "text-muted-foreground"
240-
}`}
246+
? "border-primary-foreground/40 text-primary-foreground/80"
247+
: undefined
248+
}
241249
>
242-
({project.source === "local" ? "local prompt" : "portal prompt"})
243-
</span>
250+
{project.source === "local" ? "local" : "portal"}
251+
</Badge>
244252
</div>
245253
{project.description && (
246254
<div

0 commit comments

Comments
 (0)