From 81ab7a00bdff575008434f905a228a8cc83d9f9f Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Fri, 20 Feb 2026 19:42:14 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20docstrings=20to=20`auto-cl?= =?UTF-8?q?aude/015-consolidate-task-card-badge-density-with-expandabl`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docstrings generation was requested by @OBenner. * https://github.com/OBenner/Auto-Coding/pull/41#issuecomment-3936746894 The following files were modified: * `apps/frontend/src/renderer/components/TaskCard.tsx` --- apps/frontend/src/renderer/components/TaskCard.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/frontend/src/renderer/components/TaskCard.tsx b/apps/frontend/src/renderer/components/TaskCard.tsx index 0b9aff4d9..0b3d6c632 100644 --- a/apps/frontend/src/renderer/components/TaskCard.tsx +++ b/apps/frontend/src/renderer/components/TaskCard.tsx @@ -52,12 +52,24 @@ const CategoryIcon: Record = { // Defined outside component to avoid recreation on every render const STUCK_CHECK_SKIP_PHASES = ['complete', 'failed', 'planning'] as const; +/** + * Render the icon component associated with a task category. + * + * @param category - The task category whose icon should be rendered + * @returns The icon React element for the given category, or `null` if no icon exists + */ function renderCategoryIcon(category: TaskCategory) { const Icon = CategoryIcon[category]; if (!Icon) return null; return ; } +/** + * Determine whether stuck-checks should be skipped for a given execution phase. + * + * @param phase - The execution phase name, or `undefined` if not available. + * @returns `true` if the phase is listed in STUCK_CHECK_SKIP_PHASES (stuck checks should be skipped), `false` otherwise. + */ function shouldSkipStuckCheck(phase: string | undefined): boolean { return STUCK_CHECK_SKIP_PHASES.includes(phase as typeof STUCK_CHECK_SKIP_PHASES[number]); } @@ -701,4 +713,4 @@ export const TaskCard = memo(function TaskCard({ ); -}, taskCardPropsAreEqual); +}, taskCardPropsAreEqual); \ No newline at end of file