diff --git a/apps/web/src/components/contextChipParts.tsx b/apps/web/src/components/contextChipParts.tsx index 9f8fa9998b4e0053ccca8a6d2a5420625c932c96..f0a47b22e3c31db7f4c47fa4af1b4d1ce605f688 100644 --- a/apps/web/src/components/contextChipParts.tsx +++ b/apps/web/src/components/contextChipParts.tsx @@ -9,7 +9,7 @@ import { } from "react"; import { cn } from "~/lib/utils"; -import { PullRequestGlyph } from "~/components/pullRequest/pullRequestIcons"; +import { PULL_REQUEST_STATE_PRESENTATION } from "~/components/pullRequest/pullRequestIcons"; import { PierreEntryIcon } from "./chat/PierreEntryIcon"; import { COMPOSER_INLINE_CHIP_ICON_CLASS_NAME, @@ -123,6 +123,9 @@ export function PullRequestChip(props: { onOpen: (event: MouseEvent, url: string) => void; }) { const previewTarget = usePullRequestPreviewTarget(props.environmentId, props.metadata.url); + const displayState = + props.metadata.state === "open" && props.metadata.isDraft ? "draft" : props.metadata.state; + const StateIcon = PULL_REQUEST_STATE_PRESENTATION[displayState].Icon; const button = ( );