From a352b9af5b759a574a6720a165847a2b2868ccab Mon Sep 17 00:00:00 2001 From: Eyejoker Date: Mon, 27 Apr 2026 01:47:42 +0900 Subject: [PATCH] feat(dashboard): add inbox task actions (#32) * feat(dashboard): add inbox task actions * style(dashboard): format inbox actions --- apps/dashboard/src/App.tsx | 43 ++++++++++++++++++++++++++++++++++- apps/dashboard/src/styles.css | 4 ++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/apps/dashboard/src/App.tsx b/apps/dashboard/src/App.tsx index 4910d06..8ef9ce0 100644 --- a/apps/dashboard/src/App.tsx +++ b/apps/dashboard/src/App.tsx @@ -593,11 +593,17 @@ function ControlRail({ data, t }: { data: DashboardState; t: Messages }) { function InboxPanel({ overview, + tasks, locale, + onTaskAction, + taskActionKey, t, }: { overview: DashboardOverview; + tasks: DashboardTask[]; locale: Locale; + onTaskAction: (task: DashboardTask, action: DashboardTaskAction) => void; + taskActionKey: TaskActionKey | null; t: Messages; }) { const [filter, setFilter] = useState('all'); @@ -672,6 +678,13 @@ function InboxPanel({
{filteredItems.map((item) => { const href = inboxTargetHref(item); + const linkedTask = + item.source === 'scheduled-task' && item.taskId + ? tasks.find((task) => task.id === item.taskId) + : undefined; + const linkedTaskActions = linkedTask + ? taskActionsFor(linkedTask) + : []; return (
) : null} + {linkedTask && linkedTaskActions.length > 0 ? ( +
+ {linkedTaskActions.map((action) => { + const actionKey: TaskActionKey = `${linkedTask.id}:${action}`; + const busy = taskActionKey === actionKey; + return ( + + ); + })} +
+ ) : null}
); })} @@ -1459,7 +1491,16 @@ function App() {

{t.panels.inbox}

{t.panels.inboxQueue}
- + + void handleTaskAction(task, action) + } + overview={data.overview} + taskActionKey={taskActionKey} + tasks={data.tasks} + t={t} + /> ) : null} diff --git a/apps/dashboard/src/styles.css b/apps/dashboard/src/styles.css index 65fa439..98454bd 100644 --- a/apps/dashboard/src/styles.css +++ b/apps/dashboard/src/styles.css @@ -1000,6 +1000,10 @@ progress::-moz-progress-bar { text-decoration: none; } +.inbox-actions { + padding-top: 2px; +} + .health-overview { display: flex; gap: 10px;