mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-02 22:14:50 +00:00
feat(agentic kanban): phase 1 not-agentic kanban board (#330)
* feat(kanban): implement AI-native kanban database models, services, and REST APIs * feat(webui): implement team kanban board and task management * style(webui): increase kanban dialog widths and form container * fix(webui): ensure kanban dialogs override sm:max-w-lg base class * style(webui): set edit task dialog max width to 5xl * chore: untrack kanban plan markdown files * feat(webui): update kanban page layout to 2 columns and refine task activity UI * fix(webui): constrain kanban column and board heights for vertical scrolling * feat(kanban): unify task status transition into updateTask API and allow unconstrained human task transitions * fix(webui): add optimistic updates to kanban drag-and-drop to eliminate flash * refactor(webui): remove client-side search box from kanban header * feat(kanban): redesign task dialog comments area and add attachment support * refactor(webui): remove top status action bar from task info dialog * fix(webui): narrow query cache predicate and add defensive guards for kanban drag optimistic update * feat(kanban): add drag-and-drop task reordering with fractional indexing (#331) * feat(kanban): add drag-and-drop task reordering with fractional indexing * fix(kanban): improve card drop zones, snap indicators, and column highlight * fix(kanban): enable card droppables only during active drag * fix(kanban): refine hover styles and drop indicators for column boundaries * fix(kanban): unify bottom drop indicator and fix top indicator clipping * fix(kanban): ensure full column highlight and full coverage drop target * minor change * feat(kanban): allow agent tasks free drag-and-drop and enforce status change permissions (#332) * refactor(kanban): rename task_type_agentic translation keys to task_type_agent * feat(kanban): refactor task type enum to isAgentTask boolean (#333) * refactor(kanban): remove phase 2 agent execution logic and streamline phase 1 kanban * feat(kanban): add notifications and audit logging for kanban (#334) * feat(kanban): redesign config area layout and add parent tasks multi-selector (#335) * feat(webui): redesign kanban task dialog config area * feat(kanban): simplify task dependencies with parent tasks multi-selector * refactor(kanban): remove unused links routes and legacy dependency methods * feat(kanban): connect assets and kanban tasks with many-to-many relationship (#336) * feat(kanban): connect assets and kanban tasks with many-to-many relationship * feat(kanban): improve asset picker layout, infinite scrolling, and breadcrumb icon styling * fix(kanban): ensure asset picker scrollarea is scrollable with min-h-0 and shrink-0 flex styling * fix(kanban): hide recently deleted in folder tree picker and adjust header padding * fix(kanban): use lucide files icon instead of paperclip for linked assets * feat(kanban): improve task deletion, goal sidebar interaction, and card styling (#337) * feat(kanban): improve task deletion, goal sidebar interaction, and card styling * feat(kanban): move agent task badge after priority and update to orange style * feat(kanban): add status Compare-And-Swap (CAS) to prevent drag-and-drop race conditions (#338) * feat(kanban): add status Compare-And-Swap (CAS) to prevent drag-and-drop race conditions * style(kanban): rotate kanban icon 180 degrees in sidebar and top nav * style(kanban): remove rotate-180 from SquareKanban icons * feat(kanban): add unassigned goal record and fix all tasks count (#339) * feat(kanban): add unassigned goal record and fix all tasks count * feat(kanban): toggle task count with three-dot action button on goal card hover * fix(ci): pin bun version to 1.3.14 across CI and Docker (#340) * fix(webui): truncate goal name to max 2 lines in kanban sidebar (#341)
This commit is contained in:
@@ -68,6 +68,12 @@ enum NotificationType {
|
||||
metadata_field_updated_status
|
||||
new_user_join_team
|
||||
new_user_join_project
|
||||
kanban_task_created
|
||||
kanban_task_assigned
|
||||
kanban_task_status_updated
|
||||
kanban_task_updated
|
||||
kanban_task_deleted
|
||||
kanban_task_comment_created
|
||||
}
|
||||
|
||||
enum ProjectMemberRole {
|
||||
@@ -112,6 +118,7 @@ enum WorkflowTaskType {
|
||||
ai_embedding
|
||||
query_embedding_for_search
|
||||
agent_tool_call
|
||||
kanban_agent_run
|
||||
}
|
||||
|
||||
enum WorkflowTaskStatus {
|
||||
@@ -156,6 +163,37 @@ enum QuotaResourceType {
|
||||
agent_tool_call_count
|
||||
}
|
||||
|
||||
enum KanbanTaskStatus {
|
||||
TODO
|
||||
READY
|
||||
IN_PROGRESS
|
||||
BLOCKED
|
||||
IN_REVIEW
|
||||
DONE
|
||||
}
|
||||
|
||||
enum KanbanTaskPriority {
|
||||
LOW
|
||||
MEDIUM
|
||||
HIGH
|
||||
URGENT
|
||||
}
|
||||
|
||||
enum KanbanTaskEventType {
|
||||
CREATED
|
||||
STATUS_CHANGED
|
||||
ASSIGNED
|
||||
UNASSIGNED
|
||||
COMMENTED
|
||||
CHANGES_REQUESTED
|
||||
BLOCKED
|
||||
UNBLOCKED
|
||||
PRIORITY_CHANGED
|
||||
GOAL_CHANGED
|
||||
DEPENDENCY_ADDED
|
||||
DEPENDENCY_REMOVED
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Models
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -194,6 +232,12 @@ model User {
|
||||
aiUsages AiUsage[] @relation("UserToAiUsage")
|
||||
auditLogs AuditLog[] @relation("UserToAuditLog")
|
||||
quotaRecords QuotaRecord[] @relation("UserToQuotaRecord")
|
||||
kanbanTasksCreated KanbanTask[] @relation("KanbanTaskCreator")
|
||||
kanbanTasksReported KanbanTask[] @relation("KanbanTaskReporter")
|
||||
kanbanTasksAssigned KanbanTask[] @relation("KanbanTaskAssignee")
|
||||
kanbanGoalsCreated KanbanGoal[] @relation("UserToKanbanGoal")
|
||||
kanbanTaskComments KanbanTaskComment[]
|
||||
kanbanTaskEvents KanbanTaskEvent[]
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
@@ -282,6 +326,8 @@ model Team {
|
||||
watermarkTemplates WatermarkTemplate[] @relation("TeamToWatermarkTemplate")
|
||||
quotaRules QuotaRule[] @relation("TeamToQuotaRule")
|
||||
quotaRecords QuotaRecord[] @relation("TeamToQuotaRecord")
|
||||
kanbanGoals KanbanGoal[] @relation("TeamToKanbanGoal")
|
||||
kanbanTasks KanbanTask[] @relation("TeamToKanbanTask")
|
||||
|
||||
@@map("teams")
|
||||
}
|
||||
@@ -367,6 +413,7 @@ model Project {
|
||||
shareLinks ShareLink[] @relation("ProjectToShareLink")
|
||||
collections Collection[] @relation("ProjectToCollection")
|
||||
auditLogs AuditLog[] @relation("ProjectToAuditLog")
|
||||
kanbanTasks KanbanTask[] @relation("ProjectToKanbanTask")
|
||||
|
||||
@@map("projects")
|
||||
@@index([createdAt])
|
||||
@@ -515,6 +562,8 @@ model Asset {
|
||||
agentSessions AgentSession[] @relation("AssetToAgentSession")
|
||||
watermarkFiles WatermarkFile[] @relation("AssetToWatermarkFile")
|
||||
agentMd AssetAgentMd? @relation("AssetToAgentMd")
|
||||
kanbanTargetTasks KanbanTask[] @relation("KanbanTaskTargetFolder")
|
||||
kanbanTasks KanbanTaskAsset[]
|
||||
|
||||
@@map("assets")
|
||||
@@index([type])
|
||||
@@ -691,11 +740,15 @@ model Notification {
|
||||
taskId String? @map("task_id")
|
||||
task Task? @relation("TaskToNotification", fields: [taskId], references: [id])
|
||||
|
||||
kanbanTaskId String? @map("kanban_task_id")
|
||||
kanbanTask KanbanTask? @relation("KanbanTaskToNotification", fields: [kanbanTaskId], references: [id], onDelete: Cascade)
|
||||
|
||||
userId String? @map("user_id")
|
||||
user User? @relation("UserToNotification", fields: [userId], references: [id])
|
||||
|
||||
readByMembers TeamMember? @relation("TeamMemberToLastReadNotification")
|
||||
|
||||
@@index([kanbanTaskId])
|
||||
@@map("notifications")
|
||||
}
|
||||
|
||||
@@ -1087,4 +1140,138 @@ model QuotaRecord {
|
||||
@@map("quota_records")
|
||||
}
|
||||
|
||||
model KanbanGoal {
|
||||
id String @id @default(ulid())
|
||||
title String
|
||||
description String? @db.Text
|
||||
teamId String @map("team_id")
|
||||
team Team @relation("TeamToKanbanGoal", fields: [teamId], references: [id], onDelete: Cascade)
|
||||
creatorId String? @map("creator_id")
|
||||
creator User? @relation("UserToKanbanGoal", fields: [creatorId], references: [id], onDelete: SetNull)
|
||||
tasks KanbanTask[]
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@index([teamId])
|
||||
@@map("kanban_goals")
|
||||
}
|
||||
|
||||
model KanbanTask {
|
||||
id String @id @default(ulid())
|
||||
title String
|
||||
description String? @db.Text
|
||||
isAgentTask Boolean @default(false) @map("is_agent_task")
|
||||
status KanbanTaskStatus @default(TODO)
|
||||
priority KanbanTaskPriority @default(MEDIUM)
|
||||
|
||||
startDate DateTime? @map("start_date")
|
||||
dueDate DateTime? @map("due_date")
|
||||
startedAt DateTime? @map("started_at")
|
||||
completedAt DateTime? @map("completed_at")
|
||||
|
||||
goalId String? @map("goal_id")
|
||||
goal KanbanGoal? @relation(fields: [goalId], references: [id], onDelete: SetNull)
|
||||
|
||||
teamId String @map("team_id")
|
||||
team Team @relation("TeamToKanbanTask", fields: [teamId], references: [id], onDelete: Cascade)
|
||||
projectId String? @map("project_id")
|
||||
project Project? @relation("ProjectToKanbanTask", fields: [projectId], references: [id], onDelete: Cascade)
|
||||
|
||||
creatorId String @map("creator_id")
|
||||
creator User @relation("KanbanTaskCreator", fields: [creatorId], references: [id])
|
||||
reporterId String? @map("reporter_id")
|
||||
reporter User? @relation("KanbanTaskReporter", fields: [reporterId], references: [id])
|
||||
assigneeId String? @map("assignee_id")
|
||||
assignee User? @relation("KanbanTaskAssignee", fields: [assigneeId], references: [id])
|
||||
|
||||
targetFolderId String? @map("target_folder_id")
|
||||
targetFolder Asset? @relation("KanbanTaskTargetFolder", fields: [targetFolderId], references: [id], onDelete: SetNull)
|
||||
|
||||
dependencies KanbanTaskLink[] @relation("ChildLinks")
|
||||
dependents KanbanTaskLink[] @relation("ParentLinks")
|
||||
assets KanbanTaskAsset[]
|
||||
|
||||
comments KanbanTaskComment[]
|
||||
events KanbanTaskEvent[]
|
||||
notifications Notification[] @relation("KanbanTaskToNotification")
|
||||
|
||||
sortIndex String? @map("sort_index")
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@index([teamId, status])
|
||||
@@index([teamId, status, sortIndex])
|
||||
@@index([teamId, isAgentTask, status])
|
||||
@@index([teamId, goalId, status])
|
||||
@@index([teamId, assigneeId, status])
|
||||
@@index([projectId, status])
|
||||
@@index([sortIndex])
|
||||
@@map("kanban_tasks")
|
||||
}
|
||||
|
||||
model KanbanTaskLink {
|
||||
parentId String @map("parent_id")
|
||||
childId String @map("child_id")
|
||||
parent KanbanTask @relation("ParentLinks", fields: [parentId], references: [id], onDelete: Cascade)
|
||||
child KanbanTask @relation("ChildLinks", fields: [childId], references: [id], onDelete: Cascade)
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@id([parentId, childId])
|
||||
@@index([childId])
|
||||
@@map("kanban_task_links")
|
||||
}
|
||||
|
||||
model KanbanTaskAsset {
|
||||
taskId String @map("task_id")
|
||||
assetId String @map("asset_id")
|
||||
task KanbanTask @relation(fields: [taskId], references: [id], onDelete: Cascade)
|
||||
asset Asset @relation(fields: [assetId], references: [id], onDelete: Cascade)
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@id([taskId, assetId])
|
||||
@@index([assetId])
|
||||
@@map("kanban_task_assets")
|
||||
}
|
||||
|
||||
model KanbanTaskComment {
|
||||
id String @id @default(ulid())
|
||||
taskId String @map("task_id")
|
||||
task KanbanTask @relation(fields: [taskId], references: [id], onDelete: Cascade)
|
||||
authorId String @map("author_id")
|
||||
author User @relation(fields: [authorId], references: [id])
|
||||
body String @db.Text
|
||||
/// [KanbanCommentAttachmentList]
|
||||
attachments Json?
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@index([taskId, createdAt])
|
||||
@@map("kanban_task_comments")
|
||||
}
|
||||
|
||||
model KanbanTaskEvent {
|
||||
id String @id @default(ulid())
|
||||
taskId String @map("task_id")
|
||||
task KanbanTask @relation(fields: [taskId], references: [id], onDelete: Cascade)
|
||||
actorId String? @map("actor_id")
|
||||
actor User? @relation(fields: [actorId], references: [id])
|
||||
type KanbanTaskEventType
|
||||
fromStatus KanbanTaskStatus? @map("from_status")
|
||||
toStatus KanbanTaskStatus? @map("to_status")
|
||||
/// [KanbanEventPayload]
|
||||
data Json?
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@index([taskId, createdAt])
|
||||
@@index([actorId, createdAt])
|
||||
@@map("kanban_task_events")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user