feat(版本): 完善计划覆盖与工作台待办

关键改动:

- 增加计划日志汇总、需求覆盖草稿校验与对应测试

- 抽取工作台工作项 Hook,补充待办计数能力

- 优化版本详情中计划、任务、测试用例和 Bug 的筛选与展示

Co-Authored-By: Codex GPT-5 <codex@openai.com>
This commit is contained in:
Script Generator
2026-06-30 13:43:18 +08:00
parent a6a4d7d3d9
commit 52a88626d4
23 changed files with 1082 additions and 281 deletions

View File

@@ -9,6 +9,7 @@ import { useRequirementStore } from '@/stores/useRequirementStore';
import { useMemberStore } from '@/stores/useMemberStore';
import { useAuthStore } from '@/stores/useAuthStore';
import { resolveMemberDisplayName } from '@/lib/member-system';
import { FilterSelect } from '@/components/FilterSelect';
import { WorkDateTimePicker } from '@/components/WorkDateTimePicker';
import type { Priority } from '@/lib/derive';
import type { BugSeverity } from '@/lib/bug';
@@ -144,25 +145,42 @@ export function BugCreateModal({ testCaseId, onClose }: Props) {
<div className="grid grid-cols-3 gap-3">
<div>
<label className="block text-[12px] text-[var(--ink-soft)] mb-1"></label>
<select value={severity} onChange={(e) => setSeverity(e.target.value as BugSeverity)} className="h-9 w-full rounded-lg border border-[var(--line)] bg-[var(--bg)] px-3 text-[13px] focus:border-[var(--accent)] focus:outline-none">
<option value="critical"></option>
<option value="major"></option>
<option value="minor"></option>
<option value="trivial"></option>
</select>
<FilterSelect
value={severity}
onChange={(value) => setSeverity(value as BugSeverity)}
options={[
{ value: 'critical', label: '致命' },
{ value: 'major', label: '严重' },
{ value: 'minor', label: '一般' },
{ value: 'trivial', label: '轻微' },
]}
showAllOption={false}
className="w-full"
labelClassName="max-w-[calc(100%-20px)]"
/>
</div>
<div>
<label className="block text-[12px] text-[var(--ink-soft)] mb-1"></label>
<select value={priority} onChange={(e) => setPriority(e.target.value as Priority)} className="h-9 w-full rounded-lg border border-[var(--line)] bg-[var(--bg)] px-3 text-[13px] focus:border-[var(--accent)] focus:outline-none">
{(['P0','P1','P2','P3'] as Priority[]).map((p) => <option key={p} value={p}>{p}</option>)}
</select>
<FilterSelect
value={priority}
onChange={(value) => setPriority(value as Priority)}
options={(['P0', 'P1', 'P2', 'P3'] as Priority[]).map((p) => ({ value: p, label: p }))}
showAllOption={false}
className="w-full"
labelClassName="max-w-[calc(100%-20px)]"
/>
</div>
<div>
<label className="block text-[12px] text-[var(--ink-soft)] mb-1"> *</label>
<select value={assigneeId} onChange={(e) => setAssigneeId(e.target.value)} className="h-9 w-full rounded-lg border border-[var(--line)] bg-[var(--bg)] px-3 text-[13px] focus:border-[var(--accent)] focus:outline-none">
<option value=""></option>
{members.map((m) => <option key={m.id} value={m.name}>{m.name}</option>)}
</select>
<FilterSelect
value={assigneeId}
onChange={setAssigneeId}
options={members.map((m) => ({ value: m.name, label: m.name }))}
placeholder="选择修复人"
showAllOption={false}
className="w-full"
labelClassName="max-w-[calc(100%-20px)]"
/>
</div>
</div>
<div>