新增: 任务推进链(7态状态机+advance_task CAS原子写)+软删除+前后端7态对齐

This commit is contained in:
2026-06-16 02:33:15 +08:00
parent f30df333b3
commit d2cb38cdac
21 changed files with 1628 additions and 167 deletions

View File

@@ -18,7 +18,24 @@ export default {
assignee: 'Assignee',
baseBranch: 'Base Branch',
workflowDef: 'Workflow Definition',
reviewRounds: 'Review Round {n}',
createdAt: 'Created At',
updatedAt: 'Updated At',
// F-05 advance buttons (shown by state-machine-legal next states, validated by advance_task)
advanceTitle: 'Advance Task',
// Button labels (legal transitions per task_state_machine.rs can_transition)
advance: {
toInProgress: 'Start',
toInReview: 'Submit for Review',
toTesting: 'Approve to Testing',
toDone: 'Done',
resume: 'Resume',
sendBack: 'Send Back',
sendBackToReview: 'Send Back to Review',
block: 'Block',
cancel: 'Cancel Task',
},
advancing: 'Advancing...',
advanceFailed: 'Failed to advance task',
},
}

View File

@@ -11,14 +11,16 @@ export default {
status: 'Status: ',
all: 'All',
},
// Status filters (with icons)
// Status filters (with icons) — D-260616-01 aligned to backend 7 states
statusFilter: {
all: 'All',
todo: 'Todo',
in_progress: 'In Progress',
review_ready: 'Review Ready',
merged: 'Merged',
abandoned: 'Abandoned',
in_review: 'In Review',
testing: 'Testing',
done: 'Done',
blocked: 'Blocked',
cancelled: 'Cancelled',
},
// Groups
@@ -44,19 +46,22 @@ export default {
priorityMedium: 'P2 Medium',
priorityLow: 'P3 Low',
},
// Status labels (TASK_STATUS_LABELS values in constants/project.ts use these keys)
// Status labels (TASK_STATUS_LABELS values in constants/project.ts use these keys) — D-260616-01 aligned to backend 7 states
status: {
todo: '📋 Todo',
in_progress: '🔄 In Progress',
review_ready: '👀 Review Ready',
merged: '✅ Merged',
abandoned: '🗑️ Abandoned',
in_review: '👀 In Review',
testing: '🧪 Testing',
done: '✅ Done',
blocked: '🚫 Blocked',
cancelled: '🗑️ Cancelled',
},
// Error fallbacks (user-visible via state.error)
err: {
loadFailed: 'Failed to load tasks',
createFailed: 'Failed to create task',
deleteFailed: 'Failed to delete task',
updateFailed: 'Failed to update task',
},
},
}

View File

@@ -18,7 +18,24 @@ export default {
assignee: '负责人',
baseBranch: '基础分支',
workflowDef: '工作流定义',
reviewRounds: '第 {n} 轮 Review',
createdAt: '创建时间',
updatedAt: '更新时间',
// F-05 推进按钮(按状态机合法下一态显示,advance_task 状态机校验)
advanceTitle: '推进任务',
// 按钮文案(状态机合法转换,见 task_state_machine.rs can_transition)
advance: {
toInProgress: '开始', // todo/blocked → in_progress
toInReview: '提交审查', // in_progress → in_review
toTesting: '通过进测试', // in_review → testing
toDone: '完成', // testing → done
resume: '恢复', // blocked → in_progress(与 toInProgress 同向,blocked 专用文案)
sendBack: '退回修改', // in_review → in_progress
sendBackToReview: '退回重审', // testing → in_review
block: '阻塞', // * → blocked
cancel: '取消任务', // * → cancelled
},
advancing: '推进中...',
advanceFailed: '推进任务失败',
},
}

View File

@@ -11,14 +11,16 @@ export default {
status: '状态:',
all: '全部',
},
// 状态筛选(含图标)
// 状态筛选(含图标) — D-260616-01 对齐后端 7 态
statusFilter: {
all: '全部',
todo: '待开始',
in_progress: '进行中',
review_ready: '审查',
merged: '已合并',
abandoned: '已放弃',
in_review: '审查',
testing: '测试中',
done: '已完成',
blocked: '已阻塞',
cancelled: '已取消',
},
// 分组
@@ -44,19 +46,22 @@ export default {
priorityMedium: 'P2 中',
priorityLow: 'P3 低',
},
// 状态文案(constants/project.ts 的 TASK_STATUS_LABELS 值走此 key)
// 状态文案(constants/project.ts 的 TASK_STATUS_LABELS 值走此 key) — D-260616-01 对齐后端 7 态
status: {
todo: '📋 待开始',
in_progress: '🔄 进行中',
review_ready: '👀 审查',
merged: '✅ 已合并',
abandoned: '🗑️ 已放弃',
in_review: '👀 审查',
testing: '🧪 测试中',
done: '✅ 已完成',
blocked: '🚫 已阻塞',
cancelled: '🗑️ 已取消',
},
// 错误回退(state.error 用户可见)
err: {
loadFailed: '加载任务失败',
createFailed: '创建任务失败',
deleteFailed: '删除任务失败',
updateFailed: '更新任务失败',
},
},
}