优化: 对话交互修复与界面完善
- 修输入法组词回车直发/分离窗误关/出错后按钮死锁 - 新建任务失败弹窗内联提示,会话切换乐观高亮 - 状态多选联动刷新不再冲空可见行 - 测试连接保留已配开关与权重,防抖按提供商分键 - 代码块复制/长回复折叠带量/队列回填/排队时钟 - 子代理完成卡渲染,死链卡片与引用清理 - 截图渲染换 pro 版依赖,样式 token 化收尾
This commit is contained in:
@@ -520,7 +520,8 @@ onMounted(() => {
|
||||
.col-tool { min-width: 130px; }
|
||||
.col-risk { width: 56px; }
|
||||
.col-status { width: 80px; }
|
||||
.col-decided { width: 64px; }
|
||||
/* min-width 而非定宽:容纳最长标签「自动(信任)」不逐字竖排,超出由 .audit-table-wrap overflow:auto 兜底 */
|
||||
.col-decided { min-width: 88px; }
|
||||
.col-args { min-width: 200px; max-width: 320px; }
|
||||
.col-result { min-width: 220px; max-width: 360px; }
|
||||
/* 表格内 args/result 单元格限高 + 截断(长内容不撑爆行),完整内容点行展开查 detail-pre */
|
||||
@@ -613,6 +614,7 @@ onMounted(() => {
|
||||
font-weight: 500;
|
||||
padding: 2px 8px;
|
||||
border-radius: var(--df-radius-xs);
|
||||
white-space: nowrap; /* 窄列防 CJK 逐字竖排(对齐 .status-tag) */
|
||||
}
|
||||
.decided-human { background: var(--df-accent-bg); color: var(--df-accent); }
|
||||
.decided-auto { background: rgba(90,99,128,0.2); color: var(--df-text-dim); }
|
||||
|
||||
@@ -873,10 +873,11 @@ onBeforeUnmount(() => {
|
||||
padding: 1px 6px;
|
||||
border-radius: var(--df-radius-xs);
|
||||
}
|
||||
.priority-critical { background: rgba(255,107,107,0.2); color: var(--df-danger); }
|
||||
/* 四档统一 color-mix 派生自语义 token(对齐 Tasks.vue 列表同款,主题切换语义不变) */
|
||||
.priority-critical { background: color-mix(in srgb, var(--df-danger) 20%, transparent); color: var(--df-danger); }
|
||||
.priority-high { background: color-mix(in srgb, var(--df-warning) 20%, transparent); color: var(--df-warning); }
|
||||
.priority-medium { background: rgba(100,181,246,0.2); color: var(--df-info); }
|
||||
.priority-low { background: rgba(90,99,128,0.2); color: var(--df-text-dim); }
|
||||
.priority-medium { background: color-mix(in srgb, var(--df-info) 20%, transparent); color: var(--df-info); }
|
||||
.priority-low { background: color-mix(in srgb, var(--df-text-dim) 20%, transparent); color: var(--df-text-dim); }
|
||||
|
||||
/* ===== 面板 ===== */
|
||||
/* Problem4 ⑤ 宽屏两栏:左栏(描述+关联信息+时间戳) / 右栏(任务产出+工作流进度)。
|
||||
|
||||
+27
-4
@@ -371,6 +371,8 @@
|
||||
<option v-for="idea in store.ideas" :key="idea.id" :value="idea.id">{{ idea.title }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- 创建失败内联错误条(UX走查 P1):红字条放表单下方,弹窗不关可直接改后重试 -->
|
||||
<div v-if="createError" class="modal-error">{{ createError }}</div>
|
||||
<div class="modal-actions">
|
||||
<button class="btn btn-ghost" @click="showCreateModal = false">{{ $t('common.cancel') }}</button>
|
||||
<button class="btn btn-primary" @click="confirmCreate" :disabled="submitting || !newTaskTitle.trim()">{{ $t('common.confirm') }}</button>
|
||||
@@ -577,6 +579,9 @@ const newTaskParentId = ref('')
|
||||
// 关联灵感(空串=不关联,与后端 idea_id 空串处理一致)
|
||||
const newTaskIdeaId = ref('')
|
||||
const submitting = ref(false)
|
||||
// 新建失败内联错误(UX走查 2026-10-03 P1):store.error 横幅渲染在页面流,被 modal-overlay
|
||||
// 全屏遮罩盖住不可见,失败时弹窗必须自带红字条反馈,且保持弹窗不关让用户改完重试
|
||||
const createError = ref('')
|
||||
|
||||
// 父任务选项 = 当前选中项目的顶层任务(无 parent_id;仅顶层可作父,1 级嵌套)
|
||||
const parentTaskOptions = computed(() =>
|
||||
@@ -821,6 +826,8 @@ function openCreateModal(parent?: TaskRecord) {
|
||||
newTaskBranch.value = ''
|
||||
newTaskPriority.value = 2
|
||||
newTaskIdeaId.value = ''
|
||||
// 每次打开清掉上一次的失败残留
|
||||
createError.value = ''
|
||||
showCreateModal.value = true
|
||||
}
|
||||
|
||||
@@ -828,6 +835,7 @@ async function confirmCreate() {
|
||||
if (!newTaskProjectId.value) { showToast(t('tasks.err.selectProject'), 'error'); return }
|
||||
if (!newTaskTitle.value.trim()) return
|
||||
submitting.value = true
|
||||
createError.value = ''
|
||||
try {
|
||||
const r = await store.createTask({
|
||||
project_id: newTaskProjectId.value as ProjectId,
|
||||
@@ -840,7 +848,11 @@ async function confirmCreate() {
|
||||
// 父任务透传(空串=顶层任务,后端视为 None)
|
||||
parent_id: newTaskParentId.value || undefined,
|
||||
})
|
||||
if (!r) return
|
||||
if (!r) {
|
||||
// 失败:弹窗不关,内联透出错误(store.error 横幅在遮罩之下看不到;取具体错误,无则兜底文案)
|
||||
createError.value = store.error || t('tasks.err.createFailed')
|
||||
return
|
||||
}
|
||||
showCreateModal.value = false
|
||||
} finally {
|
||||
submitting.value = false
|
||||
@@ -934,6 +946,16 @@ onUnmounted(() => {
|
||||
<style scoped>
|
||||
.tasks { padding: 16px 20px 20px; }
|
||||
|
||||
/* 新建任务失败内联错误条(UX走查 P1):页面流 error-banner 被 modal 遮罩盖住,弹窗内自带红字条 */
|
||||
.modal-error {
|
||||
margin-bottom: 12px;
|
||||
padding: 8px 10px;
|
||||
border-radius: var(--df-radius-sm);
|
||||
background: var(--df-danger-bg, rgba(220, 38, 38, 0.08));
|
||||
color: var(--df-danger, #dc2626);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* 列表/看板切换分段按钮 */
|
||||
.view-toggle { margin-left: auto; display: flex; gap: 0; }
|
||||
.seg-btn {
|
||||
@@ -1243,10 +1265,11 @@ onUnmounted(() => {
|
||||
border-radius: var(--df-radius-xs);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.priority-critical { background: rgba(255,107,107,0.2); color: var(--df-danger); }
|
||||
/* 四档统一 color-mix 派生自语义 token(对齐 high 档既有写法,主题切换语义不变) */
|
||||
.priority-critical { background: color-mix(in srgb, var(--df-danger) 20%, transparent); color: var(--df-danger); }
|
||||
.priority-high { background: color-mix(in srgb, var(--df-warning) 20%, transparent); color: var(--df-warning); }
|
||||
.priority-medium { background: rgba(100,181,246,0.2); color: var(--df-info); }
|
||||
.priority-low { background: rgba(90,99,128,0.2); color: var(--df-text-dim); }
|
||||
.priority-medium { background: color-mix(in srgb, var(--df-info) 20%, transparent); color: var(--df-info); }
|
||||
.priority-low { background: color-mix(in srgb, var(--df-text-dim) 20%, transparent); color: var(--df-text-dim); }
|
||||
|
||||
.task-meta {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user