fix(ui): remove automated document spam and clean up Runs page
Remove "Create status report on schedule" default automation rule that was creating empty draft documents every 60s. Simplify Runs page by removing 3 summary cards and replacing 10-card metadata grid with compact row layout. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
b6d92ac634
commit
144f35463b
3 files changed
+48
-87
No files matched your search
@@ -1,9 +1,8 @@
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { ListChecks, PlayCircle, WarningCircle } from "@phosphor-icons/react";
|
||||
import type { AgentRecord, RunRecord, TaskRecord, WorkspaceRecord } from "@shared/types";
|
||||
import { EmptyState } from "../ui";
|
||||
import { useT } from "../../i18n";
|
||||
import { LOG_CHUNK_BYTES, initialLogState, isActiveStatus, isAttentionStatus, RunSummaryCard } from "./run-helpers";
|
||||
import { LOG_CHUNK_BYTES, initialLogState, isActiveStatus } from "./run-helpers";
|
||||
import type { RunLogState } from "./run-helpers";
|
||||
import { RunQueue } from "./RunQueue";
|
||||
import { RunDetail } from "./RunDetail";
|
||||
@@ -70,16 +69,6 @@ export function RunCenter({
|
||||
});
|
||||
}, [agentMap, runs, search, statusFilter, taskMap, workspaceMap]);
|
||||
|
||||
const groupedCounts = useMemo(() => {
|
||||
let active = 0, attention = 0, completed = 0;
|
||||
for (const run of runs) {
|
||||
if (isActiveStatus(run.status)) active += 1;
|
||||
else if (isAttentionStatus(run.status)) attention += 1;
|
||||
else completed += 1;
|
||||
}
|
||||
return { active, attention, completed };
|
||||
}, [runs]);
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedRunId && !runs.some((run) => run.id === selectedRunId)) {
|
||||
const fallbackRun = runs[0];
|
||||
@@ -229,60 +218,36 @@ export function RunCenter({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="space-y-10">
|
||||
<div className="grid gap-3 md:grid-cols-3">
|
||||
<RunSummaryCard
|
||||
label={t("runs.activeLabel")}
|
||||
value={groupedCounts.active}
|
||||
detail={t("runs.queuedOrRunning")}
|
||||
icon={PlayCircle}
|
||||
/>
|
||||
<RunSummaryCard
|
||||
label={t("runs.needsAttention")}
|
||||
value={groupedCounts.attention}
|
||||
detail={t("runs.failedTimedInterrupted")}
|
||||
icon={WarningCircle}
|
||||
tone="danger"
|
||||
/>
|
||||
<RunSummaryCard
|
||||
label={t("runs.completedLabel")}
|
||||
value={groupedCounts.completed}
|
||||
detail={t("runs.finishedWithout")}
|
||||
icon={ListChecks}
|
||||
/>
|
||||
</div>
|
||||
<div className="grid gap-8 xl:grid-cols-[minmax(0,420px)_minmax(0,1fr)]">
|
||||
<RunQueue
|
||||
filteredRuns={filteredRuns}
|
||||
selectedRun={selectedRun}
|
||||
taskMap={taskMap}
|
||||
agentMap={agentMap}
|
||||
workspaceMap={workspaceMap}
|
||||
statusFilter={statusFilter}
|
||||
setStatusFilter={setStatusFilter}
|
||||
search={search}
|
||||
setSearch={setSearch}
|
||||
onSelectRun={onSelectRun}
|
||||
t={t}
|
||||
/>
|
||||
|
||||
<div className="grid gap-8 xl:grid-cols-[minmax(0,420px)_minmax(0,1fr)]">
|
||||
<RunQueue
|
||||
filteredRuns={filteredRuns}
|
||||
{selectedRun ? (
|
||||
<RunDetail
|
||||
selectedRun={selectedRun}
|
||||
taskMap={taskMap}
|
||||
agentMap={agentMap}
|
||||
workspaceMap={workspaceMap}
|
||||
statusFilter={statusFilter}
|
||||
setStatusFilter={setStatusFilter}
|
||||
search={search}
|
||||
setSearch={setSearch}
|
||||
onSelectRun={onSelectRun}
|
||||
logState={logState}
|
||||
onOpenConsole={onOpenConsole}
|
||||
onCancelRun={onCancelRun}
|
||||
onOpenLogPath={onOpenLogPath}
|
||||
onReloadLog={() => setLogReloadKey((current) => current + 1)}
|
||||
onLoadOlderLogs={() => void loadOlderLogs()}
|
||||
t={t}
|
||||
/>
|
||||
|
||||
{selectedRun ? (
|
||||
<RunDetail
|
||||
selectedRun={selectedRun}
|
||||
taskMap={taskMap}
|
||||
agentMap={agentMap}
|
||||
workspaceMap={workspaceMap}
|
||||
logState={logState}
|
||||
onOpenConsole={onOpenConsole}
|
||||
onCancelRun={onCancelRun}
|
||||
onOpenLogPath={onOpenLogPath}
|
||||
onReloadLog={() => setLogReloadKey((current) => current + 1)}
|
||||
onLoadOlderLogs={() => void loadOlderLogs()}
|
||||
t={t}
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user