From 8324339c87b34f5bf4538f5f0214c215f90aa811 Mon Sep 17 00:00:00 2001 From: Max Mykal Date: Mon, 3 Apr 2023 14:10:14 -0700 Subject: [PATCH 1/3] split task component --- .../src/library/components/ide/ActivePlan.tsx | 43 +- .../library/components/plan/PlanWizard.tsx | 43 +- .../tasksOverview/TasksOverview.tsx | 501 ++++++++++++++++++ .../tasksProgress/TasksProgress.tsx | 202 ------- web/client/tailwind.config.js | 5 - 5 files changed, 560 insertions(+), 234 deletions(-) create mode 100644 web/client/src/library/components/tasksOverview/TasksOverview.tsx delete mode 100644 web/client/src/library/components/tasksProgress/TasksProgress.tsx diff --git a/web/client/src/library/components/ide/ActivePlan.tsx b/web/client/src/library/components/ide/ActivePlan.tsx index 54a1fe608f..8590f590a9 100644 --- a/web/client/src/library/components/ide/ActivePlan.tsx +++ b/web/client/src/library/components/ide/ActivePlan.tsx @@ -1,7 +1,7 @@ import { Popover, Transition } from '@headlessui/react' import { useQueryClient } from '@tanstack/react-query' import clsx from 'clsx' -import { lazy, Fragment, type MouseEvent } from 'react' +import { Fragment, type MouseEvent } from 'react' import { apiCancelPlanApply } from '~/api' import { useStoreContext } from '~/context/context' import { @@ -14,10 +14,7 @@ import { } from '~/context/plan' import { EnumSize, EnumVariant } from '~/types/enum' import { Button } from '../button/Button' - -const TasksProgress = lazy( - async () => await import('../tasksProgress/TasksProgress'), -) +import TasksOverview from '../tasksOverview/TasksOverview' export default function ActivePlan({ plan, @@ -67,15 +64,33 @@ export default function ActivePlan({ >
- + + {({ total, completed, models }) => ( + <> + + + + )} +
{planState === EnumPlanState.Applying && (