Remove Issues tab from routine detail page
Keep only Triggers, Runs, and Activity tabs per board request. Cleaned up unused executionIssues query, IssueRow and ListTree imports. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
c7d05096ab
commit
339c05c2d4
1 changed files with 2 additions and 31 deletions
|
|
@ -7,7 +7,6 @@ import {
|
||||||
ChevronRight,
|
ChevronRight,
|
||||||
Clock3,
|
Clock3,
|
||||||
Copy,
|
Copy,
|
||||||
ListTree,
|
|
||||||
Play,
|
Play,
|
||||||
RefreshCw,
|
RefreshCw,
|
||||||
Repeat,
|
Repeat,
|
||||||
|
|
@ -17,7 +16,6 @@ import {
|
||||||
Zap,
|
Zap,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { routinesApi, type RoutineTriggerResponse, type RotateRoutineTriggerResponse } from "../api/routines";
|
import { routinesApi, type RoutineTriggerResponse, type RotateRoutineTriggerResponse } from "../api/routines";
|
||||||
import { issuesApi } from "../api/issues";
|
|
||||||
import { agentsApi } from "../api/agents";
|
import { agentsApi } from "../api/agents";
|
||||||
import { projectsApi } from "../api/projects";
|
import { projectsApi } from "../api/projects";
|
||||||
import { useCompany } from "../context/CompanyContext";
|
import { useCompany } from "../context/CompanyContext";
|
||||||
|
|
@ -28,7 +26,6 @@ import { timeAgo } from "../lib/timeAgo";
|
||||||
import { EmptyState } from "../components/EmptyState";
|
import { EmptyState } from "../components/EmptyState";
|
||||||
import { PageSkeleton } from "../components/PageSkeleton";
|
import { PageSkeleton } from "../components/PageSkeleton";
|
||||||
import { AgentIcon } from "../components/AgentIconPicker";
|
import { AgentIcon } from "../components/AgentIconPicker";
|
||||||
import { IssueRow } from "../components/IssueRow";
|
|
||||||
import { InlineEntitySelector, type InlineEntityOption } from "../components/InlineEntitySelector";
|
import { InlineEntitySelector, type InlineEntityOption } from "../components/InlineEntitySelector";
|
||||||
import { MarkdownEditor, type MarkdownEditorRef } from "../components/MarkdownEditor";
|
import { MarkdownEditor, type MarkdownEditorRef } from "../components/MarkdownEditor";
|
||||||
import { ScheduleEditor, describeSchedule } from "../components/ScheduleEditor";
|
import { ScheduleEditor, describeSchedule } from "../components/ScheduleEditor";
|
||||||
|
|
@ -54,7 +51,7 @@ const concurrencyPolicies = ["coalesce_if_active", "always_enqueue", "skip_if_ac
|
||||||
const catchUpPolicies = ["skip_missed", "enqueue_missed_with_cap"];
|
const catchUpPolicies = ["skip_missed", "enqueue_missed_with_cap"];
|
||||||
const triggerKinds = ["schedule", "webhook", "api"];
|
const triggerKinds = ["schedule", "webhook", "api"];
|
||||||
const signingModes = ["bearer", "hmac_sha256"];
|
const signingModes = ["bearer", "hmac_sha256"];
|
||||||
const routineTabs = ["triggers", "runs", "issues", "activity"] as const;
|
const routineTabs = ["triggers", "runs", "activity"] as const;
|
||||||
const concurrencyPolicyDescriptions: Record<string, string> = {
|
const concurrencyPolicyDescriptions: Record<string, string> = {
|
||||||
coalesce_if_active: "Keep one follow-up run queued while an active run is still working.",
|
coalesce_if_active: "Keep one follow-up run queued while an active run is still working.",
|
||||||
always_enqueue: "Queue every trigger occurrence, even if several runs stack up.",
|
always_enqueue: "Queue every trigger occurrence, even if several runs stack up.",
|
||||||
|
|
@ -295,16 +292,6 @@ export function RoutineDetail() {
|
||||||
}),
|
}),
|
||||||
[routine?.triggers, routineRuns],
|
[routine?.triggers, routineRuns],
|
||||||
);
|
);
|
||||||
const { data: executionIssues } = useQuery({
|
|
||||||
queryKey: ["routine-execution-issues", selectedCompanyId, routineId],
|
|
||||||
queryFn: () =>
|
|
||||||
issuesApi.list(selectedCompanyId!, {
|
|
||||||
originKind: "routine_execution",
|
|
||||||
originId: routineId!,
|
|
||||||
includeRoutineExecutions: true,
|
|
||||||
}),
|
|
||||||
enabled: !!selectedCompanyId && !!routineId,
|
|
||||||
});
|
|
||||||
const { data: activity } = useQuery({
|
const { data: activity } = useQuery({
|
||||||
queryKey: [
|
queryKey: [
|
||||||
...queryKeys.routines.activity(selectedCompanyId!, routineId!),
|
...queryKeys.routines.activity(selectedCompanyId!, routineId!),
|
||||||
|
|
@ -879,11 +866,7 @@ export function RoutineDetail() {
|
||||||
<Play className="h-3.5 w-3.5" />
|
<Play className="h-3.5 w-3.5" />
|
||||||
Runs
|
Runs
|
||||||
</TabsTrigger>
|
</TabsTrigger>
|
||||||
<TabsTrigger value="issues" className="gap-1.5">
|
<TabsTrigger value="activity" className="gap-1.5">
|
||||||
<ListTree className="h-3.5 w-3.5" />
|
|
||||||
Issues
|
|
||||||
</TabsTrigger>
|
|
||||||
<TabsTrigger value="activity" className="gap-1.5">
|
|
||||||
<ActivityIcon className="h-3.5 w-3.5" />
|
<ActivityIcon className="h-3.5 w-3.5" />
|
||||||
Activity
|
Activity
|
||||||
</TabsTrigger>
|
</TabsTrigger>
|
||||||
|
|
@ -992,18 +975,6 @@ export function RoutineDetail() {
|
||||||
)}
|
)}
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
|
|
||||||
<TabsContent value="issues">
|
|
||||||
{(executionIssues ?? []).length === 0 ? (
|
|
||||||
<p className="text-xs text-muted-foreground">No execution issues yet.</p>
|
|
||||||
) : (
|
|
||||||
<div className="border border-border rounded-lg divide-y divide-border">
|
|
||||||
{(executionIssues ?? []).map((issue) => (
|
|
||||||
<IssueRow key={issue.id} issue={issue} />
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</TabsContent>
|
|
||||||
|
|
||||||
<TabsContent value="activity">
|
<TabsContent value="activity">
|
||||||
{(activity ?? []).length === 0 ? (
|
{(activity ?? []).length === 0 ? (
|
||||||
<p className="text-xs text-muted-foreground">No activity yet.</p>
|
<p className="text-xs text-muted-foreground">No activity yet.</p>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue