π OpenHands: AI-Driven Development
refactor(frontend): replace loading spinner with static icon for task tracking (#13625)
Hiep Le5528b01c1869
diff --git a/frontend/src/components/features/chat/task-tracking/task-item.tsx b/frontend/src/components/features/chat/task-tracking/task-item.tsxindex 796187a1a5..d101884260 100644--- a/frontend/src/components/features/chat/task-tracking/task-item.tsx+++ b/frontend/src/components/features/chat/task-tracking/task-item.tsx@@ -2,7 +2,7 @@ import { useMemo } from "react";import { useTranslation } from "react-i18next";import CircleIcon from "#/icons/u-circle.svg?react";import CheckCircleIcon from "#/icons/u-check-circle.svg?react";-import LoadingIcon from "#/icons/loading.svg?react";+import CheckCircleHalfIcon from "#/icons/u-check-circle-half.svg?react";import { I18nKey } from "#/i18n/declaration";import { cn } from "#/utils/utils";import { Typography } from "#/ui/typography";@@ -24,7 +24,7 @@ export function TaskItem({ task }: TaskItemProps) {case "todo":return <CircleIcon className="w-4 h-4 text-[#ffffff]" />;case "in_progress":- return <LoadingIcon className="w-4 h-4 text-[#ffffff] animate-spin" />;+ return <CheckCircleHalfIcon className="w-4 h-4 text-[#ffffff]" />;case "done":return <CheckCircleIcon className="w-4 h-4 text-[#A3A3A3]" />;default:diff --git a/frontend/src/components/v1/chat/task-tracking/task-item.tsx b/frontend/src/components/v1/chat/task-tracking/task-item.tsxindex a50d58a95a..1b4b386fb3 100644--- a/frontend/src/components/v1/chat/task-tracking/task-item.tsx+++ b/frontend/src/components/v1/chat/task-tracking/task-item.tsx@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";import { TaskItem as TaskItemType } from "#/types/v1/core/base/common";import CircleIcon from "#/icons/u-circle.svg?react";import CheckCircleIcon from "#/icons/u-check-circle.svg?react";-import LoadingIcon from "#/icons/loading.svg?react";+import CheckCircleHalfIcon from "#/icons/u-check-circle-half.svg?react";import { cn } from "#/utils/utils";import { Typography } from "#/ui/typography";import { I18nKey } from "#/i18n/declaration";@@ -20,7 +20,7 @@ export function TaskItem({ task }: TaskItemProps) {case "todo":return <CircleIcon className="w-4 h-4 text-[#ffffff]" />;case "in_progress":- return <LoadingIcon className="w-4 h-4 text-[#ffffff] animate-spin" />;+ return <CheckCircleHalfIcon className="w-4 h-4 text-[#ffffff]" />;case "done":return <CheckCircleIcon className="w-4 h-4 text-[#A3A3A3]" />;default:diff --git a/frontend/src/icons/u-check-circle-half.svg b/frontend/src/icons/u-check-circle-half.svgnew file mode 100644index 0000000000..ed80d0eb7e--- /dev/null+++ b/frontend/src/icons/u-check-circle-half.svg@@ -0,0 +1,4 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">+ <path d="M5.79029 12.9507C5.69629 12.9042 5.59557 12.8843 5.50157 12.8843C5.25314 12.8843 5.01142 13.0238 4.89728 13.2562C4.72942 13.5883 4.87042 13.9868 5.20614 14.1462C5.30014 14.1927 5.40086 14.2127 5.50157 14.2127C5.75 14.2127 5.985 14.0732 6.10586 13.8407C6.15286 13.7477 6.17301 13.6481 6.17301 13.5551C6.17301 13.3027 6.03201 13.0636 5.79029 12.9507ZM13.3641 12.3463C13.3641 12.3463 13.3909 12.333 13.3977 12.3198C13.4178 12.2998 13.4312 12.2733 13.4447 12.2533C13.4245 12.2865 13.3977 12.3198 13.3641 12.3463ZM3.91698 11.463C3.7827 11.2969 3.58798 11.2106 3.39326 11.2106C3.24555 11.2106 3.09783 11.2637 2.97697 11.3567C2.68154 11.5892 2.63454 12.0076 2.86283 12.2932C2.99712 12.4592 3.19183 12.5456 3.39326 12.5456C3.54098 12.5456 3.68869 12.4924 3.80955 12.3995C3.97741 12.2666 4.0647 12.074 4.0647 11.8814C4.0647 11.7353 4.0177 11.5892 3.91698 11.463ZM2.88297 9.32433C2.80911 9.01881 2.53382 8.80627 2.23168 8.80627C2.18468 8.80627 2.13096 8.81291 2.07725 8.8262C1.71467 8.9059 1.48638 9.26455 1.56696 9.61657C1.64081 9.92873 1.9161 10.1346 2.22496 10.1346C2.27196 10.1346 2.32568 10.1346 2.37268 10.1213C2.68825 10.0549 2.8964 9.77597 2.8964 9.47045C2.8964 9.42395 2.8964 9.37082 2.88297 9.32433ZM2.37939 6.15621C2.33239 6.14293 2.27868 6.14293 2.23168 6.14293C1.92282 6.14293 1.64753 6.34218 1.57367 6.65434C1.4931 7.013 1.71467 7.36501 2.07725 7.45135C2.13096 7.46464 2.17796 7.47128 2.22496 7.47128C2.53382 7.47128 2.80911 7.25874 2.88297 6.95322C2.8964 6.90673 2.8964 6.8536 2.8964 6.8071C2.8964 6.50158 2.69497 6.22263 2.37939 6.15621ZM3.82298 3.87809C3.70212 3.78511 3.55441 3.73197 3.40669 3.73197C3.20526 3.73197 3.01054 3.81831 2.87626 3.98436C2.64797 4.26995 2.69497 4.68838 2.98369 4.92085C3.10454 5.01383 3.25226 5.06696 3.39998 5.06696C3.59469 5.06696 3.79612 4.98062 3.9237 4.81458C4.02441 4.69503 4.07141 4.54227 4.07141 4.39615C4.07141 4.20354 3.99084 4.01093 3.82298 3.87809ZM6.11929 2.45011C6.00515 2.21101 5.76343 2.07153 5.50829 2.07153C5.41428 2.07153 5.31357 2.09146 5.21957 2.13795C4.88385 2.29735 4.74956 2.69586 4.90399 3.0213C5.02485 3.26041 5.25985 3.39988 5.50829 3.39988C5.609 3.39988 5.70972 3.37996 5.80372 3.33347C6.04543 3.22056 6.17972 2.98145 6.17972 2.73571C6.17972 2.63608 6.15958 2.5431 6.11929 2.45011Z" fill="currentColor"/>+ <path d="M14.8809 8.14215C14.8809 8.65356 14.8205 9.15834 14.7063 9.64983C14.5251 10.4269 14.2028 11.1708 13.7462 11.8482C13.6589 11.9811 13.5649 12.1073 13.4642 12.2268C13.4642 12.2401 13.4575 12.2468 13.444 12.2534C13.4239 12.2866 13.397 12.3198 13.3635 12.3464C12.7457 13.1102 11.9602 13.7212 11.0604 14.1529C11.047 14.1596 11.0269 14.1662 11.0134 14.1729C10.9194 14.2194 10.8187 14.2658 10.718 14.3057C9.90558 14.6378 9.01928 14.8105 8.1397 14.8105H8.11955C7.74355 14.8038 7.45483 14.5116 7.45483 14.1463C7.45483 13.781 7.75698 13.4821 8.12627 13.4821H8.14641C8.85142 13.4821 9.55643 13.3426 10.2077 13.077C11.047 12.7316 11.7789 12.187 12.3496 11.4896C12.4436 11.37 12.5443 11.2438 12.6316 11.111C12.9942 10.5664 13.256 9.97527 13.397 9.35095C13.397 9.33766 13.397 9.32438 13.397 9.31774C13.4843 8.93252 13.5313 8.54065 13.5313 8.14215C13.5313 7.43812 13.3903 6.75402 13.1218 6.10313C12.927 5.64485 12.6786 5.21978 12.3697 4.83455C12.2422 4.67515 12.1012 4.51575 11.9535 4.36963C11.4499 3.8715 10.859 3.47964 10.201 3.21397C9.55643 2.9483 8.86485 2.81546 8.16655 2.80882H8.13298C7.76369 2.80882 7.46155 2.50994 7.46155 2.14464C7.46155 1.77935 7.76369 1.48047 8.13298 1.48047H8.17327C9.05285 1.48711 9.90557 1.65315 10.7113 1.98524C10.8322 2.03838 10.953 2.08487 11.0672 2.14464C11.0806 2.15129 11.094 2.15793 11.1007 2.15793C11.7722 2.48337 12.3697 2.90845 12.9002 3.43314C13.0815 3.61247 13.256 3.80508 13.4172 4.00434C13.4239 4.01098 13.4239 4.01762 13.4306 4.02426C13.8133 4.49583 14.1222 5.02717 14.3639 5.59171C14.4982 5.91052 14.6056 6.24261 14.6795 6.57469C14.6929 6.62119 14.7063 6.66768 14.7131 6.71417C14.8205 7.17909 14.8742 7.6573 14.8742 8.14215H14.8809Z" fill="currentColor"/>+</svg>