feat: UI improvements (#265)

* cr

* cr
This commit is contained in:
Brace Sproul 2025-06-19 12:49:25 -07:00 • committed by GitHub
parent 42f67464bc
commit 530c62da40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 10 deletions

View file

@ -136,13 +136,13 @@ export function TerminalInput({
onKeyDown={handleKeyPress} onKeyDown={handleKeyPress}
placeholder={placeholder} placeholder={placeholder}
disabled={disabled} disabled={disabled}
className="text-foreground placeholder:text-muted-foreground min-h-[40px] flex-1 resize-none border-none bg-transparent p-0 font-mono text-xs focus-visible:ring-0 focus-visible:ring-offset-0" className="text-foreground placeholder:text-muted-foreground min-h-[40px] flex-1 resize-none border-none bg-transparent p-0 font-mono text-xs shadow-none focus-visible:ring-0 focus-visible:ring-offset-0"
rows={3} rows={3}
onPaste={onPaste} onPaste={onPaste}
/> />
<Button <Button
onClick={handleSend} onClick={handleSend}
disabled={disabled || !message.trim()} disabled={disabled || !message.trim() || !selectedRepository}
size="sm" size="sm"
className="bg-muted-foreground/20 hover:bg-muted-foreground/30 h-7 w-7 self-end p-0 dark:bg-gray-700 hover:dark:bg-gray-600" className="bg-muted-foreground/20 hover:bg-muted-foreground/30 h-7 w-7 self-end p-0 dark:bg-gray-700 hover:dark:bg-gray-600"
> >

View file

@ -88,7 +88,7 @@ export function ThreadView({
</Button> </Button>
<div className="flex min-w-0 flex-1 items-center gap-2"> <div className="flex min-w-0 flex-1 items-center gap-2">
<div <div
className={`h-2 w-2 rounded-full ${ className={`size-2 flex-shrink-0 rounded-full ${
displayThread.status === "running" displayThread.status === "running"
? "bg-blue-500" ? "bg-blue-500"
: displayThread.status === "completed" : displayThread.status === "completed"
@ -96,14 +96,18 @@ export function ThreadView({
: "bg-red-500" : "bg-red-500"
}`} }`}
></div> ></div>
<span className="text-muted-foreground truncate font-mono text-sm"> <span className="text-muted-foreground max-w-[500px] truncate font-mono text-sm">
{displayThread.title} {displayThread.title}
</span> </span>
<span className="text-muted-foreground text-xs">•</span> {displayThread.repository && (
<GitBranch className="text-muted-foreground h-3 w-3" /> <>
<span className="text-muted-foreground truncate text-xs"> <span className="text-muted-foreground text-xs">•</span>
{displayThread.repository} <GitBranch className="text-muted-foreground h-3 w-3" />
</span> <span className="text-muted-foreground truncate text-xs">
{displayThread.repository}
</span>
</>
)}
</div> </div>
<ThreadSwitcher <ThreadSwitcher
currentThread={displayThread} currentThread={displayThread}
@ -222,6 +226,11 @@ export function ThreadView({
runId={programmerSession.runId} runId={programmerSession.runId}
/> />
)} )}
{!programmerSession && (
<div className="text-muted-foreground text-xs">
No programmer session
</div>
)}
</CardContent> </CardContent>
</Card> </Card>
</TabsContent> </TabsContent>

View file

@ -77,7 +77,9 @@ export function threadToDisplayInfo(
status: uiStatus, status: uiStatus,
lastActivity, lastActivity,
taskCount: values?.taskPlan?.tasks.length ?? 0, taskCount: values?.taskPlan?.tasks.length ?? 0,
repository: `${values?.targetRepository.owner}/${values?.targetRepository.repo}`, repository: values?.targetRepository
? `${values.targetRepository.owner}/${values.targetRepository.repo}`
: "",
branch: values?.targetRepository.branch || "main", branch: values?.targetRepository.branch || "main",
githubIssue: values?.githubIssueId githubIssue: values?.githubIssueId
? { ? {