From 6c51d3ea8af3ea0d9527884a4014b5755a4d0b5b Mon Sep 17 00:00:00 2001 From: MocA-Love <64681295+MocA-Love@users.noreply.github.com> Date: Fri, 17 Apr 2026 03:38:16 +0900 Subject: [PATCH] =?UTF-8?q?fix(desktop):=20Agent=20Manager=20=E3=81=AE=20?= =?UTF-8?q?=E3=82=BF=E3=82=B9=E3=82=AF/=E3=82=B9=E3=82=B1=E3=82=B8?= =?UTF-8?q?=E3=83=A5=E3=83=BC=E3=83=AB=20=E3=82=BF=E3=83=96=E3=81=AE=20UI?= =?UTF-8?q?=20=E7=B5=B1=E4=B8=80=20(#222)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - スケジュールタブに検索機能を追加 - タスクタブにスケジュールと同じ形式の「新規」ボタンを追加 - 「新しい TODO」押下時の Composer をインライン表示から Dialog 表示に変更 --- .../SchedulesSection/SchedulesSection.tsx | 62 ++++++++++++++----- .../todo-agent/TodoManager/TodoManager.tsx | 47 ++++++++++---- 2 files changed, 84 insertions(+), 25 deletions(-) diff --git a/apps/desktop/src/renderer/features/todo-agent/TodoManager/SchedulesSection/SchedulesSection.tsx b/apps/desktop/src/renderer/features/todo-agent/TodoManager/SchedulesSection/SchedulesSection.tsx index 8f460959ce3..004b953db47 100644 --- a/apps/desktop/src/renderer/features/todo-agent/TodoManager/SchedulesSection/SchedulesSection.tsx +++ b/apps/desktop/src/renderer/features/todo-agent/TodoManager/SchedulesSection/SchedulesSection.tsx @@ -1,5 +1,6 @@ import type { SelectTodoSchedule } from "@superset/local-db"; import { Button } from "@superset/ui/button"; +import { Input } from "@superset/ui/input"; import { ScrollArea } from "@superset/ui/scroll-area"; import { useMemo, useState } from "react"; import { HiMiniPlus } from "react-icons/hi2"; @@ -15,6 +16,7 @@ import { ScheduleListRow } from "./components/ScheduleListRow"; export function SchedulesSection() { const [editorOpen, setEditorOpen] = useState(false); const [editing, setEditing] = useState(null); + const [filter, setFilter] = useState(""); const { data: schedules } = electronTrpc.todoAgent.schedule.listAll.useQuery( undefined, @@ -37,6 +39,25 @@ export function SchedulesSection() { return map; }, [projects]); + const filteredSchedules = useMemo(() => { + const list = schedules ?? []; + const needle = filter.trim().toLowerCase(); + if (!needle) return list; + return list.filter((s) => { + const wsName = s.workspaceId + ? (workspaceNameById.get(s.workspaceId) ?? "") + : ""; + const projName = projectNameById.get(s.projectId) ?? ""; + return ( + s.name.toLowerCase().includes(needle) || + s.title.toLowerCase().includes(needle) || + s.description.toLowerCase().includes(needle) || + wsName.toLowerCase().includes(needle) || + projName.toLowerCase().includes(needle) + ); + }); + }, [schedules, filter, workspaceNameById, projectNameById]); + const openNew = () => { setEditing(null); setEditorOpen(true); @@ -65,9 +86,17 @@ export function SchedulesSection() { 新規 +
+ setFilter(e.target.value)} + placeholder="絞り込み(名前 / タイトル / プロジェクト)" + className="h-8 text-xs rounded-md" + /> +
- {(schedules?.length ?? 0) === 0 && ( + {(schedules?.length ?? 0) === 0 ? (

まだスケジュールはありません。「新規」ボタンから作成してください。
@@ -75,20 +104,25 @@ export function SchedulesSection() { スケジュールはアプリ起動中のみ発火します。

+ ) : filteredSchedules.length === 0 ? ( +

+ 条件に一致するスケジュールがありません。 +

+ ) : ( + filteredSchedules.map((schedule) => ( + openEdit(schedule)} + /> + )) )} - {(schedules ?? []).map((schedule) => ( - openEdit(schedule)} - /> - ))}
diff --git a/apps/desktop/src/renderer/features/todo-agent/TodoManager/TodoManager.tsx b/apps/desktop/src/renderer/features/todo-agent/TodoManager/TodoManager.tsx index b807cb53a15..08afa03f730 100644 --- a/apps/desktop/src/renderer/features/todo-agent/TodoManager/TodoManager.tsx +++ b/apps/desktop/src/renderer/features/todo-agent/TodoManager/TodoManager.tsx @@ -490,6 +490,22 @@ export function TodoManager({ ) : ( <> +
+ + {(sessions?.length ?? 0) > 0 + ? `${sessions?.length} 件のタスク` + : "タスクなし"} + + +
{(sessions?.length ?? 0) === 0 - ? "まだ TODO セッションはありません。右上の『新しい TODO』から作成してください。" + ? "まだ TODO セッションはありません。『新規』から作成してください。" : "条件に一致するセッションがありません。"}

)} @@ -566,16 +582,7 @@ export function TodoManager({
- {composerOpen ? ( - { - setComposerOpen(false); - setSelectedId(id); - }} - onCancel={() => setComposerOpen(false)} - /> - ) : selected ? ( + {selected ? ( setSelectedId(null)} @@ -620,6 +627,24 @@ export function TodoManager({ open={presetsDialogOpen} onOpenChange={setPresetsDialogOpen} /> + + + 新しい TODO + {composerOpen && ( + { + setComposerOpen(false); + setSelectedId(id); + }} + onCancel={() => setComposerOpen(false)} + /> + )} + + ); }