2026-02-17 12:24:48 -06:00
|
|
|
import { useEffect } from "react";
|
2026-03-02 16:44:03 -06:00
|
|
|
import { useParams } from "@/lib/router";
|
2026-02-18 16:46:55 -06:00
|
|
|
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
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 { goalsApi } from "../api/goals";
|
|
|
|
|
import { projectsApi } from "../api/projects";
|
Add MarkdownEditor component, asset image upload, and rich description editing
Introduce MarkdownEditor built on @mdxeditor/editor with headings,
lists, links, quotes, image upload with drag-and-drop, and themed CSS
integration. Add asset image upload API (routes, service, storage) and
wire image upload into InlineEditor multiline mode, NewIssueDialog,
NewProjectDialog, GoalDetail, IssueDetail, and ProjectDetail
description fields. Tighten prompt template editor styling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:50:45 -06:00
|
|
|
import { assetsApi } from "../api/assets";
|
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 { usePanel } from "../context/PanelContext";
|
|
|
|
|
import { useCompany } from "../context/CompanyContext";
|
2026-02-20 13:12:39 -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-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 { GoalProperties } from "../components/GoalProperties";
|
|
|
|
|
import { GoalTree } from "../components/GoalTree";
|
|
|
|
|
import { StatusBadge } from "../components/StatusBadge";
|
2026-02-18 16:46:55 -06:00
|
|
|
import { InlineEditor } from "../components/InlineEditor";
|
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";
|
2026-03-02 16:44:03 -06:00
|
|
|
import { PageSkeleton } from "../components/PageSkeleton";
|
2026-03-30 12:49:22 +05:30
|
|
|
import { cn, projectUrl } from "../lib/utils";
|
2026-02-20 13:12:39 -06:00
|
|
|
import { Button } from "@/components/ui/button";
|
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 { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
2026-03-30 12:49:22 +05:30
|
|
|
import { Plus, SlidersHorizontal } from "lucide-react";
|
2026-03-03 08:45:26 -06:00
|
|
|
import type { Goal, Project } from "@paperclipai/shared";
|
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-03-30 12:49:22 +05:30
|
|
|
interface GoalPropertiesToggleButtonProps {
|
|
|
|
|
panelVisible: boolean;
|
|
|
|
|
onShowProperties: () => void;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function GoalPropertiesToggleButton({
|
|
|
|
|
panelVisible,
|
|
|
|
|
onShowProperties,
|
|
|
|
|
}: GoalPropertiesToggleButtonProps) {
|
|
|
|
|
return (
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="icon-xs"
|
|
|
|
|
className={cn(
|
|
|
|
|
"hidden md:inline-flex shrink-0 transition-opacity duration-200",
|
|
|
|
|
panelVisible ? "opacity-0 pointer-events-none w-0 overflow-hidden" : "opacity-100",
|
|
|
|
|
)}
|
|
|
|
|
onClick={onShowProperties}
|
|
|
|
|
title="Show properties"
|
|
|
|
|
>
|
|
|
|
|
<SlidersHorizontal className="h-4 w-4" />
|
|
|
|
|
</Button>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
export function GoalDetail() {
|
|
|
|
|
const { goalId } = useParams<{ goalId: string }>();
|
2026-03-02 16:44:03 -06:00
|
|
|
const { selectedCompanyId, setSelectedCompanyId } = useCompany();
|
2026-02-20 13:12:39 -06:00
|
|
|
const { openNewGoal } = useDialog();
|
2026-03-30 12:49:22 +05:30
|
|
|
const { openPanel, closePanel, panelVisible, setPanelVisible } = usePanel();
|
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();
|
2026-02-18 16:46:55 -06:00
|
|
|
const queryClient = useQueryClient();
|
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-23 14:41:21 -06:00
|
|
|
const {
|
|
|
|
|
data: goal,
|
|
|
|
|
isLoading,
|
|
|
|
|
error
|
|
|
|
|
} = useQuery({
|
2026-02-17 12:24:48 -06:00
|
|
|
queryKey: queryKeys.goals.detail(goalId!),
|
|
|
|
|
queryFn: () => goalsApi.get(goalId!),
|
2026-02-23 14:41:21 -06:00
|
|
|
enabled: !!goalId
|
2026-02-17 12:24:48 -06:00
|
|
|
});
|
2026-03-02 16:44:03 -06:00
|
|
|
const resolvedCompanyId = goal?.companyId ?? 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 12:24:48 -06:00
|
|
|
const { data: allGoals } = useQuery({
|
2026-03-02 16:44:03 -06:00
|
|
|
queryKey: queryKeys.goals.list(resolvedCompanyId!),
|
|
|
|
|
queryFn: () => goalsApi.list(resolvedCompanyId!),
|
|
|
|
|
enabled: !!resolvedCompanyId
|
2026-02-17 12:24:48 -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-17 12:24:48 -06:00
|
|
|
const { data: allProjects } = useQuery({
|
2026-03-02 16:44:03 -06:00
|
|
|
queryKey: queryKeys.projects.list(resolvedCompanyId!),
|
|
|
|
|
queryFn: () => projectsApi.list(resolvedCompanyId!),
|
|
|
|
|
enabled: !!resolvedCompanyId
|
2026-02-17 12:24:48 -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-03-02 16:44:03 -06:00
|
|
|
useEffect(() => {
|
|
|
|
|
if (!goal?.companyId || goal.companyId === selectedCompanyId) return;
|
|
|
|
|
setSelectedCompanyId(goal.companyId, { source: "route_sync" });
|
|
|
|
|
}, [goal?.companyId, selectedCompanyId, setSelectedCompanyId]);
|
|
|
|
|
|
2026-02-18 16:46:55 -06:00
|
|
|
const updateGoal = useMutation({
|
2026-02-23 14:41:21 -06:00
|
|
|
mutationFn: (data: Record<string, unknown>) =>
|
|
|
|
|
goalsApi.update(goalId!, data),
|
2026-02-18 16:46:55 -06:00
|
|
|
onSuccess: () => {
|
2026-02-23 14:41:21 -06:00
|
|
|
queryClient.invalidateQueries({
|
|
|
|
|
queryKey: queryKeys.goals.detail(goalId!)
|
|
|
|
|
});
|
2026-03-02 16:44:03 -06:00
|
|
|
if (resolvedCompanyId) {
|
2026-02-23 14:41:21 -06:00
|
|
|
queryClient.invalidateQueries({
|
2026-03-02 16:44:03 -06:00
|
|
|
queryKey: queryKeys.goals.list(resolvedCompanyId)
|
2026-02-23 14:41:21 -06:00
|
|
|
});
|
2026-02-18 16:46:55 -06:00
|
|
|
}
|
2026-02-23 14:41:21 -06:00
|
|
|
}
|
2026-02-18 16:46:55 -06:00
|
|
|
});
|
|
|
|
|
|
Add MarkdownEditor component, asset image upload, and rich description editing
Introduce MarkdownEditor built on @mdxeditor/editor with headings,
lists, links, quotes, image upload with drag-and-drop, and themed CSS
integration. Add asset image upload API (routes, service, storage) and
wire image upload into InlineEditor multiline mode, NewIssueDialog,
NewProjectDialog, GoalDetail, IssueDetail, and ProjectDetail
description fields. Tighten prompt template editor styling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:50:45 -06:00
|
|
|
const uploadImage = useMutation({
|
|
|
|
|
mutationFn: async (file: File) => {
|
2026-03-02 16:44:03 -06:00
|
|
|
if (!resolvedCompanyId) throw new Error("No company selected");
|
2026-02-23 14:41:21 -06:00
|
|
|
return assetsApi.uploadImage(
|
2026-03-02 16:44:03 -06:00
|
|
|
resolvedCompanyId,
|
2026-02-23 14:41:21 -06:00
|
|
|
file,
|
|
|
|
|
`goals/${goalId ?? "draft"}`
|
|
|
|
|
);
|
|
|
|
|
}
|
Add MarkdownEditor component, asset image upload, and rich description editing
Introduce MarkdownEditor built on @mdxeditor/editor with headings,
lists, links, quotes, image upload with drag-and-drop, and themed CSS
integration. Add asset image upload API (routes, service, storage) and
wire image upload into InlineEditor multiline mode, NewIssueDialog,
NewProjectDialog, GoalDetail, IssueDetail, and ProjectDetail
description fields. Tighten prompt template editor styling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:50:45 -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 childGoals = (allGoals ?? []).filter((g) => g.parentId === goalId);
|
2026-02-20 15:48:42 -06:00
|
|
|
const linkedProjects = (allProjects ?? []).filter((p) => {
|
|
|
|
|
if (!goalId) return false;
|
|
|
|
|
if (p.goalIds.includes(goalId)) return true;
|
|
|
|
|
if (p.goals.some((goalRef) => goalRef.id === goalId)) return true;
|
|
|
|
|
return p.goalId === goalId;
|
|
|
|
|
});
|
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: "Goals", href: "/goals" },
|
2026-02-23 14:41:21 -06:00
|
|
|
{ label: goal?.title ?? goalId ?? "Goal" }
|
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
|
|
|
]);
|
|
|
|
|
}, [setBreadcrumbs, goal, goalId]);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (goal) {
|
2026-02-18 16:46:55 -06:00
|
|
|
openPanel(
|
2026-02-23 14:41:21 -06:00
|
|
|
<GoalProperties
|
|
|
|
|
goal={goal}
|
|
|
|
|
onUpdate={(data) => updateGoal.mutate(data)}
|
|
|
|
|
/>
|
2026-02-18 16:46:55 -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
|
|
|
}
|
|
|
|
|
return () => closePanel();
|
|
|
|
|
}, [goal]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
|
|
|
|
2026-03-02 16:44:03 -06:00
|
|
|
if (isLoading) return <PageSkeleton variant="detail" />;
|
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
|
|
|
if (error) return <p className="text-sm text-destructive">{error.message}</p>;
|
|
|
|
|
if (!goal) return null;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="space-y-6">
|
2026-02-18 16:46:55 -06:00
|
|
|
<div className="space-y-3">
|
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="flex items-center gap-2">
|
2026-02-23 14:41:21 -06:00
|
|
|
<span className="text-xs uppercase text-muted-foreground">
|
|
|
|
|
{goal.level}
|
|
|
|
|
</span>
|
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
|
|
|
<StatusBadge status={goal.status} />
|
2026-03-30 12:49:22 +05:30
|
|
|
<div className="ml-auto">
|
|
|
|
|
<GoalPropertiesToggleButton
|
|
|
|
|
panelVisible={panelVisible}
|
|
|
|
|
onShowProperties={() => setPanelVisible(true)}
|
|
|
|
|
/>
|
|
|
|
|
</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-18 16:46:55 -06:00
|
|
|
|
|
|
|
|
<InlineEditor
|
|
|
|
|
value={goal.title}
|
|
|
|
|
onSave={(title) => updateGoal.mutate({ title })}
|
|
|
|
|
as="h2"
|
|
|
|
|
className="text-xl font-bold"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<InlineEditor
|
|
|
|
|
value={goal.description ?? ""}
|
|
|
|
|
onSave={(description) => updateGoal.mutate({ description })}
|
|
|
|
|
as="p"
|
|
|
|
|
className="text-sm text-muted-foreground"
|
|
|
|
|
placeholder="Add a description..."
|
|
|
|
|
multiline
|
Add MarkdownEditor component, asset image upload, and rich description editing
Introduce MarkdownEditor built on @mdxeditor/editor with headings,
lists, links, quotes, image upload with drag-and-drop, and themed CSS
integration. Add asset image upload API (routes, service, storage) and
wire image upload into InlineEditor multiline mode, NewIssueDialog,
NewProjectDialog, GoalDetail, IssueDetail, and ProjectDetail
description fields. Tighten prompt template editor styling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:50:45 -06:00
|
|
|
imageUploadHandler={async (file) => {
|
|
|
|
|
const asset = await uploadImage.mutateAsync(file);
|
|
|
|
|
return asset.contentPath;
|
|
|
|
|
}}
|
2026-02-18 16:46:55 -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
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Tabs defaultValue="children">
|
|
|
|
|
<TabsList>
|
2026-02-23 14:41:21 -06:00
|
|
|
<TabsTrigger value="children">
|
|
|
|
|
Sub-Goals ({childGoals.length})
|
|
|
|
|
</TabsTrigger>
|
|
|
|
|
<TabsTrigger value="projects">
|
|
|
|
|
Projects ({linkedProjects.length})
|
|
|
|
|
</TabsTrigger>
|
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
|
|
|
</TabsList>
|
|
|
|
|
|
2026-02-20 13:12:39 -06:00
|
|
|
<TabsContent value="children" className="mt-4 space-y-3">
|
2026-02-23 14:41:21 -06:00
|
|
|
<div className="flex items-center justify-start">
|
|
|
|
|
<Button
|
|
|
|
|
size="sm"
|
|
|
|
|
variant="outline"
|
|
|
|
|
onClick={() => openNewGoal({ parentId: goalId })}
|
|
|
|
|
>
|
2026-02-20 13:12:39 -06:00
|
|
|
<Plus className="h-3.5 w-3.5 mr-1.5" />
|
|
|
|
|
Sub Goal
|
|
|
|
|
</Button>
|
|
|
|
|
</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
|
|
|
{childGoals.length === 0 ? (
|
|
|
|
|
<p className="text-sm text-muted-foreground">No sub-goals.</p>
|
|
|
|
|
) : (
|
2026-02-23 14:41:21 -06:00
|
|
|
<GoalTree goals={childGoals} goalLink={(g) => `/goals/${g.id}`} />
|
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
|
|
|
)}
|
|
|
|
|
</TabsContent>
|
|
|
|
|
|
|
|
|
|
<TabsContent value="projects" className="mt-4">
|
|
|
|
|
{linkedProjects.length === 0 ? (
|
|
|
|
|
<p className="text-sm text-muted-foreground">No linked projects.</p>
|
|
|
|
|
) : (
|
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">
|
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
|
|
|
{linkedProjects.map((project) => (
|
|
|
|
|
<EntityRow
|
|
|
|
|
key={project.id}
|
|
|
|
|
title={project.name}
|
|
|
|
|
subtitle={project.description ?? undefined}
|
2026-03-02 16:44:03 -06:00
|
|
|
to={projectUrl(project)}
|
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
|
|
|
trailing={<StatusBadge status={project.status} />}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</TabsContent>
|
|
|
|
|
</Tabs>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|