Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

merge: resolve conflict with main (import useModalStore)

Naiyuan Qingb3fa5557ca96
diff --cc apps/web/features/issues/components/issue-detail.tsx
index da21eb56bd,3ef8a2bdde..be163d507b
--- a/apps/web/features/issues/components/issue-detail.tsx
+++ b/apps/web/features/issues/components/issue-detail.tsx
@@@ -75,8 -76,62 +76,63 @@@ import { useIssueReactions } from "@/fe
import { useIssueSubscribers } from "@/features/issues/hooks/use-issue-subscribers";
import { ReactionBar } from "@/components/common/reaction-bar";
import { useFileUpload } from "@/shared/hooks/use-file-upload";
+import { api } from "@/shared/api";
+ import { useModalStore } from "@/features/modals";
import { timeAgo } from "@/shared/utils";
+ import { cn } from "@/lib/utils";
+
+ /**
+ * Tiny circular progress ring used in the "Sub-issue of …" line and the
+ * Sub-issues section header. Renders an open ring when in-progress and
+ * fills to a solid arc when complete.
+ */
+ function ProgressRing({
+ done,
+ total,
+ size = 12,
+ }: {
+ done: number;
+ total: number;
+ size?: number;
+ }) {
+ const stroke = 1.5;
+ const radius = (size - stroke) / 2;
+ const circumference = 2 * Math.PI * radius;
+ const ratio = total > 0 ? Math.min(done / total, 1) : 0;
+ const offset = circumference * (1 - ratio);
+ const isComplete = total > 0 && done >= total;
+ return (
+ <svg
+ width={size}
+ height={size}
+ viewBox={`0 0 ${size} ${size}`}
+ className={isComplete ? "text-info" : "text-primary"}
+ aria-hidden="true"
+ >
+ <circle
+ cx={size / 2}
+ cy={size / 2}
+ r={radius}
+ fill="none"
+ stroke="currentColor"
+ strokeOpacity="0.25"
+ strokeWidth={stroke}
+ />
+ <circle
+ cx={size / 2}
+ cy={size / 2}
+ r={radius}
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={stroke}
+ strokeDasharray={circumference}
+ strokeDashoffset={offset}
+ strokeLinecap="round"
+ transform={`rotate(-90 ${size / 2} ${size / 2})`}
+ />
+ </svg>
+ );
+ }
function shortDate(date: string | null): string {
if (!date) return "—";