Skip to content

The open-source app everyone uses to manage agents at work

fix(ui): mobile viewport, scrollable popovers, and actor labels

Forgottend2f9ade30c1e
diff --git a/ui/index.html b/ui/index.html
index 8f0a47e3bc..3a033cb4a9 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -2,7 +2,7 @@
<html lang="en" class="dark">
<head>
<meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
<meta name="theme-color" content="#18181b" />
<title>Paperclip</title>
<link rel="icon" href="/favicon.ico" sizes="48x48" />
diff --git a/ui/src/api/health.ts b/ui/src/api/health.ts
index 272896d33d..991ef94621 100644
--- a/ui/src/api/health.ts
+++ b/ui/src/api/health.ts
@@ -13,7 +13,8 @@ export const healthApi = {
headers: { Accept: "application/json" },
});
if (!res.ok) {
- throw new Error(`Failed to load health (${res.status})`);
+ const payload = await res.json().catch(() => null) as { error?: string } | null;
+ throw new Error(payload?.error ?? `Failed to load health (${res.status})`);
}
return res.json();
},
diff --git a/ui/src/components/ActivityRow.tsx b/ui/src/components/ActivityRow.tsx
index 68fcc9ca0f..35c55f0ef9 100644
--- a/ui/src/components/ActivityRow.tsx
+++ b/ui/src/components/ActivityRow.tsx
@@ -101,12 +101,13 @@ export function ActivityRow({ event, agentMap, entityNameMap, className }: Activ
: entityLink(event.entityType, event.entityId, name);
const actor = event.actorType === "agent" ? agentMap.get(event.actorId) : null;
+ const actorName = actor?.name ?? (event.actorType === "system" ? "System" : event.actorType === "user" ? "Board" : event.actorId || "Unknown");
const inner = (
<div className="flex gap-3">
<p className="flex-1 min-w-0">
<Identity
- name={actor?.name ?? (event.actorType === "system" ? "System" : event.actorId || "You")}
+ name={actorName}
size="xs"
className="align-baseline"
/>
diff --git a/ui/src/components/IssueProperties.tsx b/ui/src/components/IssueProperties.tsx
index efa0825eee..ffc3d7d63f 100644
--- a/ui/src/components/IssueProperties.tsx
+++ b/ui/src/components/IssueProperties.tsx
@@ -106,35 +106,37 @@ export function IssueProperties({ issue, onUpdate }: IssuePropertiesProps) {
onChange={(e) => setAssigneeSearch(e.target.value)}
autoFocus
/>
- <button
- className={cn(
- "flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
- !issue.assigneeAgentId && "bg-accent"
- )}
- onClick={() => { onUpdate({ assigneeAgentId: null }); setAssigneeOpen(false); }}
- >
- No assignee
- </button>
- {(agents ?? [])
- .filter((a) => a.status !== "terminated")
- .filter((a) => {
- if (!assigneeSearch.trim()) return true;
- const q = assigneeSearch.toLowerCase();
- return a.name.toLowerCase().includes(q);
- })
- .map((a) => (
+ <div className="max-h-48 overflow-y-auto overscroll-contain">
<button
- key={a.id}
className={cn(
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
- a.id === issue.assigneeAgentId && "bg-accent"
+ !issue.assigneeAgentId && "bg-accent"
)}
- onClick={() => { onUpdate({ assigneeAgentId: a.id }); setAssigneeOpen(false); }}
+ onClick={() => { onUpdate({ assigneeAgentId: null }); setAssigneeOpen(false); }}
>
- <AgentIcon icon={a.icon} className="shrink-0 h-3 w-3 text-muted-foreground" />
- {a.name}
+ No assignee
</button>
- ))}
+ {(agents ?? [])
+ .filter((a) => a.status !== "terminated")
+ .filter((a) => {
+ if (!assigneeSearch.trim()) return true;
+ const q = assigneeSearch.toLowerCase();
+ return a.name.toLowerCase().includes(q);
+ })
+ .map((a) => (
+ <button
+ key={a.id}
+ className={cn(
+ "flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
+ a.id === issue.assigneeAgentId && "bg-accent"
+ )}
+ onClick={() => { onUpdate({ assigneeAgentId: a.id }); setAssigneeOpen(false); }}
+ >
+ <AgentIcon icon={a.icon} className="shrink-0 h-3 w-3 text-muted-foreground" />
+ {a.name}
+ </button>
+ ))}
+ </div>
</PopoverContent>
</Popover>
{issue.assigneeAgentId && (
@@ -176,37 +178,39 @@ export function IssueProperties({ issue, onUpdate }: IssuePropertiesProps) {
onChange={(e) => setProjectSearch(e.target.value)}
autoFocus
/>
- <button
- className={cn(
- "flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50 whitespace-nowrap",
- !issue.projectId && "bg-accent"
- )}
- onClick={() => { onUpdate({ projectId: null }); setProjectOpen(false); }}
- >
- No project
- </button>
- {(projects ?? [])
- .filter((p) => {
- if (!projectSearch.trim()) return true;
- const q = projectSearch.toLowerCase();
- return p.name.toLowerCase().includes(q);
- })
- .map((p) => (
+ <div className="max-h-48 overflow-y-auto overscroll-contain">
<button
- key={p.id}
className={cn(
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50 whitespace-nowrap",
- p.id === issue.projectId && "bg-accent"
+ !issue.projectId && "bg-accent"
)}
- onClick={() => { onUpdate({ projectId: p.id }); setProjectOpen(false); }}
+ onClick={() => { onUpdate({ projectId: null }); setProjectOpen(false); }}
>
- <span
- className="shrink-0 h-3 w-3 rounded-sm"
- style={{ backgroundColor: p.color ?? "#6366f1" }}
- />
- {p.name}
+ No project
</button>
- ))}
+ {(projects ?? [])
+ .filter((p) => {
+ if (!projectSearch.trim()) return true;
+ const q = projectSearch.toLowerCase();
+ return p.name.toLowerCase().includes(q);
+ })
+ .map((p) => (
+ <button
+ key={p.id}
+ className={cn(
+ "flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50 whitespace-nowrap",
+ p.id === issue.projectId && "bg-accent"
+ )}
+ onClick={() => { onUpdate({ projectId: p.id }); setProjectOpen(false); }}
+ >
+ <span
+ className="shrink-0 h-3 w-3 rounded-sm"
+ style={{ backgroundColor: p.color ?? "#6366f1" }}
+ />
+ {p.name}
+ </button>
+ ))}
+ </div>
</PopoverContent>
</Popover>
{issue.projectId && (
diff --git a/ui/src/components/IssuesList.tsx b/ui/src/components/IssuesList.tsx
index b62698f1f7..c99c9b7cb9 100644
--- a/ui/src/components/IssuesList.tsx
+++ b/ui/src/components/IssuesList.tsx
@@ -214,7 +214,7 @@ export function IssuesList({
<span className="hidden sm:inline">New Issue</span>
</Button>
- <div className="flex items-center gap-0.5 sm:gap-1">
+ <div className="flex items-center gap-0.5 sm:gap-1 shrink-0">
{/* Filter */}
<Popover>
<PopoverTrigger asChild>
diff --git a/ui/src/components/NewIssueDialog.tsx b/ui/src/components/NewIssueDialog.tsx
index 1649d882f4..123802cdbc 100644
--- a/ui/src/components/NewIssueDialog.tsx
+++ b/ui/src/components/NewIssueDialog.tsx
@@ -396,35 +396,37 @@ export function NewIssueDialog() {
onChange={(e) => setAssigneeSearch(e.target.value)}
autoFocus
/>
- <button
- className={cn(
- "flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
- !assigneeId && "bg-accent"
- )}
- onClick={() => { setAssigneeId(""); setAssigneeOpen(false); }}
- >
- No assignee
- </button>
- {(agents ?? [])
- .filter((a) => a.status !== "terminated")
- .filter((a) => {
- if (!assigneeSearch.trim()) return true;
- const q = assigneeSearch.toLowerCase();
- return a.name.toLowerCase().includes(q);
- })
- .map((a) => (
+ <div className="max-h-48 overflow-y-auto overscroll-contain">
<button
- key={a.id}
className={cn(
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
- a.id === assigneeId && "bg-accent"
+ !assigneeId && "bg-accent"
)}
- onClick={() => { setAssigneeId(a.id); setAssigneeOpen(false); }}
+ onClick={() => { setAssigneeId(""); setAssigneeOpen(false); }}
>
- <AgentIcon icon={a.icon} className="shrink-0 h-3 w-3 text-muted-foreground" />
- {a.name}
+ No assignee
</button>
- ))}
+ {(agents ?? [])
+ .filter((a) => a.status !== "terminated")
+ .filter((a) => {
+ if (!assigneeSearch.trim()) return true;
+ const q = assigneeSearch.toLowerCase();
+ return a.name.toLowerCase().includes(q);
+ })
+ .map((a) => (
+ <button
+ key={a.id}
+ className={cn(
+ "flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
+ a.id === assigneeId && "bg-accent"
+ )}
+ onClick={() => { setAssigneeId(a.id); setAssigneeOpen(false); }}
+ >
+ <AgentIcon icon={a.icon} className="shrink-0 h-3 w-3 text-muted-foreground" />
+ {a.name}
+ </button>
+ ))}
+ </div>
</PopoverContent>
</Popover>
@@ -449,31 +451,33 @@ export function NewIssueDialog() {
</button>
</PopoverTrigger>
<PopoverContent className="w-fit min-w-[11rem] p-1" align="start">
- <button
- className={cn(
- "flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50 whitespace-nowrap",
- !projectId && "bg-accent"
- )}
- onClick={() => { setProjectId(""); setProjectOpen(false); }}
- >
- No project
- </button>
- {(projects ?? []).map((p) => (
+ <div className="max-h-48 overflow-y-auto overscroll-contain">
<button
- key={p.id}
className={cn(
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50 whitespace-nowrap",
- p.id === projectId && "bg-accent"
+ !projectId && "bg-accent"
)}
- onClick={() => { setProjectId(p.id); setProjectOpen(false); }}
+ onClick={() => { setProjectId(""); setProjectOpen(false); }}
>
- <span
- className="shrink-0 h-3 w-3 rounded-sm"
- style={{ backgroundColor: p.color ?? "#6366f1" }}
- />
- {p.name}
+ No project
</button>
- ))}
+ {(projects ?? []).map((p) => (
+ <button
+ key={p.id}
+ className={cn(
+ "flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50 whitespace-nowrap",
+ p.id === projectId && "bg-accent"
+ )}
+ onClick={() => { setProjectId(p.id); setProjectOpen(false); }}
+ >
+ <span
+ className="shrink-0 h-3 w-3 rounded-sm"
+ style={{ backgroundColor: p.color ?? "#6366f1" }}
+ />
+ {p.name}
+ </button>
+ ))}
+ </div>
</PopoverContent>
</Popover>
diff --git a/ui/src/context/LiveUpdatesProvider.tsx b/ui/src/context/LiveUpdatesProvider.tsx
index 19bd0fbc50..9a271febd6 100644
--- a/ui/src/context/LiveUpdatesProvider.tsx
+++ b/ui/src/context/LiveUpdatesProvider.tsx
@@ -39,18 +39,6 @@ function truncate(text: string, max: number): string {
return text.slice(0, max - 1) + "\u2026";
}
-function looksLikeUuid(value: string): boolean {
- return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value);
-}
-
-function titleCase(value: string): string {
- return value
- .split(" ")
- .filter((part) => part.length > 0)
- .map((part) => part[0]!.toUpperCase() + part.slice(1))
- .join(" ");
-}
-
function resolveActorLabel(
queryClient: QueryClient,
companyId: string,
@@ -62,8 +50,7 @@ function resolveActorLabel(
}
if (actorType === "system") return "System";
if (actorType === "user" && actorId) {
- if (looksLikeUuid(actorId)) return `User ${shortId(actorId)}`;
- return titleCase(actorId.replace(/[_-]+/g, " "));
+ return "Board";
}
return "Someone";
}
diff --git a/ui/src/pages/IssueDetail.tsx b/ui/src/pages/IssueDetail.tsx
index e88f3557a6..043909b846 100644
--- a/ui/src/pages/IssueDetail.tsx
+++ b/ui/src/pages/IssueDetail.tsx
@@ -110,7 +110,8 @@ function ActorIdentity({ evt, agentMap }: { evt: ActivityEvent; agentMap: Map<st
return <Identity name={agent?.name ?? id.slice(0, 8)} size="sm" />;
}
if (evt.actorType === "system") return <Identity name="System" size="sm" />;
- return <Identity name={id || "You"} size="sm" />;
+ if (evt.actorType === "user") return <Identity name="Board" size="sm" />;
+ return <Identity name={id || "Unknown"} size="sm" />;
}
export function IssueDetail() {