2026-02-17 20:07:36 -06:00
|
|
|
import { useState, useEffect, useMemo } from "react";
|
2026-03-02 16:44:03 -06:00
|
|
|
import { Link, useNavigate, useLocation } from "@/lib/router";
|
2026-02-17 12:24:48 -06:00
|
|
|
import { useQuery } from "@tanstack/react-query";
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
import { agentsApi, type OrgNode } from "../api/agents";
|
2026-02-20 10:32:32 -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";
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
import { useDialog } from "../context/DialogContext";
|
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 { useBreadcrumbs } from "../context/BreadcrumbContext";
|
2026-02-20 11:29:13 -06:00
|
|
|
import { useSidebar } from "../context/SidebarContext";
|
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 { StatusBadge } from "../components/StatusBadge";
|
2026-02-23 19:52:43 -06:00
|
|
|
import { agentStatusDot, agentStatusDotDefault } from "../lib/status-colors";
|
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 { EntityRow } from "../components/EntityRow";
|
|
|
|
|
import { EmptyState } from "../components/EmptyState";
|
2026-03-02 16:44:03 -06:00
|
|
|
import { PageSkeleton } from "../components/PageSkeleton";
|
|
|
|
|
import { relativeTime, cn, agentRouteRef, agentUrl } from "../lib/utils";
|
2026-02-19 14:39:48 -06:00
|
|
|
import { PageTabBar } from "../components/PageTabBar";
|
|
|
|
|
import { Tabs } from "@/components/ui/tabs";
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
import { Button } from "@/components/ui/button";
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
import { Bot, Plus, List, GitBranch, SlidersHorizontal } from "lucide-react";
|
2026-03-07 17:07:14 -08:00
|
|
|
import { AGENT_ROLE_LABELS, type Agent } from "@paperclipai/shared";
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
|
2026-03-31 20:21:13 +01:00
|
|
|
import { getAdapterLabel } from "../adapters/adapter-display-registry";
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
|
2026-03-07 17:07:14 -08:00
|
|
|
const roleLabels = AGENT_ROLE_LABELS as Record<string, string>;
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
|
|
|
|
|
type FilterTab = "all" | "active" | "paused" | "error";
|
|
|
|
|
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
function matchesFilter(status: string, tab: FilterTab, showTerminated: boolean): boolean {
|
|
|
|
|
if (status === "terminated") return showTerminated;
|
2026-02-17 20:07:36 -06:00
|
|
|
if (tab === "all") return true;
|
|
|
|
|
if (tab === "active") return status === "active" || status === "running" || status === "idle";
|
|
|
|
|
if (tab === "paused") return status === "paused";
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
if (tab === "error") return status === "error";
|
2026-02-17 20:07:36 -06:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
function filterAgents(agents: Agent[], tab: FilterTab, showTerminated: boolean): Agent[] {
|
2026-03-22 07:07:41 -05:00
|
|
|
return agents
|
|
|
|
|
.filter((a) => matchesFilter(a.status, tab, showTerminated))
|
|
|
|
|
.sort((a, b) => a.name.localeCompare(b.name));
|
2026-02-17 20:07:36 -06:00
|
|
|
}
|
|
|
|
|
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
function filterOrgTree(nodes: OrgNode[], tab: FilterTab, showTerminated: boolean): OrgNode[] {
|
2026-03-22 07:07:41 -05:00
|
|
|
return nodes
|
|
|
|
|
.reduce<OrgNode[]>((acc, node) => {
|
|
|
|
|
const filteredReports = filterOrgTree(node.reports, tab, showTerminated);
|
|
|
|
|
if (matchesFilter(node.status, tab, showTerminated) || filteredReports.length > 0) {
|
|
|
|
|
acc.push({ ...node, reports: filteredReports });
|
|
|
|
|
}
|
|
|
|
|
return acc;
|
|
|
|
|
}, [])
|
|
|
|
|
.sort((a, b) => a.name.localeCompare(b.name));
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
}
|
2026-02-16 13:32:04 -06:00
|
|
|
|
|
|
|
|
export function Agents() {
|
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();
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
const { openNewAgent } = useDialog();
|
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 { setBreadcrumbs } = useBreadcrumbs();
|
|
|
|
|
const navigate = useNavigate();
|
2026-02-19 14:39:48 -06:00
|
|
|
const location = useLocation();
|
2026-02-20 11:29:13 -06:00
|
|
|
const { isMobile } = useSidebar();
|
2026-02-19 14:39:48 -06:00
|
|
|
const pathSegment = location.pathname.split("/").pop() ?? "all";
|
|
|
|
|
const tab: FilterTab = (pathSegment === "all" || pathSegment === "active" || pathSegment === "paused" || pathSegment === "error") ? pathSegment : "all";
|
2026-02-17 20:07:36 -06:00
|
|
|
const [view, setView] = useState<"list" | "org">("org");
|
2026-02-20 11:29:13 -06:00
|
|
|
const forceListView = isMobile;
|
|
|
|
|
const effectiveView: "list" | "org" = forceListView ? "list" : view;
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
const [showTerminated, setShowTerminated] = useState(false);
|
|
|
|
|
const [filtersOpen, setFiltersOpen] = useState(false);
|
2026-02-17 12:24:48 -06:00
|
|
|
|
|
|
|
|
const { data: agents, isLoading, error } = useQuery({
|
|
|
|
|
queryKey: queryKeys.agents.list(selectedCompanyId!),
|
|
|
|
|
queryFn: () => agentsApi.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
|
|
|
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
const { data: orgTree } = useQuery({
|
|
|
|
|
queryKey: queryKeys.org(selectedCompanyId!),
|
|
|
|
|
queryFn: () => agentsApi.org(selectedCompanyId!),
|
2026-02-20 11:29:13 -06:00
|
|
|
enabled: !!selectedCompanyId && effectiveView === "org",
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
});
|
|
|
|
|
|
2026-02-20 10:32:32 -06:00
|
|
|
const { data: runs } = useQuery({
|
[codex] Harden execution reliability and heartbeat tooling (#3679)
## Thinking Path
> - Paperclip orchestrates AI agents for zero-human companies
> - Reliable execution depends on heartbeat routing, issue lifecycle
semantics, telemetry, and a fast enough local verification loop to keep
regressions visible
> - The remaining commits on this branch were mostly server/runtime
correctness fixes plus test and documentation follow-ups in that area
> - Those changes are logically separate from the UI-focused
issue-detail and workspace/navigation branches even when they touch
overlapping issue APIs
> - This pull request groups the execution reliability, heartbeat,
telemetry, and tooling changes into one standalone branch
> - The benefit is a focused review of the control-plane correctness
work, including the follow-up fix that restored the implicit
comment-reopen helpers after branch splitting
## What Changed
- Hardened issue/heartbeat execution behavior, including self-review
stage skipping, deferred mention wakes during active execution, stranded
execution recovery, active-run scoping, assignee resolution, and
blocked-to-todo wake resumption
- Reduced noisy polling/logging overhead by trimming issue run payloads,
compacting persisted run logs, silencing high-volume request logs, and
capping heartbeat-run queries in dashboard/inbox surfaces
- Expanded telemetry and status semantics with adapter/model fields on
task completion plus clearer status guidance in docs/onboarding material
- Updated test infrastructure and verification defaults with faster
route-test module isolation, cheaper default `pnpm test`, e2e isolation
from local state, and repo verification follow-ups
- Included docs/release housekeeping from the branch and added a small
follow-up commit restoring the implicit comment-reopen helpers that were
dropped during branch reconstruction
## Verification
- `pnpm vitest run
server/src/__tests__/issue-comment-reopen-routes.test.ts
server/src/__tests__/issue-telemetry-routes.test.ts`
- `pnpm vitest run server/src/__tests__/http-log-policy.test.ts
server/src/__tests__/heartbeat-run-log.test.ts
server/src/__tests__/health.test.ts`
- `server/src/__tests__/activity-service.test.ts`,
`server/src/__tests__/heartbeat-comment-wake-batching.test.ts`, and
`server/src/__tests__/heartbeat-process-recovery.test.ts` were attempted
on this host but the embedded Postgres harness reported
init-script/data-dir problems and skipped or failed to start, so they
are noted as environment-limited
## Risks
- Medium: this branch changes core issue/heartbeat routing and
reopen/wakeup behavior, so regressions would affect agent execution flow
rather than isolated UI polish
- Because it also updates verification infrastructure, reviewers should
pay attention to whether the new tests are asserting the right failure
modes and not just reshaping harness behavior
## Model Used
- OpenAI Codex coding agent (GPT-5-class runtime in Codex CLI; exact
deployed model ID is not exposed in this environment), reasoning
enabled, tool use and local code execution enabled
## Checklist
- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [ ] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-14 13:34:52 -05:00
|
|
|
queryKey: [...queryKeys.liveRuns(selectedCompanyId!), "agents-page"],
|
|
|
|
|
queryFn: () => heartbeatsApi.liveRunsForCompany(selectedCompanyId!),
|
2026-02-20 10:32:32 -06:00
|
|
|
enabled: !!selectedCompanyId,
|
|
|
|
|
refetchInterval: 15_000,
|
|
|
|
|
});
|
|
|
|
|
|
2026-02-20 12:50:34 -06:00
|
|
|
// Map agentId -> first live run + live run count
|
2026-02-20 10:32:32 -06:00
|
|
|
const liveRunByAgent = useMemo(() => {
|
2026-02-20 12:50:34 -06:00
|
|
|
const map = new Map<string, { runId: string; liveCount: number }>();
|
2026-02-20 10:32:32 -06:00
|
|
|
for (const r of runs ?? []) {
|
2026-02-20 12:50:34 -06:00
|
|
|
if (r.status !== "running" && r.status !== "queued") continue;
|
|
|
|
|
const existing = map.get(r.agentId);
|
|
|
|
|
if (existing) {
|
|
|
|
|
existing.liveCount += 1;
|
|
|
|
|
continue;
|
2026-02-20 10:32:32 -06:00
|
|
|
}
|
2026-02-20 12:50:34 -06:00
|
|
|
map.set(r.agentId, { runId: r.id, liveCount: 1 });
|
2026-02-20 10:32:32 -06:00
|
|
|
}
|
|
|
|
|
return map;
|
|
|
|
|
}, [runs]);
|
|
|
|
|
|
2026-02-17 20:07:36 -06:00
|
|
|
const agentMap = useMemo(() => {
|
|
|
|
|
const map = new Map<string, Agent>();
|
|
|
|
|
for (const a of agents ?? []) map.set(a.id, a);
|
|
|
|
|
return map;
|
|
|
|
|
}, [agents]);
|
|
|
|
|
|
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: "Agents" }]);
|
|
|
|
|
}, [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
|
|
|
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={Bot} message="Select a company to view agents." />;
|
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-16 13:32:04 -06:00
|
|
|
|
2026-03-02 16:44:03 -06:00
|
|
|
if (isLoading) {
|
|
|
|
|
return <PageSkeleton variant="list" />;
|
|
|
|
|
}
|
|
|
|
|
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
const filtered = filterAgents(agents ?? [], tab, showTerminated);
|
|
|
|
|
const filteredOrg = filterOrgTree(orgTree ?? [], tab, showTerminated);
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -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:32:32 -06:00
|
|
|
<div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
|
2026-02-19 14:39:48 -06:00
|
|
|
<Tabs value={tab} onValueChange={(v) => navigate(`/agents/${v}`)}>
|
2026-02-20 10:32:32 -06:00
|
|
|
<PageTabBar
|
|
|
|
|
items={[
|
|
|
|
|
{ value: "all", label: "All" },
|
|
|
|
|
{ value: "active", label: "Active" },
|
|
|
|
|
{ value: "paused", label: "Paused" },
|
|
|
|
|
{ value: "error", label: "Error" },
|
|
|
|
|
]}
|
|
|
|
|
value={tab}
|
|
|
|
|
onValueChange={(v) => navigate(`/agents/${v}`)}
|
|
|
|
|
/>
|
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>
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
<div className="flex items-center gap-2">
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
{/* Filters */}
|
|
|
|
|
<div className="relative">
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-1.5 px-2 py-1.5 text-xs transition-colors border border-border",
|
|
|
|
|
filtersOpen || showTerminated ? "text-foreground bg-accent" : "text-muted-foreground hover:bg-accent/50"
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => setFiltersOpen(!filtersOpen)}
|
|
|
|
|
>
|
|
|
|
|
<SlidersHorizontal className="h-3 w-3" />
|
|
|
|
|
Filters
|
|
|
|
|
{showTerminated && <span className="ml-0.5 px-1 bg-foreground/10 rounded text-[10px]">1</span>}
|
|
|
|
|
</button>
|
|
|
|
|
{filtersOpen && (
|
|
|
|
|
<div className="absolute right-0 top-full mt-1 z-50 w-48 border border-border bg-popover shadow-md p-1">
|
|
|
|
|
<button
|
|
|
|
|
className="flex items-center gap-2 w-full px-2 py-1.5 text-xs text-left hover:bg-accent/50 transition-colors"
|
|
|
|
|
onClick={() => setShowTerminated(!showTerminated)}
|
|
|
|
|
>
|
|
|
|
|
<span className={cn(
|
|
|
|
|
"flex items-center justify-center h-3.5 w-3.5 border border-border rounded-sm",
|
|
|
|
|
showTerminated && "bg-foreground"
|
|
|
|
|
)}>
|
|
|
|
|
{showTerminated && <span className="text-background text-[10px] leading-none">✓</span>}
|
|
|
|
|
</span>
|
|
|
|
|
Show terminated
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
{/* View toggle */}
|
2026-02-20 11:29:13 -06:00
|
|
|
{!forceListView && (
|
|
|
|
|
<div className="flex items-center border border-border">
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"p-1.5 transition-colors",
|
|
|
|
|
effectiveView === "list" ? "bg-accent text-foreground" : "text-muted-foreground hover:bg-accent/50"
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => setView("list")}
|
|
|
|
|
>
|
|
|
|
|
<List className="h-3.5 w-3.5" />
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"p-1.5 transition-colors",
|
|
|
|
|
effectiveView === "org" ? "bg-accent text-foreground" : "text-muted-foreground hover:bg-accent/50"
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => setView("org")}
|
|
|
|
|
>
|
|
|
|
|
<GitBranch className="h-3.5 w-3.5" />
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-02-23 14:41:21 -06:00
|
|
|
<Button size="sm" variant="outline" onClick={openNewAgent}>
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
<Plus className="h-3.5 w-3.5 mr-1.5" />
|
|
|
|
|
New Agent
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
{filtered.length > 0 && (
|
|
|
|
|
<p className="text-xs text-muted-foreground">{filtered.length} agent{filtered.length !== 1 ? "s" : ""}</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>}
|
|
|
|
|
|
|
|
|
|
{agents && agents.length === 0 && (
|
2026-02-17 10:53:20 -06:00
|
|
|
<EmptyState
|
|
|
|
|
icon={Bot}
|
2026-02-17 13:24:33 -06:00
|
|
|
message="Create your first agent to get started."
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
action="New Agent"
|
|
|
|
|
onAction={openNewAgent}
|
2026-02-17 10:53:20 -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
|
|
|
)}
|
|
|
|
|
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
{/* List view */}
|
2026-02-20 11:29:13 -06:00
|
|
|
{effectiveView === "list" && filtered.length > 0 && (
|
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
|
|
|
<div className="border border-border">
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
{filtered.map((agent) => {
|
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 (
|
|
|
|
|
<EntityRow
|
|
|
|
|
key={agent.id}
|
|
|
|
|
title={agent.name}
|
2026-03-07 16:04:22 -08:00
|
|
|
subtitle={`${roleLabels[agent.role] ?? agent.role}${agent.title ? ` - ${agent.title}` : ""}`}
|
2026-03-02 16:44:03 -06:00
|
|
|
to={agentUrl(agent)}
|
2026-04-03 23:22:02 +09:00
|
|
|
className={agent.pausedAt && tab !== "paused" ? "opacity-50" : ""}
|
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
|
|
|
leading={
|
|
|
|
|
<span className="relative flex h-2.5 w-2.5">
|
|
|
|
|
<span
|
2026-02-23 19:52:43 -06:00
|
|
|
className={`absolute inline-flex h-full w-full rounded-full ${agentStatusDot[agent.status] ?? agentStatusDotDefault}`}
|
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
|
|
|
/>
|
|
|
|
|
</span>
|
|
|
|
|
}
|
|
|
|
|
trailing={
|
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
|
|
|
<div className="flex items-center gap-3">
|
2026-02-20 11:29:13 -06:00
|
|
|
<span className="sm:hidden">
|
|
|
|
|
{liveRunByAgent.has(agent.id) ? (
|
|
|
|
|
<LiveRunIndicator
|
2026-03-02 16:44:03 -06:00
|
|
|
agentRef={agentRouteRef(agent)}
|
2026-02-20 11:29:13 -06:00
|
|
|
runId={liveRunByAgent.get(agent.id)!.runId}
|
2026-02-20 12:50:34 -06:00
|
|
|
liveCount={liveRunByAgent.get(agent.id)!.liveCount}
|
2026-02-20 11:29:13 -06:00
|
|
|
/>
|
|
|
|
|
) : (
|
|
|
|
|
<StatusBadge status={agent.status} />
|
|
|
|
|
)}
|
2026-02-19 14:39:48 -06:00
|
|
|
</span>
|
2026-02-20 11:29:13 -06:00
|
|
|
<div className="hidden sm:flex items-center gap-3">
|
|
|
|
|
{liveRunByAgent.has(agent.id) && (
|
|
|
|
|
<LiveRunIndicator
|
2026-03-02 16:44:03 -06:00
|
|
|
agentRef={agentRouteRef(agent)}
|
2026-02-20 11:29:13 -06:00
|
|
|
runId={liveRunByAgent.get(agent.id)!.runId}
|
2026-02-20 12:50:34 -06:00
|
|
|
liveCount={liveRunByAgent.get(agent.id)!.liveCount}
|
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 11:29:13 -06:00
|
|
|
)}
|
|
|
|
|
<span className="text-xs text-muted-foreground font-mono w-14 text-right">
|
2026-03-31 20:21:13 +01:00
|
|
|
{getAdapterLabel(agent.adapterType)}
|
2026-02-20 11:29:13 -06:00
|
|
|
</span>
|
|
|
|
|
<span className="text-xs text-muted-foreground w-16 text-right">
|
|
|
|
|
{agent.lastHeartbeatAt ? relativeTime(agent.lastHeartbeatAt) : "—"}
|
|
|
|
|
</span>
|
|
|
|
|
<span className="w-20 flex justify-end">
|
|
|
|
|
<StatusBadge status={agent.status} />
|
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
|
|
|
</span>
|
|
|
|
|
</div>
|
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
|
|
|
</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
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
})}
|
2026-02-16 13:32:04 -06:00
|
|
|
</div>
|
|
|
|
|
)}
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
|
2026-02-20 11:29:13 -06:00
|
|
|
{effectiveView === "list" && agents && agents.length > 0 && filtered.length === 0 && (
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
<p className="text-sm text-muted-foreground text-center py-8">
|
|
|
|
|
No agents match the selected filter.
|
|
|
|
|
</p>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{/* Org chart view */}
|
2026-02-20 11:29:13 -06:00
|
|
|
{effectiveView === "org" && filteredOrg.length > 0 && (
|
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
|
|
|
<div className="border border-border py-1">
|
2026-02-17 20:07:36 -06:00
|
|
|
{filteredOrg.map((node) => (
|
2026-04-03 23:37:03 +09:00
|
|
|
<OrgTreeNode key={node.id} node={node} depth={0} agentMap={agentMap} liveRunByAgent={liveRunByAgent} tab={tab} />
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
2026-02-20 11:29:13 -06:00
|
|
|
{effectiveView === "org" && orgTree && orgTree.length > 0 && filteredOrg.length === 0 && (
|
2026-02-17 20:07:36 -06:00
|
|
|
<p className="text-sm text-muted-foreground text-center py-8">
|
|
|
|
|
No agents match the selected filter.
|
|
|
|
|
</p>
|
|
|
|
|
)}
|
|
|
|
|
|
2026-02-20 11:29:13 -06:00
|
|
|
{effectiveView === "org" && orgTree && orgTree.length === 0 && (
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
<p className="text-sm text-muted-foreground text-center py-8">
|
|
|
|
|
No organizational hierarchy defined.
|
|
|
|
|
</p>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function OrgTreeNode({
|
|
|
|
|
node,
|
|
|
|
|
depth,
|
2026-02-17 20:07:36 -06:00
|
|
|
agentMap,
|
2026-02-20 10:32:32 -06:00
|
|
|
liveRunByAgent,
|
2026-04-03 23:37:03 +09:00
|
|
|
tab,
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
}: {
|
|
|
|
|
node: OrgNode;
|
|
|
|
|
depth: number;
|
2026-02-17 20:07:36 -06:00
|
|
|
agentMap: Map<string, Agent>;
|
2026-02-20 12:50:34 -06:00
|
|
|
liveRunByAgent: Map<string, { runId: string; liveCount: number }>;
|
2026-04-03 23:37:03 +09:00
|
|
|
tab: FilterTab;
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
}) {
|
2026-02-17 20:07:36 -06:00
|
|
|
const agent = agentMap.get(node.id);
|
|
|
|
|
|
2026-02-23 19:52:43 -06:00
|
|
|
const statusColor = agentStatusDot[node.status] ?? agentStatusDotDefault;
|
2026-02-17 20:07:36 -06:00
|
|
|
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
return (
|
|
|
|
|
<div style={{ paddingLeft: depth * 24 }}>
|
2026-02-23 14:41:21 -06:00
|
|
|
<Link
|
2026-03-02 16:44:03 -06:00
|
|
|
to={agent ? agentUrl(agent) : `/agents/${node.id}`}
|
2026-04-03 23:37:03 +09:00
|
|
|
className={cn("flex items-center gap-3 px-3 py-2 hover:bg-accent/30 transition-colors w-full text-left no-underline text-inherit", agent?.pausedAt && tab !== "paused" && "opacity-50")}
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
>
|
|
|
|
|
<span className="relative flex h-2.5 w-2.5 shrink-0">
|
|
|
|
|
<span className={`absolute inline-flex h-full w-full rounded-full ${statusColor}`} />
|
|
|
|
|
</span>
|
|
|
|
|
<div className="flex-1 min-w-0">
|
|
|
|
|
<span className="text-sm font-medium">{node.name}</span>
|
|
|
|
|
<span className="text-xs text-muted-foreground ml-2">
|
|
|
|
|
{roleLabels[node.role] ?? node.role}
|
2026-02-17 20:07:36 -06:00
|
|
|
{agent?.title ? ` - ${agent.title}` : ""}
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
</span>
|
|
|
|
|
</div>
|
2026-02-17 20:07:36 -06:00
|
|
|
<div className="flex items-center gap-3 shrink-0">
|
2026-02-20 11:29:13 -06:00
|
|
|
<span className="sm:hidden">
|
|
|
|
|
{liveRunByAgent.has(node.id) ? (
|
|
|
|
|
<LiveRunIndicator
|
2026-03-02 16:44:03 -06:00
|
|
|
agentRef={agent ? agentRouteRef(agent) : node.id}
|
2026-02-20 11:29:13 -06:00
|
|
|
runId={liveRunByAgent.get(node.id)!.runId}
|
2026-02-20 12:50:34 -06:00
|
|
|
liveCount={liveRunByAgent.get(node.id)!.liveCount}
|
2026-02-20 11:29:13 -06:00
|
|
|
/>
|
|
|
|
|
) : (
|
|
|
|
|
<StatusBadge status={node.status} />
|
|
|
|
|
)}
|
2026-02-19 14:39:48 -06:00
|
|
|
</span>
|
2026-02-20 11:29:13 -06:00
|
|
|
<div className="hidden sm:flex items-center gap-3">
|
|
|
|
|
{liveRunByAgent.has(node.id) && (
|
|
|
|
|
<LiveRunIndicator
|
2026-03-02 16:44:03 -06:00
|
|
|
agentRef={agent ? agentRouteRef(agent) : node.id}
|
2026-02-20 11:29:13 -06:00
|
|
|
runId={liveRunByAgent.get(node.id)!.runId}
|
2026-02-20 12:50:34 -06:00
|
|
|
liveCount={liveRunByAgent.get(node.id)!.liveCount}
|
2026-02-20 11:29:13 -06:00
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
{agent && (
|
|
|
|
|
<>
|
|
|
|
|
<span className="text-xs text-muted-foreground font-mono w-14 text-right">
|
2026-03-31 20:21:13 +01:00
|
|
|
{getAdapterLabel(agent.adapterType)}
|
2026-02-20 11:29:13 -06:00
|
|
|
</span>
|
|
|
|
|
<span className="text-xs text-muted-foreground w-16 text-right">
|
|
|
|
|
{agent.lastHeartbeatAt ? relativeTime(agent.lastHeartbeatAt) : "—"}
|
|
|
|
|
</span>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
<span className="w-20 flex justify-end">
|
|
|
|
|
<StatusBadge status={node.status} />
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2026-02-17 20:07:36 -06:00
|
|
|
</div>
|
2026-02-23 14:41:21 -06:00
|
|
|
</Link>
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
{node.reports && node.reports.length > 0 && (
|
|
|
|
|
<div className="border-l border-border/50 ml-4">
|
|
|
|
|
{node.reports.map((child) => (
|
2026-04-03 23:37:03 +09:00
|
|
|
<OrgTreeNode key={child.id} node={child} depth={depth + 1} agentMap={agentMap} liveRunByAgent={liveRunByAgent} tab={tab} />
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-02-16 13:32:04 -06:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
2026-02-20 10:32:32 -06:00
|
|
|
|
|
|
|
|
function LiveRunIndicator({
|
2026-03-02 16:44:03 -06:00
|
|
|
agentRef,
|
2026-02-20 10:32:32 -06:00
|
|
|
runId,
|
2026-02-20 12:50:34 -06:00
|
|
|
liveCount,
|
2026-02-20 10:32:32 -06:00
|
|
|
}: {
|
2026-03-02 16:44:03 -06:00
|
|
|
agentRef: string;
|
2026-02-20 10:32:32 -06:00
|
|
|
runId: string;
|
2026-02-20 12:50:34 -06:00
|
|
|
liveCount: number;
|
2026-02-20 10:32:32 -06:00
|
|
|
}) {
|
|
|
|
|
return (
|
2026-02-23 14:41:21 -06:00
|
|
|
<Link
|
2026-03-02 16:44:03 -06:00
|
|
|
to={`/agents/${agentRef}/runs/${runId}`}
|
2026-02-23 14:41:21 -06:00
|
|
|
className="flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-blue-500/10 hover:bg-blue-500/20 transition-colors no-underline"
|
|
|
|
|
onClick={(e) => e.stopPropagation()}
|
2026-02-20 10:32:32 -06:00
|
|
|
>
|
|
|
|
|
<span className="relative flex h-2 w-2">
|
ui: apply interface polish from design article review
- Add global font smoothing (antialiased) to body
- Add tabular-nums to all numeric displays: MetricCard values, Costs page,
AgentDetail token/cost grids and tables, IssueDetail cost summary,
Companies page budget display
- Replace markdown image hard border with subtle inset box-shadow overlay
- Replace all animate-ping status dots with calmer animate-pulse across
AgentDetail, IssueDetail, Agents, sidebar, kanban, issues list, and
active agents panel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 08:20:24 -05:00
|
|
|
<span className="animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75" />
|
2026-02-20 10:32:32 -06:00
|
|
|
<span className="relative inline-flex rounded-full h-2 w-2 bg-blue-500" />
|
|
|
|
|
</span>
|
2026-02-26 16:32:59 -06:00
|
|
|
<span className="text-[11px] font-medium text-blue-600 dark:text-blue-400">
|
2026-02-20 12:50:34 -06:00
|
|
|
Live{liveCount > 1 ? ` (${liveCount})` : ""}
|
|
|
|
|
</span>
|
2026-02-23 14:41:21 -06:00
|
|
|
</Link>
|
2026-02-20 10:32:32 -06:00
|
|
|
);
|
|
|
|
|
}
|