Skip to content

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

Align task property icons with assignee avatars (#13319)

Dotta7e0f051d3b8b
diff --git a/ui/src/components/IssueProperties.test.tsx b/ui/src/components/IssueProperties.test.tsx
index 6d4ef3258f..69e36f8bcc 100644
--- a/ui/src/components/IssueProperties.test.tsx
+++ b/ui/src/components/IssueProperties.test.tsx
@@ -130,8 +130,8 @@ vi.mock("../lib/assignees", () => ({
}));
vi.mock("./StatusIcon", () => ({
- StatusIcon: ({ status, blockerAttention }: { status: string; blockerAttention?: Issue["blockerAttention"] }) => (
- <span data-status-icon-state={blockerAttention?.state}>{status}</span>
+ StatusIcon: ({ status, blockerAttention, className, glyphContainerClassName, size }: { status: string; blockerAttention?: Issue["blockerAttention"]; className?: string; glyphContainerClassName?: string; size?: string }) => (
+ <span className={className} data-glyph-container-class={glyphContainerClassName} data-testid="status-icon" data-size={size} data-status-icon-state={blockerAttention?.state}>{status}</span>
),
}));
@@ -527,6 +527,12 @@ describe("IssueProperties", () => {
expect(surface?.classList).toContain("pl-4");
expect(surface?.querySelectorAll('[data-property-section="true"]').length).toBeGreaterThan(1);
expect(surface?.querySelector('[data-property-value="true"]')).not.toBeNull();
+ const statusVisual = surface?.querySelector(
+ '[data-property-label="Status"] + [data-property-value="true"] [data-testid="status-icon"]',
+ );
+ expect(statusVisual).not.toBeNull();
+ expect(statusVisual?.getAttribute("data-size")).toBeNull();
+ expect(statusVisual?.getAttribute("data-glyph-container-class")).toContain("size-6");
expect(surface?.querySelector('[data-property-section="true"] > div')?.classList)
.toContain("text-muted-foreground/70");
const projectLabel = surface?.querySelector('[data-property-label="Project"]');
diff --git a/ui/src/components/StatusIcon.test.tsx b/ui/src/components/StatusIcon.test.tsx
index 8b258b4d93..3c9dfc3218 100644
--- a/ui/src/components/StatusIcon.test.tsx
+++ b/ui/src/components/StatusIcon.test.tsx
@@ -108,6 +108,16 @@ describe("StatusIcon — glyph size (PAP-243a)", () => {
expect(html).toContain('width="16"');
expect(html).toContain('height="16"');
});
+
+ it("can place the default glyph in a larger layout footprint without resizing it", () => {
+ const html = renderToStaticMarkup(
+ <StatusIcon status="todo" glyphContainerClassName="size-6" showLabel />,
+ );
+ expect(html).toContain('data-status-glyph-container="true"');
+ expect(html).toContain('class="size-6"');
+ expect(html).toContain('width="16"');
+ expect(html).toContain('height="16"');
+ });
});
diff --git a/ui/src/components/StatusIcon.tsx b/ui/src/components/StatusIcon.tsx
index e84fb6bf53..30f90f0401 100644
--- a/ui/src/components/StatusIcon.tsx
+++ b/ui/src/components/StatusIcon.tsx
@@ -17,6 +17,8 @@ interface StatusIconProps {
blockerAttention?: IssueBlockerAttention | null;
onChange?: (status: string) => void;
className?: string;
+ /** Optional layout wrapper around the glyph. Does not change glyph dimensions. */
+ glyphContainerClassName?: string;
showLabel?: boolean;
/** Glyph size (PAP-243a). Default `md` (16px); lists/detail/mentions use `lg` (20px). */
size?: StatusGlyphSize;
@@ -76,14 +78,14 @@ function blockedAttentionLabel(blockerAttention: IssueBlockerAttention | null |
* glyph — the blocked shape recoloured blue — while the full blocked reason
* still rides on the accessible label.
*/
-export function StatusIcon({ status, externalConversationState, blockerAttention, onChange, className, showLabel, size = "md" }: StatusIconProps) {
+export function StatusIcon({ status, externalConversationState, blockerAttention, onChange, className, glyphContainerClassName, showLabel, size = "md" }: StatusIconProps) {
const [open, setOpen] = useState(false);
const displayStatus = status === "in_review" && externalConversationState === "waiting" ? "idle" : status;
const isCoveredBlocked = status === "blocked" && blockerAttention?.state === "covered";
const ariaLabel = status === "blocked" ? blockedAttentionLabel(blockerAttention) : statusLabel(displayStatus);
const glyphStatus = isCoveredBlocked ? "in_queue" : displayStatus;
- const glyph = (
+ const glyphIcon = (
<StatusGlyph
status={glyphStatus}
size={size}
@@ -91,6 +93,11 @@ export function StatusIcon({ status, externalConversationState, blockerAttention
title={ariaLabel}
/>
);
+ const glyph = glyphContainerClassName ? (
+ <span className={glyphContainerClassName} data-status-glyph-container="true">
+ {glyphIcon}
+ </span>
+ ) : glyphIcon;
if (!onChange) {
return showLabel ? (
diff --git a/ui/src/components/issue-properties/IssueProperties.tsx b/ui/src/components/issue-properties/IssueProperties.tsx
index aa21568cdc..510a3ad0d3 100644
--- a/ui/src/components/issue-properties/IssueProperties.tsx
+++ b/ui/src/components/issue-properties/IssueProperties.tsx
@@ -1947,7 +1947,7 @@ export function IssueProperties({
<ProjectTile
color={issueProject?.color ?? null}
icon={issueProject?.icon ?? null}
- size="xs"
+ size="sm"
/>
<span className="text-sm truncate min-w-0" title={projectName(issue.projectId)}>{projectName(issue.projectId)}</span>
</>
@@ -2334,8 +2334,9 @@ export function IssueProperties({
>
<PropertyRow label="Status">
<StatusIcon
- status={issue.status} externalConversationState={issue.externalConversationState}
- className="size-3"
+ status={issue.status}
+ externalConversationState={issue.externalConversationState}
+ glyphContainerClassName="inline-flex size-6 shrink-0 items-center justify-center"
blockerAttention={issue.blockerAttention}
onChange={(status) => onUpdate({ status })}
showLabel