feat: task comments/discussion system

- New task_comments table (separate from progress notes)
- Backend: GET/POST/DELETE /api/tasks/:id/comments with session + bearer auth
- TaskComments component on TaskPage (full-page view) with markdown support,
  author avatars, delete own comments, 30s polling
- CompactComments in TaskDetailPanel (side panel) with last 3 + expand
- Comment API functions in frontend lib/api.ts
This commit is contained in:
2026-01-30 00:04:38 +00:00
parent 46002e0854
commit b7ff8437e4
7 changed files with 477 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import remarkGfm from "remark-gfm";
import type { Task, TaskStatus, Project } from "../lib/types";
import { updateTask, fetchProjects, addProgressNote, addSubtask, toggleSubtask, deleteSubtask, deleteTask } from "../lib/api";
import { useToast } from "../components/Toast";
import { TaskComments } from "../components/TaskComments";
const priorityColors: Record<string, string> = {
critical: "bg-red-500 text-white",
@@ -598,6 +599,8 @@ export function TaskPage() {
</div>
)}
</div>
{/* Comments / Discussion */}
<TaskComments taskId={task.id} />
</div>
{/* Sidebar */}