2026-02-26 08:53:03 -06:00
|
|
|
import { useState, useEffect, useRef, useCallback, useMemo, type ChangeEvent } from "react";
|
2026-02-17 12:24:48 -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 { useDialog } from "../context/DialogContext";
|
|
|
|
|
import { useCompany } from "../context/CompanyContext";
|
2026-02-20 13:47:13 -06:00
|
|
|
import { useToast } from "../context/ToastContext";
|
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 { issuesApi } from "../api/issues";
|
2026-02-17 10:53:20 -06:00
|
|
|
import { projectsApi } from "../api/projects";
|
2026-02-17 12:24:48 -06:00
|
|
|
import { agentsApi } from "../api/agents";
|
2026-03-02 14:20:49 -06:00
|
|
|
import { authApi } from "../api/auth";
|
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";
|
2026-02-17 12:24:48 -06:00
|
|
|
import { queryKeys } from "../lib/queryKeys";
|
2026-03-02 14:20:49 -06:00
|
|
|
import { useProjectOrder } from "../hooks/useProjectOrder";
|
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 {
|
|
|
|
|
Dialog,
|
|
|
|
|
DialogContent,
|
|
|
|
|
} from "@/components/ui/dialog";
|
|
|
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
|
import {
|
2026-02-17 10:53:20 -06:00
|
|
|
Popover,
|
|
|
|
|
PopoverContent,
|
|
|
|
|
PopoverTrigger,
|
|
|
|
|
} from "@/components/ui/popover";
|
|
|
|
|
import {
|
|
|
|
|
Maximize2,
|
|
|
|
|
Minimize2,
|
|
|
|
|
MoreHorizontal,
|
2026-02-26 10:32:44 -06:00
|
|
|
ChevronRight,
|
|
|
|
|
ChevronDown,
|
2026-02-17 10:53:20 -06:00
|
|
|
CircleDot,
|
|
|
|
|
Minus,
|
|
|
|
|
ArrowUp,
|
|
|
|
|
ArrowDown,
|
|
|
|
|
AlertTriangle,
|
|
|
|
|
Tag,
|
|
|
|
|
Calendar,
|
2026-02-25 21:36:06 -06:00
|
|
|
Paperclip,
|
2026-02-17 10:53:20 -06:00
|
|
|
} from "lucide-react";
|
|
|
|
|
import { cn } from "../lib/utils";
|
2026-02-23 19:52:43 -06:00
|
|
|
import { issueStatusText, issueStatusTextDefault, priorityColor, priorityColorDefault } from "../lib/status-colors";
|
2026-03-02 13:31:58 -06:00
|
|
|
import { MarkdownEditor, type MarkdownEditorRef, type MentionOption } from "./MarkdownEditor";
|
2026-02-23 14:41:21 -06:00
|
|
|
import { AgentIcon } from "./AgentIconPicker";
|
2026-02-26 08:53:03 -06:00
|
|
|
import { InlineEntitySelector, type InlineEntityOption } from "./InlineEntitySelector";
|
2026-02-17 10:53:20 -06:00
|
|
|
|
2026-02-17 20:46:12 -06:00
|
|
|
const DRAFT_KEY = "paperclip:issue-draft";
|
|
|
|
|
const DEBOUNCE_MS = 800;
|
|
|
|
|
|
2026-02-26 16:33:48 -06:00
|
|
|
/** Return black or white hex based on background luminance (WCAG perceptual weights). */
|
|
|
|
|
function getContrastTextColor(hexColor: string): string {
|
|
|
|
|
const hex = hexColor.replace("#", "");
|
|
|
|
|
const r = parseInt(hex.substring(0, 2), 16);
|
|
|
|
|
const g = parseInt(hex.substring(2, 4), 16);
|
|
|
|
|
const b = parseInt(hex.substring(4, 6), 16);
|
|
|
|
|
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
|
|
|
return luminance > 0.5 ? "#000000" : "#ffffff";
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 15:24:20 +01:00
|
|
|
function extractProviderId(modelId: string): string {
|
|
|
|
|
const trimmed = modelId.trim();
|
|
|
|
|
if (!trimmed.includes("/")) return "other";
|
|
|
|
|
return trimmed.slice(0, trimmed.indexOf("/")).trim() || "other";
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-17 20:46:12 -06:00
|
|
|
interface IssueDraft {
|
|
|
|
|
title: string;
|
|
|
|
|
description: string;
|
|
|
|
|
status: string;
|
|
|
|
|
priority: string;
|
|
|
|
|
assigneeId: string;
|
|
|
|
|
projectId: string;
|
2026-02-26 10:32:44 -06:00
|
|
|
assigneeModelOverride: string;
|
|
|
|
|
assigneeThinkingEffort: string;
|
2026-02-26 16:33:48 -06:00
|
|
|
assigneeChrome: boolean;
|
2026-02-26 10:32:44 -06:00
|
|
|
assigneeUseProjectWorkspace: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 15:24:20 +01:00
|
|
|
const ISSUE_OVERRIDE_ADAPTER_TYPES = new Set(["claude_local", "codex_local", "opencode_local"]);
|
2026-02-26 10:32:44 -06:00
|
|
|
|
|
|
|
|
const ISSUE_THINKING_EFFORT_OPTIONS = {
|
|
|
|
|
claude_local: [
|
|
|
|
|
{ value: "", label: "Default" },
|
|
|
|
|
{ value: "low", label: "Low" },
|
|
|
|
|
{ value: "medium", label: "Medium" },
|
|
|
|
|
{ value: "high", label: "High" },
|
|
|
|
|
],
|
|
|
|
|
codex_local: [
|
|
|
|
|
{ value: "", label: "Default" },
|
|
|
|
|
{ value: "minimal", label: "Minimal" },
|
|
|
|
|
{ value: "low", label: "Low" },
|
|
|
|
|
{ value: "medium", label: "Medium" },
|
|
|
|
|
{ value: "high", label: "High" },
|
|
|
|
|
],
|
2026-03-05 15:24:20 +01:00
|
|
|
opencode_local: [
|
|
|
|
|
{ value: "", label: "Default" },
|
|
|
|
|
{ value: "minimal", label: "Minimal" },
|
|
|
|
|
{ value: "low", label: "Low" },
|
|
|
|
|
{ value: "medium", label: "Medium" },
|
|
|
|
|
{ value: "high", label: "High" },
|
|
|
|
|
{ value: "max", label: "Max" },
|
|
|
|
|
],
|
2026-02-26 10:32:44 -06:00
|
|
|
} as const;
|
|
|
|
|
|
|
|
|
|
function buildAssigneeAdapterOverrides(input: {
|
|
|
|
|
adapterType: string | null | undefined;
|
|
|
|
|
modelOverride: string;
|
|
|
|
|
thinkingEffortOverride: string;
|
2026-02-26 16:33:48 -06:00
|
|
|
chrome: boolean;
|
2026-02-26 10:32:44 -06:00
|
|
|
useProjectWorkspace: boolean;
|
|
|
|
|
}): Record<string, unknown> | null {
|
|
|
|
|
const adapterType = input.adapterType ?? null;
|
|
|
|
|
if (!adapterType || !ISSUE_OVERRIDE_ADAPTER_TYPES.has(adapterType)) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const adapterConfig: Record<string, unknown> = {};
|
|
|
|
|
if (input.modelOverride) adapterConfig.model = input.modelOverride;
|
|
|
|
|
if (input.thinkingEffortOverride) {
|
|
|
|
|
if (adapterType === "codex_local") {
|
|
|
|
|
adapterConfig.modelReasoningEffort = input.thinkingEffortOverride;
|
|
|
|
|
} else if (adapterType === "claude_local") {
|
|
|
|
|
adapterConfig.effort = input.thinkingEffortOverride;
|
2026-03-05 15:24:20 +01:00
|
|
|
} else if (adapterType === "opencode_local") {
|
|
|
|
|
adapterConfig.variant = input.thinkingEffortOverride;
|
2026-02-26 10:32:44 -06:00
|
|
|
}
|
|
|
|
|
}
|
2026-02-26 16:33:48 -06:00
|
|
|
if (adapterType === "claude_local" && input.chrome) {
|
|
|
|
|
adapterConfig.chrome = true;
|
|
|
|
|
}
|
2026-02-26 10:32:44 -06:00
|
|
|
|
|
|
|
|
const overrides: Record<string, unknown> = {};
|
|
|
|
|
if (Object.keys(adapterConfig).length > 0) {
|
|
|
|
|
overrides.adapterConfig = adapterConfig;
|
|
|
|
|
}
|
|
|
|
|
if (!input.useProjectWorkspace) {
|
|
|
|
|
overrides.useProjectWorkspace = false;
|
|
|
|
|
}
|
|
|
|
|
return Object.keys(overrides).length > 0 ? overrides : null;
|
2026-02-17 20:46:12 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function loadDraft(): IssueDraft | null {
|
|
|
|
|
try {
|
|
|
|
|
const raw = localStorage.getItem(DRAFT_KEY);
|
|
|
|
|
if (!raw) return null;
|
|
|
|
|
return JSON.parse(raw) as IssueDraft;
|
|
|
|
|
} catch {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function saveDraft(draft: IssueDraft) {
|
|
|
|
|
localStorage.setItem(DRAFT_KEY, JSON.stringify(draft));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function clearDraft() {
|
|
|
|
|
localStorage.removeItem(DRAFT_KEY);
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-17 10:53:20 -06:00
|
|
|
const statuses = [
|
2026-02-23 19:52:43 -06:00
|
|
|
{ value: "backlog", label: "Backlog", color: issueStatusText.backlog ?? issueStatusTextDefault },
|
|
|
|
|
{ value: "todo", label: "Todo", color: issueStatusText.todo ?? issueStatusTextDefault },
|
|
|
|
|
{ value: "in_progress", label: "In Progress", color: issueStatusText.in_progress ?? issueStatusTextDefault },
|
|
|
|
|
{ value: "in_review", label: "In Review", color: issueStatusText.in_review ?? issueStatusTextDefault },
|
|
|
|
|
{ value: "done", label: "Done", color: issueStatusText.done ?? issueStatusTextDefault },
|
2026-02-17 10:53:20 -06:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const priorities = [
|
2026-02-23 19:52:43 -06:00
|
|
|
{ value: "critical", label: "Critical", icon: AlertTriangle, color: priorityColor.critical ?? priorityColorDefault },
|
|
|
|
|
{ value: "high", label: "High", icon: ArrowUp, color: priorityColor.high ?? priorityColorDefault },
|
|
|
|
|
{ value: "medium", label: "Medium", icon: Minus, color: priorityColor.medium ?? priorityColorDefault },
|
|
|
|
|
{ value: "low", label: "Low", icon: ArrowDown, color: priorityColor.low ?? priorityColorDefault },
|
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
|
|
|
|
2026-02-17 12:24:48 -06:00
|
|
|
export function NewIssueDialog() {
|
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 { newIssueOpen, newIssueDefaults, closeNewIssue } = useDialog();
|
2026-02-26 16:33:48 -06:00
|
|
|
const { companies, selectedCompanyId, selectedCompany } = useCompany();
|
2026-02-20 13:47:13 -06:00
|
|
|
const { pushToast } = useToast();
|
2026-02-17 12:24:48 -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
|
|
|
const [title, setTitle] = useState("");
|
|
|
|
|
const [description, setDescription] = useState("");
|
2026-02-17 10:53:20 -06:00
|
|
|
const [status, setStatus] = useState("todo");
|
|
|
|
|
const [priority, setPriority] = useState("");
|
|
|
|
|
const [assigneeId, setAssigneeId] = useState("");
|
|
|
|
|
const [projectId, setProjectId] = useState("");
|
2026-02-26 10:32:44 -06:00
|
|
|
const [assigneeOptionsOpen, setAssigneeOptionsOpen] = useState(false);
|
|
|
|
|
const [assigneeModelOverride, setAssigneeModelOverride] = useState("");
|
|
|
|
|
const [assigneeThinkingEffort, setAssigneeThinkingEffort] = useState("");
|
2026-02-26 16:33:48 -06:00
|
|
|
const [assigneeChrome, setAssigneeChrome] = useState(false);
|
2026-02-26 10:32:44 -06:00
|
|
|
const [assigneeUseProjectWorkspace, setAssigneeUseProjectWorkspace] = useState(true);
|
2026-02-17 10:53:20 -06:00
|
|
|
const [expanded, setExpanded] = useState(false);
|
2026-02-26 16:33:48 -06:00
|
|
|
const [dialogCompanyId, setDialogCompanyId] = useState<string | null>(null);
|
2026-02-17 20:46:12 -06:00
|
|
|
const draftTimer = useRef<ReturnType<typeof setTimeout> | null>(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
|
|
|
|
2026-02-26 16:33:48 -06:00
|
|
|
const effectiveCompanyId = dialogCompanyId ?? selectedCompanyId;
|
|
|
|
|
const dialogCompany = companies.find((c) => c.id === effectiveCompanyId) ?? selectedCompany;
|
|
|
|
|
|
2026-02-17 10:53:20 -06:00
|
|
|
// Popover states
|
|
|
|
|
const [statusOpen, setStatusOpen] = useState(false);
|
|
|
|
|
const [priorityOpen, setPriorityOpen] = useState(false);
|
|
|
|
|
const [moreOpen, setMoreOpen] = useState(false);
|
2026-02-26 16:33:48 -06:00
|
|
|
const [companyOpen, setCompanyOpen] = useState(false);
|
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 descriptionEditorRef = useRef<MarkdownEditorRef>(null);
|
2026-02-25 21:36:06 -06:00
|
|
|
const attachInputRef = useRef<HTMLInputElement | null>(null);
|
2026-02-26 08:53:03 -06:00
|
|
|
const assigneeSelectorRef = useRef<HTMLButtonElement | null>(null);
|
|
|
|
|
const projectSelectorRef = useRef<HTMLButtonElement | null>(null);
|
2026-02-17 10:53:20 -06:00
|
|
|
|
2026-02-17 12:24:48 -06:00
|
|
|
const { data: agents } = useQuery({
|
2026-02-26 16:33:48 -06:00
|
|
|
queryKey: queryKeys.agents.list(effectiveCompanyId!),
|
|
|
|
|
queryFn: () => agentsApi.list(effectiveCompanyId!),
|
|
|
|
|
enabled: !!effectiveCompanyId && newIssueOpen,
|
2026-02-17 12:24:48 -06:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const { data: projects } = useQuery({
|
2026-02-26 16:33:48 -06:00
|
|
|
queryKey: queryKeys.projects.list(effectiveCompanyId!),
|
|
|
|
|
queryFn: () => projectsApi.list(effectiveCompanyId!),
|
|
|
|
|
enabled: !!effectiveCompanyId && newIssueOpen,
|
2026-02-17 12:24:48 -06:00
|
|
|
});
|
2026-03-02 14:20:49 -06:00
|
|
|
const { data: session } = useQuery({
|
|
|
|
|
queryKey: queryKeys.auth.session,
|
|
|
|
|
queryFn: () => authApi.getSession(),
|
|
|
|
|
});
|
|
|
|
|
const currentUserId = session?.user?.id ?? session?.session?.userId ?? null;
|
|
|
|
|
const { orderedProjects } = useProjectOrder({
|
|
|
|
|
projects: projects ?? [],
|
|
|
|
|
companyId: effectiveCompanyId,
|
|
|
|
|
userId: currentUserId,
|
|
|
|
|
});
|
2026-02-17 10:53:20 -06:00
|
|
|
|
2026-02-26 10:32:44 -06:00
|
|
|
const assigneeAdapterType = (agents ?? []).find((agent) => agent.id === assigneeId)?.adapterType ?? null;
|
|
|
|
|
const supportsAssigneeOverrides = Boolean(
|
|
|
|
|
assigneeAdapterType && ISSUE_OVERRIDE_ADAPTER_TYPES.has(assigneeAdapterType),
|
|
|
|
|
);
|
2026-03-02 13:31:58 -06:00
|
|
|
const mentionOptions = useMemo<MentionOption[]>(() => {
|
|
|
|
|
const options: MentionOption[] = [];
|
|
|
|
|
const activeAgents = [...(agents ?? [])]
|
|
|
|
|
.filter((agent) => agent.status !== "terminated")
|
|
|
|
|
.sort((a, b) => a.name.localeCompare(b.name));
|
|
|
|
|
for (const agent of activeAgents) {
|
|
|
|
|
options.push({
|
|
|
|
|
id: `agent:${agent.id}`,
|
|
|
|
|
name: agent.name,
|
|
|
|
|
kind: "agent",
|
|
|
|
|
});
|
|
|
|
|
}
|
2026-03-02 14:20:49 -06:00
|
|
|
for (const project of orderedProjects) {
|
2026-03-02 13:31:58 -06:00
|
|
|
options.push({
|
|
|
|
|
id: `project:${project.id}`,
|
|
|
|
|
name: project.name,
|
|
|
|
|
kind: "project",
|
|
|
|
|
projectId: project.id,
|
|
|
|
|
projectColor: project.color,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return options;
|
2026-03-02 14:20:49 -06:00
|
|
|
}, [agents, orderedProjects]);
|
2026-02-26 10:32:44 -06:00
|
|
|
|
|
|
|
|
const { data: assigneeAdapterModels } = useQuery({
|
2026-03-05 15:24:20 +01:00
|
|
|
queryKey:
|
|
|
|
|
effectiveCompanyId && assigneeAdapterType
|
|
|
|
|
? queryKeys.agents.adapterModels(effectiveCompanyId, assigneeAdapterType)
|
|
|
|
|
: ["agents", "none", "adapter-models", assigneeAdapterType ?? "none"],
|
|
|
|
|
queryFn: () => agentsApi.adapterModels(effectiveCompanyId!, assigneeAdapterType!),
|
|
|
|
|
enabled: Boolean(effectiveCompanyId) && newIssueOpen && supportsAssigneeOverrides,
|
2026-02-26 10:32:44 -06:00
|
|
|
});
|
|
|
|
|
|
2026-02-17 12:24:48 -06:00
|
|
|
const createIssue = useMutation({
|
2026-02-26 16:33:48 -06:00
|
|
|
mutationFn: ({ companyId, ...data }: { companyId: string } & Record<string, unknown>) =>
|
|
|
|
|
issuesApi.create(companyId, data),
|
2026-02-20 13:47:13 -06:00
|
|
|
onSuccess: (issue) => {
|
2026-02-26 16:33:48 -06:00
|
|
|
queryClient.invalidateQueries({ queryKey: queryKeys.issues.list(effectiveCompanyId!) });
|
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 (draftTimer.current) clearTimeout(draftTimer.current);
|
2026-02-17 20:46:12 -06:00
|
|
|
clearDraft();
|
2026-02-17 12:24:48 -06:00
|
|
|
reset();
|
|
|
|
|
closeNewIssue();
|
2026-02-20 13:47:13 -06:00
|
|
|
pushToast({
|
2026-02-20 13:56:34 -06:00
|
|
|
dedupeKey: `activity:issue.created:${issue.id}`,
|
2026-02-20 13:47:13 -06:00
|
|
|
title: `${issue.identifier ?? "Issue"} created`,
|
|
|
|
|
body: issue.title,
|
|
|
|
|
tone: "success",
|
2026-02-20 16:04:05 -06:00
|
|
|
action: { label: `View ${issue.identifier ?? "issue"}`, href: `/issues/${issue.identifier ?? issue.id}` },
|
2026-02-20 13:47:13 -06:00
|
|
|
});
|
2026-02-17 12:24:48 -06:00
|
|
|
},
|
|
|
|
|
});
|
2026-02-17 10:53:20 -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 uploadDescriptionImage = useMutation({
|
|
|
|
|
mutationFn: async (file: File) => {
|
2026-02-26 16:33:48 -06:00
|
|
|
if (!effectiveCompanyId) throw new Error("No company selected");
|
|
|
|
|
return assetsApi.uploadImage(effectiveCompanyId, file, "issues/drafts");
|
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
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
2026-02-17 20:46:12 -06:00
|
|
|
// Debounced draft saving
|
|
|
|
|
const scheduleSave = useCallback(
|
|
|
|
|
(draft: IssueDraft) => {
|
|
|
|
|
if (draftTimer.current) clearTimeout(draftTimer.current);
|
|
|
|
|
draftTimer.current = setTimeout(() => {
|
|
|
|
|
if (draft.title.trim()) saveDraft(draft);
|
|
|
|
|
}, DEBOUNCE_MS);
|
|
|
|
|
},
|
|
|
|
|
[],
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// Save draft on meaningful changes
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (!newIssueOpen) return;
|
2026-02-26 10:32:44 -06:00
|
|
|
scheduleSave({
|
|
|
|
|
title,
|
|
|
|
|
description,
|
|
|
|
|
status,
|
|
|
|
|
priority,
|
|
|
|
|
assigneeId,
|
|
|
|
|
projectId,
|
|
|
|
|
assigneeModelOverride,
|
|
|
|
|
assigneeThinkingEffort,
|
2026-02-26 16:33:48 -06:00
|
|
|
assigneeChrome,
|
2026-02-26 10:32:44 -06:00
|
|
|
assigneeUseProjectWorkspace,
|
|
|
|
|
});
|
|
|
|
|
}, [
|
|
|
|
|
title,
|
|
|
|
|
description,
|
|
|
|
|
status,
|
|
|
|
|
priority,
|
|
|
|
|
assigneeId,
|
|
|
|
|
projectId,
|
|
|
|
|
assigneeModelOverride,
|
|
|
|
|
assigneeThinkingEffort,
|
2026-02-26 16:33:48 -06:00
|
|
|
assigneeChrome,
|
2026-02-26 10:32:44 -06:00
|
|
|
assigneeUseProjectWorkspace,
|
|
|
|
|
newIssueOpen,
|
|
|
|
|
scheduleSave,
|
|
|
|
|
]);
|
2026-02-17 20:46:12 -06:00
|
|
|
|
|
|
|
|
// Restore draft or apply defaults when dialog opens
|
2026-02-17 10:53:20 -06:00
|
|
|
useEffect(() => {
|
2026-02-17 20:46:12 -06:00
|
|
|
if (!newIssueOpen) return;
|
2026-02-26 16:33:48 -06:00
|
|
|
setDialogCompanyId(selectedCompanyId);
|
2026-02-17 20:46:12 -06:00
|
|
|
|
|
|
|
|
const draft = loadDraft();
|
|
|
|
|
if (draft && draft.title.trim()) {
|
|
|
|
|
setTitle(draft.title);
|
|
|
|
|
setDescription(draft.description);
|
|
|
|
|
setStatus(draft.status || "todo");
|
|
|
|
|
setPriority(draft.priority);
|
|
|
|
|
setAssigneeId(newIssueDefaults.assigneeAgentId ?? draft.assigneeId);
|
|
|
|
|
setProjectId(newIssueDefaults.projectId ?? draft.projectId);
|
2026-02-26 10:32:44 -06:00
|
|
|
setAssigneeModelOverride(draft.assigneeModelOverride ?? "");
|
|
|
|
|
setAssigneeThinkingEffort(draft.assigneeThinkingEffort ?? "");
|
2026-02-26 16:33:48 -06:00
|
|
|
setAssigneeChrome(draft.assigneeChrome ?? false);
|
2026-02-26 10:32:44 -06:00
|
|
|
setAssigneeUseProjectWorkspace(draft.assigneeUseProjectWorkspace ?? true);
|
2026-02-17 20:46:12 -06:00
|
|
|
} else {
|
2026-02-17 10:53:20 -06:00
|
|
|
setStatus(newIssueDefaults.status ?? "todo");
|
|
|
|
|
setPriority(newIssueDefaults.priority ?? "");
|
|
|
|
|
setProjectId(newIssueDefaults.projectId ?? "");
|
2026-02-17 20:07:49 -06:00
|
|
|
setAssigneeId(newIssueDefaults.assigneeAgentId ?? "");
|
2026-02-26 10:32:44 -06:00
|
|
|
setAssigneeModelOverride("");
|
|
|
|
|
setAssigneeThinkingEffort("");
|
2026-02-26 16:33:48 -06:00
|
|
|
setAssigneeChrome(false);
|
2026-02-26 10:32:44 -06:00
|
|
|
setAssigneeUseProjectWorkspace(true);
|
2026-02-17 10:53:20 -06:00
|
|
|
}
|
|
|
|
|
}, [newIssueOpen, newIssueDefaults]);
|
|
|
|
|
|
2026-02-26 10:32:44 -06:00
|
|
|
useEffect(() => {
|
|
|
|
|
if (!supportsAssigneeOverrides) {
|
|
|
|
|
setAssigneeOptionsOpen(false);
|
|
|
|
|
setAssigneeModelOverride("");
|
|
|
|
|
setAssigneeThinkingEffort("");
|
2026-02-26 16:33:48 -06:00
|
|
|
setAssigneeChrome(false);
|
2026-02-26 10:32:44 -06:00
|
|
|
setAssigneeUseProjectWorkspace(true);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const validThinkingValues =
|
|
|
|
|
assigneeAdapterType === "codex_local"
|
|
|
|
|
? ISSUE_THINKING_EFFORT_OPTIONS.codex_local
|
2026-03-05 15:24:20 +01:00
|
|
|
: assigneeAdapterType === "opencode_local"
|
|
|
|
|
? ISSUE_THINKING_EFFORT_OPTIONS.opencode_local
|
|
|
|
|
: ISSUE_THINKING_EFFORT_OPTIONS.claude_local;
|
2026-02-26 10:32:44 -06:00
|
|
|
if (!validThinkingValues.some((option) => option.value === assigneeThinkingEffort)) {
|
|
|
|
|
setAssigneeThinkingEffort("");
|
|
|
|
|
}
|
|
|
|
|
}, [supportsAssigneeOverrides, assigneeAdapterType, assigneeThinkingEffort]);
|
|
|
|
|
|
2026-02-17 20:46:12 -06:00
|
|
|
// Cleanup timer on unmount
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
return () => {
|
|
|
|
|
if (draftTimer.current) clearTimeout(draftTimer.current);
|
|
|
|
|
};
|
|
|
|
|
}, []);
|
|
|
|
|
|
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 reset() {
|
|
|
|
|
setTitle("");
|
|
|
|
|
setDescription("");
|
|
|
|
|
setStatus("todo");
|
2026-02-17 10:53:20 -06:00
|
|
|
setPriority("");
|
|
|
|
|
setAssigneeId("");
|
|
|
|
|
setProjectId("");
|
2026-02-26 10:32:44 -06:00
|
|
|
setAssigneeOptionsOpen(false);
|
|
|
|
|
setAssigneeModelOverride("");
|
|
|
|
|
setAssigneeThinkingEffort("");
|
2026-02-26 16:33:48 -06:00
|
|
|
setAssigneeChrome(false);
|
2026-02-26 10:32:44 -06:00
|
|
|
setAssigneeUseProjectWorkspace(true);
|
2026-02-17 10:53:20 -06:00
|
|
|
setExpanded(false);
|
2026-02-26 16:33:48 -06:00
|
|
|
setDialogCompanyId(null);
|
|
|
|
|
setCompanyOpen(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function handleCompanyChange(companyId: string) {
|
|
|
|
|
if (companyId === effectiveCompanyId) return;
|
|
|
|
|
setDialogCompanyId(companyId);
|
|
|
|
|
setAssigneeId("");
|
|
|
|
|
setProjectId("");
|
|
|
|
|
setAssigneeModelOverride("");
|
|
|
|
|
setAssigneeThinkingEffort("");
|
|
|
|
|
setAssigneeChrome(false);
|
|
|
|
|
setAssigneeUseProjectWorkspace(true);
|
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 20:46:12 -06:00
|
|
|
function discardDraft() {
|
|
|
|
|
clearDraft();
|
|
|
|
|
reset();
|
|
|
|
|
closeNewIssue();
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-17 12:24:48 -06:00
|
|
|
function handleSubmit() {
|
2026-02-26 16:33:48 -06:00
|
|
|
if (!effectiveCompanyId || !title.trim()) return;
|
2026-02-26 10:32:44 -06:00
|
|
|
const assigneeAdapterOverrides = buildAssigneeAdapterOverrides({
|
|
|
|
|
adapterType: assigneeAdapterType,
|
|
|
|
|
modelOverride: assigneeModelOverride,
|
|
|
|
|
thinkingEffortOverride: assigneeThinkingEffort,
|
2026-02-26 16:33:48 -06:00
|
|
|
chrome: assigneeChrome,
|
2026-02-26 10:32:44 -06:00
|
|
|
useProjectWorkspace: assigneeUseProjectWorkspace,
|
|
|
|
|
});
|
2026-02-17 12:24:48 -06:00
|
|
|
createIssue.mutate({
|
2026-02-26 16:33:48 -06:00
|
|
|
companyId: effectiveCompanyId,
|
2026-02-17 12:24:48 -06:00
|
|
|
title: title.trim(),
|
|
|
|
|
description: description.trim() || undefined,
|
|
|
|
|
status,
|
|
|
|
|
priority: priority || "medium",
|
|
|
|
|
...(assigneeId ? { assigneeAgentId: assigneeId } : {}),
|
|
|
|
|
...(projectId ? { projectId } : {}),
|
2026-02-26 10:32:44 -06:00
|
|
|
...(assigneeAdapterOverrides ? { assigneeAdapterOverrides } : {}),
|
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 10:53:20 -06:00
|
|
|
function handleKeyDown(e: React.KeyboardEvent) {
|
|
|
|
|
if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
handleSubmit();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-25 21:36:06 -06:00
|
|
|
async function handleAttachImage(evt: ChangeEvent<HTMLInputElement>) {
|
|
|
|
|
const file = evt.target.files?.[0];
|
|
|
|
|
if (!file) return;
|
|
|
|
|
try {
|
|
|
|
|
const asset = await uploadDescriptionImage.mutateAsync(file);
|
|
|
|
|
const name = file.name || "image";
|
|
|
|
|
setDescription((prev) => {
|
|
|
|
|
const suffix = ``;
|
|
|
|
|
return prev ? `${prev}\n\n${suffix}` : suffix;
|
|
|
|
|
});
|
|
|
|
|
} finally {
|
|
|
|
|
if (attachInputRef.current) attachInputRef.current.value = "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-17 20:46:12 -06:00
|
|
|
const hasDraft = title.trim().length > 0 || description.trim().length > 0;
|
2026-02-17 10:53:20 -06:00
|
|
|
const currentStatus = statuses.find((s) => s.value === status) ?? statuses[1]!;
|
|
|
|
|
const currentPriority = priorities.find((p) => p.value === priority);
|
|
|
|
|
const currentAssignee = (agents ?? []).find((a) => a.id === assigneeId);
|
2026-03-02 14:20:49 -06:00
|
|
|
const currentProject = orderedProjects.find((project) => project.id === projectId);
|
2026-02-26 10:32:44 -06:00
|
|
|
const assigneeOptionsTitle =
|
|
|
|
|
assigneeAdapterType === "claude_local"
|
|
|
|
|
? "Claude options"
|
|
|
|
|
: assigneeAdapterType === "codex_local"
|
|
|
|
|
? "Codex options"
|
2026-03-05 15:24:20 +01:00
|
|
|
: assigneeAdapterType === "opencode_local"
|
|
|
|
|
? "OpenCode options"
|
2026-02-26 10:32:44 -06:00
|
|
|
: "Agent options";
|
|
|
|
|
const thinkingEffortOptions =
|
|
|
|
|
assigneeAdapterType === "codex_local"
|
|
|
|
|
? ISSUE_THINKING_EFFORT_OPTIONS.codex_local
|
2026-03-05 15:24:20 +01:00
|
|
|
: assigneeAdapterType === "opencode_local"
|
|
|
|
|
? ISSUE_THINKING_EFFORT_OPTIONS.opencode_local
|
2026-02-26 10:32:44 -06:00
|
|
|
: ISSUE_THINKING_EFFORT_OPTIONS.claude_local;
|
2026-02-26 08:53:03 -06:00
|
|
|
const assigneeOptions = useMemo<InlineEntityOption[]>(
|
|
|
|
|
() =>
|
|
|
|
|
(agents ?? [])
|
|
|
|
|
.filter((agent) => agent.status !== "terminated")
|
|
|
|
|
.map((agent) => ({
|
|
|
|
|
id: agent.id,
|
|
|
|
|
label: agent.name,
|
|
|
|
|
searchText: `${agent.name} ${agent.role} ${agent.title ?? ""}`,
|
|
|
|
|
})),
|
|
|
|
|
[agents],
|
|
|
|
|
);
|
|
|
|
|
const projectOptions = useMemo<InlineEntityOption[]>(
|
|
|
|
|
() =>
|
2026-03-02 14:20:49 -06:00
|
|
|
orderedProjects.map((project) => ({
|
2026-02-26 08:53:03 -06:00
|
|
|
id: project.id,
|
|
|
|
|
label: project.name,
|
|
|
|
|
searchText: project.description ?? "",
|
|
|
|
|
})),
|
2026-03-02 14:20:49 -06:00
|
|
|
[orderedProjects],
|
2026-02-26 08:53:03 -06:00
|
|
|
);
|
2026-02-26 10:32:44 -06:00
|
|
|
const modelOverrideOptions = useMemo<InlineEntityOption[]>(
|
2026-03-05 15:24:20 +01:00
|
|
|
() => {
|
|
|
|
|
return [...(assigneeAdapterModels ?? [])]
|
|
|
|
|
.sort((a, b) => {
|
|
|
|
|
const providerA = extractProviderId(a.id);
|
|
|
|
|
const providerB = extractProviderId(b.id);
|
|
|
|
|
const byProvider = providerA.localeCompare(providerB);
|
|
|
|
|
if (byProvider !== 0) return byProvider;
|
|
|
|
|
return a.id.localeCompare(b.id);
|
|
|
|
|
})
|
|
|
|
|
.map((model) => ({
|
|
|
|
|
id: model.id,
|
|
|
|
|
label: model.label,
|
|
|
|
|
searchText: `${model.id} ${extractProviderId(model.id)}`,
|
|
|
|
|
}));
|
|
|
|
|
},
|
2026-02-26 10:32:44 -06:00
|
|
|
[assigneeAdapterModels],
|
|
|
|
|
);
|
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
|
|
|
return (
|
|
|
|
|
<Dialog
|
|
|
|
|
open={newIssueOpen}
|
|
|
|
|
onOpenChange={(open) => {
|
2026-02-17 20:46:12 -06:00
|
|
|
if (!open) closeNewIssue();
|
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
|
|
|
<DialogContent
|
|
|
|
|
showCloseButton={false}
|
2026-02-23 15:21:04 -06:00
|
|
|
aria-describedby={undefined}
|
2026-02-17 10:53:20 -06:00
|
|
|
className={cn(
|
2026-02-26 08:53:03 -06:00
|
|
|
"p-0 gap-0 flex flex-col max-h-[calc(100dvh-2rem)]",
|
2026-02-17 20:46:12 -06:00
|
|
|
expanded
|
2026-02-26 08:53:03 -06:00
|
|
|
? "sm:max-w-2xl h-[calc(100dvh-2rem)]"
|
2026-02-17 20:46:12 -06:00
|
|
|
: "sm:max-w-lg"
|
2026-02-17 10:53:20 -06:00
|
|
|
)}
|
|
|
|
|
onKeyDown={handleKeyDown}
|
|
|
|
|
>
|
|
|
|
|
{/* Header bar */}
|
2026-02-17 20:46:12 -06:00
|
|
|
<div className="flex items-center justify-between px-4 py-2.5 border-b border-border shrink-0">
|
2026-02-17 10:53:20 -06:00
|
|
|
<div className="flex items-center gap-2 text-sm text-muted-foreground">
|
2026-02-26 16:33:48 -06:00
|
|
|
<Popover open={companyOpen} onOpenChange={setCompanyOpen}>
|
|
|
|
|
<PopoverTrigger asChild>
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"px-1.5 py-0.5 rounded text-xs font-semibold cursor-pointer hover:opacity-80 transition-opacity",
|
|
|
|
|
!dialogCompany?.brandColor && "bg-muted",
|
|
|
|
|
)}
|
|
|
|
|
style={
|
|
|
|
|
dialogCompany?.brandColor
|
|
|
|
|
? {
|
|
|
|
|
backgroundColor: dialogCompany.brandColor,
|
|
|
|
|
color: getContrastTextColor(dialogCompany.brandColor),
|
|
|
|
|
}
|
|
|
|
|
: undefined
|
|
|
|
|
}
|
|
|
|
|
>
|
|
|
|
|
{(dialogCompany?.name ?? "").slice(0, 3).toUpperCase()}
|
|
|
|
|
</button>
|
|
|
|
|
</PopoverTrigger>
|
|
|
|
|
<PopoverContent className="w-48 p-1" align="start">
|
|
|
|
|
{companies.map((c) => (
|
|
|
|
|
<button
|
|
|
|
|
key={c.id}
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
c.id === effectiveCompanyId && "bg-accent",
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
handleCompanyChange(c.id);
|
|
|
|
|
setCompanyOpen(false);
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
className={cn(
|
|
|
|
|
"px-1 py-0.5 rounded text-[10px] font-semibold leading-none",
|
|
|
|
|
!c.brandColor && "bg-muted",
|
|
|
|
|
)}
|
|
|
|
|
style={
|
|
|
|
|
c.brandColor
|
|
|
|
|
? {
|
|
|
|
|
backgroundColor: c.brandColor,
|
|
|
|
|
color: getContrastTextColor(c.brandColor),
|
|
|
|
|
}
|
|
|
|
|
: undefined
|
|
|
|
|
}
|
|
|
|
|
>
|
|
|
|
|
{c.name.slice(0, 3).toUpperCase()}
|
|
|
|
|
</span>
|
|
|
|
|
<span className="truncate">{c.name}</span>
|
|
|
|
|
</button>
|
|
|
|
|
))}
|
|
|
|
|
</PopoverContent>
|
|
|
|
|
</Popover>
|
2026-02-17 10:53:20 -06:00
|
|
|
<span className="text-muted-foreground/60">›</span>
|
|
|
|
|
<span>New issue</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
|
|
|
</div>
|
2026-02-17 10:53:20 -06:00
|
|
|
<div className="flex items-center gap-1">
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="icon-xs"
|
|
|
|
|
className="text-muted-foreground"
|
|
|
|
|
onClick={() => setExpanded(!expanded)}
|
|
|
|
|
>
|
|
|
|
|
{expanded ? <Minimize2 className="h-3.5 w-3.5" /> : <Maximize2 className="h-3.5 w-3.5" />}
|
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>
|
2026-02-17 10:53:20 -06:00
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="icon-xs"
|
|
|
|
|
className="text-muted-foreground"
|
2026-02-17 20:46:12 -06:00
|
|
|
onClick={() => closeNewIssue()}
|
2026-02-17 10:53:20 -06:00
|
|
|
>
|
|
|
|
|
<span className="text-lg leading-none">×</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
|
|
|
</Button>
|
2026-02-17 10:53:20 -06:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Title */}
|
2026-02-17 20:46:12 -06:00
|
|
|
<div className="px-4 pt-4 pb-2 shrink-0">
|
2026-02-26 08:53:03 -06:00
|
|
|
<textarea
|
|
|
|
|
className="w-full text-lg font-semibold bg-transparent outline-none resize-none overflow-hidden placeholder:text-muted-foreground/50"
|
2026-02-17 10:53:20 -06:00
|
|
|
placeholder="Issue title"
|
2026-02-26 08:53:03 -06:00
|
|
|
rows={1}
|
2026-02-17 10:53:20 -06:00
|
|
|
value={title}
|
2026-02-26 08:53:03 -06:00
|
|
|
onChange={(e) => {
|
|
|
|
|
setTitle(e.target.value);
|
|
|
|
|
e.target.style.height = "auto";
|
|
|
|
|
e.target.style.height = `${e.target.scrollHeight}px`;
|
|
|
|
|
}}
|
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
|
|
|
onKeyDown={(e) => {
|
2026-02-26 08:53:03 -06:00
|
|
|
if (e.key === "Enter" && !e.metaKey && !e.ctrlKey) {
|
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
|
|
|
e.preventDefault();
|
|
|
|
|
descriptionEditorRef.current?.focus();
|
|
|
|
|
}
|
2026-02-26 08:53:03 -06:00
|
|
|
if (e.key === "Tab" && !e.shiftKey) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
assigneeSelectorRef.current?.focus();
|
|
|
|
|
}
|
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
|
|
|
}}
|
2026-02-17 10:53:20 -06:00
|
|
|
autoFocus
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-02-26 08:53:03 -06:00
|
|
|
<div className="px-4 pb-2 shrink-0">
|
|
|
|
|
<div className="overflow-x-auto">
|
|
|
|
|
<div className="inline-flex min-w-max items-center gap-2 text-sm text-muted-foreground">
|
|
|
|
|
<span>For</span>
|
|
|
|
|
<InlineEntitySelector
|
|
|
|
|
ref={assigneeSelectorRef}
|
|
|
|
|
value={assigneeId}
|
|
|
|
|
options={assigneeOptions}
|
|
|
|
|
placeholder="Assignee"
|
|
|
|
|
noneLabel="No assignee"
|
|
|
|
|
searchPlaceholder="Search assignees..."
|
|
|
|
|
emptyMessage="No assignees found."
|
|
|
|
|
onChange={setAssigneeId}
|
|
|
|
|
onConfirm={() => {
|
|
|
|
|
projectSelectorRef.current?.focus();
|
|
|
|
|
}}
|
|
|
|
|
renderTriggerValue={(option) =>
|
|
|
|
|
option && currentAssignee ? (
|
|
|
|
|
<>
|
|
|
|
|
<AgentIcon icon={currentAssignee.icon} className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
|
|
|
|
<span className="truncate">{option.label}</span>
|
|
|
|
|
</>
|
|
|
|
|
) : (
|
|
|
|
|
<span className="text-muted-foreground">Assignee</span>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
renderOption={(option) => {
|
|
|
|
|
if (!option.id) return <span className="truncate">{option.label}</span>;
|
|
|
|
|
const assignee = (agents ?? []).find((agent) => agent.id === option.id);
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<AgentIcon icon={assignee?.icon} className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
|
|
|
|
<span className="truncate">{option.label}</span>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
<span>in</span>
|
|
|
|
|
<InlineEntitySelector
|
|
|
|
|
ref={projectSelectorRef}
|
|
|
|
|
value={projectId}
|
|
|
|
|
options={projectOptions}
|
|
|
|
|
placeholder="Project"
|
|
|
|
|
noneLabel="No project"
|
|
|
|
|
searchPlaceholder="Search projects..."
|
|
|
|
|
emptyMessage="No projects found."
|
|
|
|
|
onChange={setProjectId}
|
|
|
|
|
onConfirm={() => {
|
|
|
|
|
descriptionEditorRef.current?.focus();
|
|
|
|
|
}}
|
|
|
|
|
renderTriggerValue={(option) =>
|
|
|
|
|
option && currentProject ? (
|
|
|
|
|
<>
|
|
|
|
|
<span
|
|
|
|
|
className="h-3.5 w-3.5 shrink-0 rounded-sm"
|
|
|
|
|
style={{ backgroundColor: currentProject.color ?? "#6366f1" }}
|
|
|
|
|
/>
|
|
|
|
|
<span className="truncate">{option.label}</span>
|
|
|
|
|
</>
|
|
|
|
|
) : (
|
|
|
|
|
<span className="text-muted-foreground">Project</span>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
renderOption={(option) => {
|
|
|
|
|
if (!option.id) return <span className="truncate">{option.label}</span>;
|
2026-03-02 14:20:49 -06:00
|
|
|
const project = orderedProjects.find((item) => item.id === option.id);
|
2026-02-26 08:53:03 -06:00
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<span
|
|
|
|
|
className="h-3.5 w-3.5 shrink-0 rounded-sm"
|
|
|
|
|
style={{ backgroundColor: project?.color ?? "#6366f1" }}
|
|
|
|
|
/>
|
|
|
|
|
<span className="truncate">{option.label}</span>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-02-26 10:32:44 -06:00
|
|
|
{supportsAssigneeOverrides && (
|
|
|
|
|
<div className="px-4 pb-2 shrink-0">
|
|
|
|
|
<button
|
|
|
|
|
className="inline-flex items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors"
|
|
|
|
|
onClick={() => setAssigneeOptionsOpen((open) => !open)}
|
|
|
|
|
>
|
|
|
|
|
{assigneeOptionsOpen ? <ChevronDown className="h-3 w-3" /> : <ChevronRight className="h-3 w-3" />}
|
|
|
|
|
{assigneeOptionsTitle}
|
|
|
|
|
</button>
|
|
|
|
|
{assigneeOptionsOpen && (
|
|
|
|
|
<div className="mt-2 rounded-md border border-border p-3 bg-muted/20 space-y-3">
|
|
|
|
|
<div className="space-y-1.5">
|
|
|
|
|
<div className="text-xs text-muted-foreground">Model</div>
|
|
|
|
|
<InlineEntitySelector
|
|
|
|
|
value={assigneeModelOverride}
|
|
|
|
|
options={modelOverrideOptions}
|
|
|
|
|
placeholder="Default model"
|
|
|
|
|
noneLabel="Default model"
|
|
|
|
|
searchPlaceholder="Search models..."
|
|
|
|
|
emptyMessage="No models found."
|
|
|
|
|
onChange={setAssigneeModelOverride}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="space-y-1.5">
|
|
|
|
|
<div className="text-xs text-muted-foreground">Thinking effort</div>
|
|
|
|
|
<div className="flex items-center gap-1.5 flex-wrap">
|
|
|
|
|
{thinkingEffortOptions.map((option) => (
|
|
|
|
|
<button
|
|
|
|
|
key={option.value || "default"}
|
|
|
|
|
className={cn(
|
|
|
|
|
"px-2 py-1 rounded-md text-xs border border-border hover:bg-accent/50 transition-colors",
|
|
|
|
|
assigneeThinkingEffort === option.value && "bg-accent"
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => setAssigneeThinkingEffort(option.value)}
|
|
|
|
|
>
|
|
|
|
|
{option.label}
|
|
|
|
|
</button>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-02-26 16:33:48 -06:00
|
|
|
{assigneeAdapterType === "claude_local" && (
|
|
|
|
|
<div className="flex items-center justify-between rounded-md border border-border px-2 py-1.5">
|
|
|
|
|
<div className="text-xs text-muted-foreground">Enable Chrome (--chrome)</div>
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
|
|
|
assigneeChrome ? "bg-green-600" : "bg-muted"
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => setAssigneeChrome((value) => !value)}
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
className={cn(
|
|
|
|
|
"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",
|
|
|
|
|
assigneeChrome ? "translate-x-4.5" : "translate-x-0.5"
|
|
|
|
|
)}
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-02-26 10:32:44 -06:00
|
|
|
<div className="flex items-center justify-between rounded-md border border-border px-2 py-1.5">
|
|
|
|
|
<div className="text-xs text-muted-foreground">Use project workspace</div>
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
|
|
|
assigneeUseProjectWorkspace ? "bg-green-600" : "bg-muted"
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => setAssigneeUseProjectWorkspace((value) => !value)}
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
className={cn(
|
|
|
|
|
"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",
|
|
|
|
|
assigneeUseProjectWorkspace ? "translate-x-4.5" : "translate-x-0.5"
|
|
|
|
|
)}
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
2026-02-17 10:53:20 -06:00
|
|
|
{/* Description */}
|
2026-02-26 08:53:03 -06:00
|
|
|
<div className={cn("px-4 pb-2 overflow-y-auto min-h-0 border-t border-border/60 pt-3", expanded ? "flex-1" : "")}>
|
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
|
|
|
<MarkdownEditor
|
|
|
|
|
ref={descriptionEditorRef}
|
2026-02-17 10:53:20 -06:00
|
|
|
value={description}
|
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
|
|
|
onChange={setDescription}
|
|
|
|
|
placeholder="Add description..."
|
|
|
|
|
bordered={false}
|
2026-03-02 13:31:58 -06:00
|
|
|
mentions={mentionOptions}
|
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
|
|
|
contentClassName={cn("text-sm text-muted-foreground", expanded ? "min-h-[220px]" : "min-h-[120px]")}
|
|
|
|
|
imageUploadHandler={async (file) => {
|
|
|
|
|
const asset = await uploadDescriptionImage.mutateAsync(file);
|
|
|
|
|
return asset.contentPath;
|
|
|
|
|
}}
|
2026-02-17 10:53:20 -06:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Property chips bar */}
|
2026-02-17 20:46:12 -06:00
|
|
|
<div className="flex items-center gap-1.5 px-4 py-2 border-t border-border flex-wrap shrink-0">
|
2026-02-17 10:53:20 -06:00
|
|
|
{/* Status chip */}
|
|
|
|
|
<Popover open={statusOpen} onOpenChange={setStatusOpen}>
|
|
|
|
|
<PopoverTrigger asChild>
|
|
|
|
|
<button className="inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs hover:bg-accent/50 transition-colors">
|
|
|
|
|
<CircleDot className={cn("h-3 w-3", currentStatus.color)} />
|
|
|
|
|
{currentStatus.label}
|
|
|
|
|
</button>
|
|
|
|
|
</PopoverTrigger>
|
|
|
|
|
<PopoverContent className="w-36 p-1" align="start">
|
|
|
|
|
{statuses.map((s) => (
|
|
|
|
|
<button
|
|
|
|
|
key={s.value}
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
s.value === status && "bg-accent"
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => { setStatus(s.value); setStatusOpen(false); }}
|
|
|
|
|
>
|
|
|
|
|
<CircleDot className={cn("h-3 w-3", s.color)} />
|
|
|
|
|
{s.label}
|
|
|
|
|
</button>
|
|
|
|
|
))}
|
|
|
|
|
</PopoverContent>
|
|
|
|
|
</Popover>
|
|
|
|
|
|
|
|
|
|
{/* Priority chip */}
|
|
|
|
|
<Popover open={priorityOpen} onOpenChange={setPriorityOpen}>
|
|
|
|
|
<PopoverTrigger asChild>
|
|
|
|
|
<button className="inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs hover:bg-accent/50 transition-colors">
|
|
|
|
|
{currentPriority ? (
|
|
|
|
|
<>
|
|
|
|
|
<currentPriority.icon className={cn("h-3 w-3", currentPriority.color)} />
|
|
|
|
|
{currentPriority.label}
|
|
|
|
|
</>
|
|
|
|
|
) : (
|
|
|
|
|
<>
|
|
|
|
|
<Minus className="h-3 w-3 text-muted-foreground" />
|
|
|
|
|
Priority
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</button>
|
|
|
|
|
</PopoverTrigger>
|
|
|
|
|
<PopoverContent className="w-36 p-1" align="start">
|
|
|
|
|
{priorities.map((p) => (
|
|
|
|
|
<button
|
|
|
|
|
key={p.value}
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
p.value === priority && "bg-accent"
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => { setPriority(p.value); setPriorityOpen(false); }}
|
|
|
|
|
>
|
|
|
|
|
<p.icon className={cn("h-3 w-3", p.color)} />
|
|
|
|
|
{p.label}
|
|
|
|
|
</button>
|
|
|
|
|
))}
|
|
|
|
|
</PopoverContent>
|
|
|
|
|
</Popover>
|
|
|
|
|
|
|
|
|
|
{/* Labels chip (placeholder) */}
|
|
|
|
|
<button className="inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs hover:bg-accent/50 transition-colors text-muted-foreground">
|
|
|
|
|
<Tag className="h-3 w-3" />
|
|
|
|
|
Labels
|
|
|
|
|
</button>
|
|
|
|
|
|
2026-02-25 21:36:06 -06:00
|
|
|
{/* Attach image chip */}
|
|
|
|
|
<input
|
|
|
|
|
ref={attachInputRef}
|
|
|
|
|
type="file"
|
|
|
|
|
accept="image/png,image/jpeg,image/webp,image/gif"
|
|
|
|
|
className="hidden"
|
|
|
|
|
onChange={handleAttachImage}
|
|
|
|
|
/>
|
|
|
|
|
<button
|
|
|
|
|
className="inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs hover:bg-accent/50 transition-colors text-muted-foreground"
|
|
|
|
|
onClick={() => attachInputRef.current?.click()}
|
|
|
|
|
disabled={uploadDescriptionImage.isPending}
|
|
|
|
|
>
|
|
|
|
|
<Paperclip className="h-3 w-3" />
|
|
|
|
|
{uploadDescriptionImage.isPending ? "Uploading..." : "Image"}
|
|
|
|
|
</button>
|
|
|
|
|
|
2026-02-17 10:53:20 -06:00
|
|
|
{/* More (dates) */}
|
|
|
|
|
<Popover open={moreOpen} onOpenChange={setMoreOpen}>
|
|
|
|
|
<PopoverTrigger asChild>
|
|
|
|
|
<button className="inline-flex items-center justify-center rounded-md border border-border p-1 text-xs hover:bg-accent/50 transition-colors text-muted-foreground">
|
|
|
|
|
<MoreHorizontal className="h-3 w-3" />
|
|
|
|
|
</button>
|
|
|
|
|
</PopoverTrigger>
|
|
|
|
|
<PopoverContent className="w-44 p-1" align="start">
|
|
|
|
|
<button className="flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50 text-muted-foreground">
|
|
|
|
|
<Calendar className="h-3 w-3" />
|
|
|
|
|
Start date
|
|
|
|
|
</button>
|
|
|
|
|
<button className="flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50 text-muted-foreground">
|
|
|
|
|
<Calendar className="h-3 w-3" />
|
|
|
|
|
Due date
|
|
|
|
|
</button>
|
|
|
|
|
</PopoverContent>
|
|
|
|
|
</Popover>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Footer */}
|
2026-02-17 20:46:12 -06:00
|
|
|
<div className="flex items-center justify-between px-4 py-2.5 border-t border-border shrink-0">
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="sm"
|
|
|
|
|
className="text-muted-foreground"
|
|
|
|
|
onClick={discardDraft}
|
|
|
|
|
disabled={!hasDraft && !loadDraft()}
|
|
|
|
|
>
|
|
|
|
|
Discard Draft
|
|
|
|
|
</Button>
|
2026-02-17 10:53:20 -06:00
|
|
|
<Button
|
|
|
|
|
size="sm"
|
2026-02-17 12:24:48 -06:00
|
|
|
disabled={!title.trim() || createIssue.isPending}
|
2026-02-17 10:53:20 -06:00
|
|
|
onClick={handleSubmit}
|
|
|
|
|
>
|
2026-02-17 20:46:12 -06:00
|
|
|
{createIssue.isPending ? "Creating..." : "Create Issue"}
|
2026-02-17 10:53:20 -06:00
|
|
|
</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
|
|
|
</DialogContent>
|
|
|
|
|
</Dialog>
|
|
|
|
|
);
|
|
|
|
|
}
|