2026-02-20 12:24:38 -06:00
|
|
|
import { useEffect, useMemo } from "react";
|
2026-02-19 14:39:48 -06:00
|
|
|
import { useNavigate, useLocation } from "react-router-dom";
|
2026-02-17 12:24:48 -06:00
|
|
|
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
2026-02-16 13:32:04 -06:00
|
|
|
import { issuesApi } from "../api/issues";
|
2026-02-17 12:24:48 -06:00
|
|
|
import { agentsApi } from "../api/agents";
|
2026-02-20 12:24:38 -06:00
|
|
|
import { heartbeatsApi } from "../api/heartbeats";
|
Overhaul UI with shadcn components and new pages
Add shadcn/ui components (badge, button, card, input, select,
separator). Add company context provider. New pages: Activity,
Approvals, Companies, Costs, Org chart. Restyle existing pages
(Dashboard, Agents, Issues, Goals, Projects) with shadcn components
and dark theme. Update layout, sidebar navigation, and routing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:07:32 -06:00
|
|
|
import { useCompany } from "../context/CompanyContext";
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
import { useDialog } from "../context/DialogContext";
|
|
|
|
|
import { useBreadcrumbs } from "../context/BreadcrumbContext";
|
2026-02-17 12:24:48 -06:00
|
|
|
import { queryKeys } from "../lib/queryKeys";
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
import { groupBy } from "../lib/groupBy";
|
|
|
|
|
import { StatusIcon } from "../components/StatusIcon";
|
|
|
|
|
import { PriorityIcon } from "../components/PriorityIcon";
|
|
|
|
|
import { EntityRow } from "../components/EntityRow";
|
|
|
|
|
import { EmptyState } from "../components/EmptyState";
|
2026-02-18 13:02:23 -06:00
|
|
|
import { PageTabBar } from "../components/PageTabBar";
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
import { Button } from "@/components/ui/button";
|
2026-02-18 13:02:23 -06:00
|
|
|
import { Tabs } from "@/components/ui/tabs";
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
import { CircleDot, Plus } from "lucide-react";
|
|
|
|
|
import { formatDate } from "../lib/utils";
|
UI: Identity component, LiveRunWidget, issue identifiers, and UX improvements
Add Identity component (avatar + name) used across agent/issue displays. Add
LiveRunWidget for real-time streaming of active heartbeat runs on issue detail
pages via WebSocket. Display issue identifiers (PAP-42) instead of UUID
fragments throughout Issues, Inbox, CommandPalette, and detail pages.
Enhance CommentThread with re-open checkbox, Cmd+Enter submit, sorted display,
and run linking. Improve Activity page with richer formatting and filtering.
Update Dashboard with live metrics. Add reports-to agent link in AgentProperties.
Various small fixes: StatusIcon centering, CopyText ref init, agent detail
run-issue cross-links.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:10:07 -06:00
|
|
|
import { Identity } from "../components/Identity";
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
import type { Issue } from "@paperclip/shared";
|
2026-02-16 13:32:04 -06:00
|
|
|
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
const statusOrder = ["in_progress", "todo", "backlog", "in_review", "blocked", "done", "cancelled"];
|
|
|
|
|
|
|
|
|
|
function statusLabel(status: string): string {
|
|
|
|
|
return status.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-20 14:18:59 -06:00
|
|
|
type TabFilter = "all" | "active" | "backlog" | "done" | "recent";
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
|
2026-02-18 13:02:23 -06:00
|
|
|
const issueTabItems = [
|
|
|
|
|
{ value: "all", label: "All Issues" },
|
|
|
|
|
{ value: "active", label: "Active" },
|
|
|
|
|
{ value: "backlog", label: "Backlog" },
|
|
|
|
|
{ value: "done", label: "Done" },
|
2026-02-20 14:18:59 -06:00
|
|
|
{ value: "recent", label: "Recent" },
|
2026-02-18 13:02:23 -06:00
|
|
|
] as const;
|
|
|
|
|
|
|
|
|
|
function parseIssueTab(value: string | null): TabFilter {
|
2026-02-20 14:18:59 -06:00
|
|
|
if (value === "all" || value === "active" || value === "backlog" || value === "done" || value === "recent") return value;
|
2026-02-19 14:39:48 -06:00
|
|
|
return "active";
|
2026-02-18 13:02:23 -06:00
|
|
|
}
|
|
|
|
|
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
function filterIssues(issues: Issue[], tab: TabFilter): Issue[] {
|
|
|
|
|
switch (tab) {
|
|
|
|
|
case "active":
|
|
|
|
|
return issues.filter((i) => ["todo", "in_progress", "in_review", "blocked"].includes(i.status));
|
|
|
|
|
case "backlog":
|
|
|
|
|
return issues.filter((i) => i.status === "backlog");
|
|
|
|
|
case "done":
|
|
|
|
|
return issues.filter((i) => ["done", "cancelled"].includes(i.status));
|
|
|
|
|
default:
|
|
|
|
|
return issues;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-02-16 13:32:04 -06:00
|
|
|
|
|
|
|
|
export function Issues() {
|
Overhaul UI with shadcn components and new pages
Add shadcn/ui components (badge, button, card, input, select,
separator). Add company context provider. New pages: Activity,
Approvals, Companies, Costs, Org chart. Restyle existing pages
(Dashboard, Agents, Issues, Goals, Projects) with shadcn components
and dark theme. Update layout, sidebar navigation, and routing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:07:32 -06:00
|
|
|
const { selectedCompanyId } = useCompany();
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
const { openNewIssue } = useDialog();
|
|
|
|
|
const { setBreadcrumbs } = useBreadcrumbs();
|
|
|
|
|
const navigate = useNavigate();
|
2026-02-17 12:24:48 -06:00
|
|
|
const queryClient = useQueryClient();
|
2026-02-19 14:39:48 -06:00
|
|
|
const location = useLocation();
|
|
|
|
|
const pathSegment = location.pathname.split("/").pop() ?? "active";
|
|
|
|
|
const tab = parseIssueTab(pathSegment);
|
2026-02-17 12:24:48 -06:00
|
|
|
|
|
|
|
|
const { data: agents } = useQuery({
|
|
|
|
|
queryKey: queryKeys.agents.list(selectedCompanyId!),
|
|
|
|
|
queryFn: () => agentsApi.list(selectedCompanyId!),
|
|
|
|
|
enabled: !!selectedCompanyId,
|
|
|
|
|
});
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
|
2026-02-20 12:24:38 -06:00
|
|
|
const { data: liveRuns } = useQuery({
|
|
|
|
|
queryKey: queryKeys.liveRuns(selectedCompanyId!),
|
|
|
|
|
queryFn: () => heartbeatsApi.liveRunsForCompany(selectedCompanyId!),
|
|
|
|
|
enabled: !!selectedCompanyId,
|
|
|
|
|
refetchInterval: 5000,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const liveIssueIds = useMemo(() => {
|
|
|
|
|
const ids = new Set<string>();
|
|
|
|
|
for (const run of liveRuns ?? []) {
|
|
|
|
|
if (run.issueId) ids.add(run.issueId);
|
|
|
|
|
}
|
|
|
|
|
return ids;
|
|
|
|
|
}, [liveRuns]);
|
|
|
|
|
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
useEffect(() => {
|
|
|
|
|
setBreadcrumbs([{ label: "Issues" }]);
|
|
|
|
|
}, [setBreadcrumbs]);
|
Overhaul UI with shadcn components and new pages
Add shadcn/ui components (badge, button, card, input, select,
separator). Add company context provider. New pages: Activity,
Approvals, Companies, Costs, Org chart. Restyle existing pages
(Dashboard, Agents, Issues, Goals, Projects) with shadcn components
and dark theme. Update layout, sidebar navigation, and routing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:07:32 -06:00
|
|
|
|
2026-02-17 12:24:48 -06:00
|
|
|
const { data: issues, isLoading, error } = useQuery({
|
|
|
|
|
queryKey: queryKeys.issues.list(selectedCompanyId!),
|
|
|
|
|
queryFn: () => issuesApi.list(selectedCompanyId!),
|
|
|
|
|
enabled: !!selectedCompanyId,
|
|
|
|
|
});
|
Overhaul UI with shadcn components and new pages
Add shadcn/ui components (badge, button, card, input, select,
separator). Add company context provider. New pages: Activity,
Approvals, Companies, Costs, Org chart. Restyle existing pages
(Dashboard, Agents, Issues, Goals, Projects) with shadcn components
and dark theme. Update layout, sidebar navigation, and routing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:07:32 -06:00
|
|
|
|
2026-02-19 14:02:29 -06:00
|
|
|
const updateIssue = useMutation({
|
|
|
|
|
mutationFn: ({ id, data }: { id: string; data: Record<string, unknown> }) =>
|
|
|
|
|
issuesApi.update(id, data),
|
2026-02-17 12:24:48 -06:00
|
|
|
onSuccess: () => {
|
|
|
|
|
queryClient.invalidateQueries({ queryKey: queryKeys.issues.list(selectedCompanyId!) });
|
|
|
|
|
},
|
|
|
|
|
});
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
|
2026-02-17 10:53:20 -06:00
|
|
|
const agentName = (id: string | null) => {
|
|
|
|
|
if (!id || !agents) return null;
|
|
|
|
|
return agents.find((a) => a.id === id)?.name ?? null;
|
|
|
|
|
};
|
|
|
|
|
|
Overhaul UI with shadcn components and new pages
Add shadcn/ui components (badge, button, card, input, select,
separator). Add company context provider. New pages: Activity,
Approvals, Companies, Costs, Org chart. Restyle existing pages
(Dashboard, Agents, Issues, Goals, Projects) with shadcn components
and dark theme. Update layout, sidebar navigation, and routing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:07:32 -06:00
|
|
|
if (!selectedCompanyId) {
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
return <EmptyState icon={CircleDot} message="Select a company to view issues." />;
|
Overhaul UI with shadcn components and new pages
Add shadcn/ui components (badge, button, card, input, select,
separator). Add company context provider. New pages: Activity,
Approvals, Companies, Costs, Org chart. Restyle existing pages
(Dashboard, Agents, Issues, Goals, Projects) with shadcn components
and dark theme. Update layout, sidebar navigation, and routing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:07:32 -06:00
|
|
|
}
|
|
|
|
|
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
const filtered = filterIssues(issues ?? [], tab);
|
2026-02-20 14:18:59 -06:00
|
|
|
const recentSorted = tab === "recent"
|
|
|
|
|
? [...filtered].sort((a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime())
|
|
|
|
|
: null;
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
const grouped = groupBy(filtered, (i) => i.status);
|
|
|
|
|
const orderedGroups = statusOrder
|
|
|
|
|
.filter((s) => grouped[s]?.length)
|
|
|
|
|
.map((s) => ({ status: s, items: grouped[s]! }));
|
|
|
|
|
|
2026-02-18 13:02:23 -06:00
|
|
|
const setTab = (nextTab: TabFilter) => {
|
2026-02-19 14:39:48 -06:00
|
|
|
navigate(`/issues/${nextTab}`);
|
2026-02-18 13:02:23 -06:00
|
|
|
};
|
|
|
|
|
|
2026-02-16 13:32:04 -06:00
|
|
|
return (
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
<div className="space-y-4">
|
2026-02-20 10:33:18 -06:00
|
|
|
<div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
|
Polish UI components and rework AgentConfigForm
Major AgentConfigForm rework with improved adapter configuration
fields and layout. Refine sidebar, breadcrumbs, and card/tab
components for visual consistency. Clean up page layouts across
Activity, Agents, Approvals, Costs, Dashboard, Goals, Inbox,
Issues, Org, and Projects pages. Minor heartbeat-run CLI fix.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 10:43:25 -06:00
|
|
|
<Tabs value={tab} onValueChange={(v) => setTab(v as TabFilter)}>
|
2026-02-20 10:33:18 -06:00
|
|
|
<PageTabBar items={[...issueTabItems]} value={tab} onValueChange={(v) => setTab(v as TabFilter)} />
|
Polish UI components and rework AgentConfigForm
Major AgentConfigForm rework with improved adapter configuration
fields and layout. Refine sidebar, breadcrumbs, and card/tab
components for visual consistency. Clean up page layouts across
Activity, Agents, Approvals, Costs, Dashboard, Goals, Inbox,
Issues, Org, and Projects pages. Minor heartbeat-run CLI fix.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 10:43:25 -06:00
|
|
|
</Tabs>
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
<Button size="sm" onClick={() => openNewIssue()}>
|
|
|
|
|
<Plus className="h-4 w-4 mr-1" />
|
|
|
|
|
New Issue
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-02-17 12:24:48 -06:00
|
|
|
{isLoading && <p className="text-sm text-muted-foreground">Loading...</p>}
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
{error && <p className="text-sm text-destructive">{error.message}</p>}
|
|
|
|
|
|
|
|
|
|
{issues && filtered.length === 0 && (
|
|
|
|
|
<EmptyState
|
|
|
|
|
icon={CircleDot}
|
|
|
|
|
message="No issues found."
|
|
|
|
|
action="Create Issue"
|
|
|
|
|
onAction={() => openNewIssue()}
|
|
|
|
|
/>
|
2026-02-16 13:32:04 -06:00
|
|
|
)}
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
|
2026-02-20 14:18:59 -06:00
|
|
|
{recentSorted ? (
|
|
|
|
|
<div className="border border-border">
|
|
|
|
|
{recentSorted.map((issue) => (
|
|
|
|
|
<EntityRow
|
|
|
|
|
key={issue.id}
|
|
|
|
|
identifier={issue.identifier ?? issue.id.slice(0, 8)}
|
|
|
|
|
title={issue.title}
|
2026-02-20 16:04:05 -06:00
|
|
|
onClick={() => navigate(`/issues/${issue.identifier ?? issue.id}`)}
|
2026-02-20 14:18:59 -06:00
|
|
|
leading={
|
|
|
|
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
|
|
|
<div className="flex items-center gap-2" onClick={(e) => e.stopPropagation()}>
|
|
|
|
|
<PriorityIcon
|
|
|
|
|
priority={issue.priority}
|
|
|
|
|
onChange={(p) => updateIssue.mutate({ id: issue.id, data: { priority: p } })}
|
|
|
|
|
/>
|
|
|
|
|
<StatusIcon
|
|
|
|
|
status={issue.status}
|
|
|
|
|
onChange={(s) => updateIssue.mutate({ id: issue.id, data: { status: s } })}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
trailing={
|
|
|
|
|
<div className="flex items-center gap-3">
|
|
|
|
|
{liveIssueIds.has(issue.id) && (
|
|
|
|
|
<span className="inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-blue-500/10">
|
|
|
|
|
<span className="relative flex h-2 w-2">
|
|
|
|
|
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75" />
|
|
|
|
|
<span className="relative inline-flex rounded-full h-2 w-2 bg-blue-500" />
|
2026-02-20 12:24:38 -06:00
|
|
|
</span>
|
2026-02-20 14:18:59 -06:00
|
|
|
<span className="text-[11px] font-medium text-blue-400">Live</span>
|
2026-02-17 10:53:20 -06:00
|
|
|
</span>
|
2026-02-20 14:18:59 -06:00
|
|
|
)}
|
|
|
|
|
{issue.assigneeAgentId && (() => {
|
|
|
|
|
const name = agentName(issue.assigneeAgentId);
|
|
|
|
|
return name
|
|
|
|
|
? <Identity name={name} size="sm" />
|
|
|
|
|
: <span className="text-xs text-muted-foreground font-mono">{issue.assigneeAgentId.slice(0, 8)}</span>;
|
|
|
|
|
})()}
|
|
|
|
|
<span className="text-xs text-muted-foreground">
|
|
|
|
|
{formatDate(issue.updatedAt)}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
</div>
|
2026-02-20 14:18:59 -06:00
|
|
|
) : (
|
|
|
|
|
orderedGroups.map(({ status, items }) => (
|
|
|
|
|
<div key={status}>
|
|
|
|
|
<div className="flex items-center gap-2 px-4 py-2 bg-muted/50">
|
|
|
|
|
<StatusIcon status={status} />
|
|
|
|
|
<span className="text-xs font-semibold uppercase tracking-wide">
|
|
|
|
|
{statusLabel(status)}
|
|
|
|
|
</span>
|
|
|
|
|
<span className="text-xs text-muted-foreground">{items.length}</span>
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="icon-xs"
|
|
|
|
|
className="ml-auto text-muted-foreground"
|
|
|
|
|
onClick={() => openNewIssue({ status })}
|
|
|
|
|
>
|
|
|
|
|
<Plus className="h-3 w-3" />
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="border border-border">
|
|
|
|
|
{items.map((issue) => (
|
|
|
|
|
<EntityRow
|
|
|
|
|
key={issue.id}
|
|
|
|
|
identifier={issue.identifier ?? issue.id.slice(0, 8)}
|
|
|
|
|
title={issue.title}
|
2026-02-20 16:04:05 -06:00
|
|
|
onClick={() => navigate(`/issues/${issue.identifier ?? issue.id}`)}
|
2026-02-20 14:18:59 -06:00
|
|
|
leading={
|
|
|
|
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
|
|
|
<div className="flex items-center gap-2" onClick={(e) => e.stopPropagation()}>
|
|
|
|
|
<PriorityIcon
|
|
|
|
|
priority={issue.priority}
|
|
|
|
|
onChange={(p) => updateIssue.mutate({ id: issue.id, data: { priority: p } })}
|
|
|
|
|
/>
|
|
|
|
|
<StatusIcon
|
|
|
|
|
status={issue.status}
|
|
|
|
|
onChange={(s) => updateIssue.mutate({ id: issue.id, data: { status: s } })}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
trailing={
|
|
|
|
|
<div className="flex items-center gap-3">
|
|
|
|
|
{liveIssueIds.has(issue.id) && (
|
|
|
|
|
<span className="inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-blue-500/10">
|
|
|
|
|
<span className="relative flex h-2 w-2">
|
|
|
|
|
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75" />
|
|
|
|
|
<span className="relative inline-flex rounded-full h-2 w-2 bg-blue-500" />
|
|
|
|
|
</span>
|
|
|
|
|
<span className="text-[11px] font-medium text-blue-400">Live</span>
|
|
|
|
|
</span>
|
|
|
|
|
)}
|
|
|
|
|
{issue.assigneeAgentId && (() => {
|
|
|
|
|
const name = agentName(issue.assigneeAgentId);
|
|
|
|
|
return name
|
|
|
|
|
? <Identity name={name} size="sm" />
|
|
|
|
|
: <span className="text-xs text-muted-foreground font-mono">{issue.assigneeAgentId.slice(0, 8)}</span>;
|
|
|
|
|
})()}
|
|
|
|
|
<span className="text-xs text-muted-foreground">
|
|
|
|
|
{formatDate(issue.createdAt)}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
))
|
|
|
|
|
)}
|
2026-02-16 13:32:04 -06:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|