diff --git a/scripts/verify-task-control-ui.mjs b/scripts/verify-task-control-ui.mjs index f12ca30c..8103e88c 100644 --- a/scripts/verify-task-control-ui.mjs +++ b/scripts/verify-task-control-ui.mjs @@ -44,7 +44,10 @@ const connection = hub.upsert({ name: '本地协议验收连接', model: 'owned- hub.select({ type: 'connection', id: connection.id }); f.store.close(); const state = () => host.api('/sessions/' + sessionId); const panel = () => page.getByLabel('任务记录', { exact: true }); -const waitStatus = status => expect.poll(async () => (await state()).status, { timeout: 20000 }).toBe(status); +const waitStatus = async status => { + await expect.poll(async () => (await state()).status, { timeout: 20000 }).toBe(status); + if (['completed', 'paused', 'failed', 'needs_review'].includes(status)) await expect.poll(async () => (await state()).execution.run.finishedAt, { timeout: 10000 }).toBeTruthy(); +}; async function newTask(content) { if (!await page.getByRole('button', { name: '新建任务', exact: true }).isVisible()) await page.getByRole('button', { name: '展开项目栏' }).click(); await page.getByRole('button', { name: '新建任务', exact: true }).click(); @@ -82,6 +85,7 @@ try { assert.equal(paused.execution.checks[0].status, 'failed'); assert.deepEqual(fs.readFileSync(path.join(f.projectRoot, 'wrong.test.mjs')), originalSource); const taskId = paused.taskId, checkId = paused.execution.checks[0].id; await page.getByRole('button', { name: '查看任务记录', exact: true }).click(); await expect(panel()).toContainText('原工程检查有失败记录'); await capture('checks-desktop'); + assert.ok((await page.getByRole('button', { name: '继续任务', exact: true }).boundingBox()).height < 42, 'continuation action must remain a readable single line in the split pane'); mark('one approved real failing check is reused across new plans and the no-progress task pauses'); mode = 'diagnostic'; stage = 0; await page.getByLabel('任务内容').fill('前面的错误是怎么回事?'); await page.getByRole('button', { name: '发送任务', exact: true }).click(); diff --git a/src/client/control-console.css b/src/client/control-console.css index d59fad1c..aee80939 100644 --- a/src/client/control-console.css +++ b/src/client/control-console.css @@ -3,3 +3,5 @@ .task-pane{background:#fff;border-color:#c6d1de}.work-header{height:82px;min-height:82px;background:#fff;border-bottom:1px solid #cbd5df;padding-left:26px;padding-right:24px}.work-title h1{font-size:18px;font-weight:650;letter-spacing:-.02em;line-height:1.4}.header-breadcrumb{color:#61748d;font-size:11px}.header-symbol{color:#2560a3;border-color:#bacbdd;background:#eff4fa}.model-button{border:1px solid #bccbdb;border-radius:6px;background:#f5f8fc;min-height:35px;color:#26466a;font-size:12px;font-weight:600}.task-toolbar{background:#f1f4f8;border-bottom:1px solid #ced8e3;min-height:44px;padding-left:26px}.conversation{padding:28px 30px 22px}.message-text{color:#233b55}.tool-row{border-radius:6px;border-color:#c5d2df;background:#f5f8fb}.tool-row summary{min-height:44px}.composer-wrap{background:#f5f7fa;border-top:1px solid #cbd5df;padding:17px 24px 14px}.composer{border:1px solid #afc1d3;border-radius:8px;background:#fff;box-shadow:0 2px 5px #15283f07}.composer:focus-within{border-color:#2560a3;box-shadow:0 0 0 2px #2560a31a}.composer textarea{font-size:14px;line-height:1.8}.button{border-radius:5px;font-weight:600;min-height:34px}.button.primary{background:#2560a3;border:1px solid #20558f;color:white}.button.primary:hover{background:#1e528c}.button.secondary{background:white;color:#365570;border:1px solid #bbcad9}.button.secondary:hover{background:#edf3fa}.inspector{background:#f8fafc;border-color:#cbd5df}.inspector-tabs{background:#edf2f7;border-color:#cbd5df;min-height:49px}.inspector-tabs button{font-size:12px;color:#4e657f}.inspector-tabs button.active{color:#235e98;border-color:#2560a3}.record-heading h3,.task-record-section h3{font-size:14px;font-weight:650;color:#203e60}.task-record-section{border-color:#ccd8e4}.status{font-size:11px;border-radius:4px;font-weight:600}.modal{background:#f8fafc;border:1px solid #bdcbda;border-radius:10px;box-shadow:0 24px 90px #07172e33}.modal-header h2{color:#173653;font-size:19px}.failure-card{border-left:3px solid #bb7a31;border-radius:6px}.approval-card{border-left:3px solid #2560a3;border-radius:6px}.form-field input,.form-field select{border-color:#b8c8d8;background:white;border-radius:5px;min-height:39px}.model-launch{display:flex;gap:8px;align-items:center}.model-launch>.button{font-size:12px;white-space:nowrap} @media(max-width:940px){.conversation{padding:23px 20px}.work-header{padding:0 18px}.task-toolbar{padding-left:18px}.model-launch .model-button{max-width:170px;overflow:hidden;text-overflow:ellipsis}} @media(max-width:620px){.work-header{height:72px;min-height:72px;padding:0 13px}.work-title h1{font-size:15px}.header-breadcrumb{font-size:10px}.model-launch>.button span{display:none}.model-launch>.button{width:40px;height:44px;padding:8px}.model-launch .model-button{max-width:106px;font-size:11px;min-height:36px}.task-toolbar{padding-left:13px;min-height:48px}.conversation{padding:23px 15px}.composer-wrap{padding:12px}.toolbar-actions .icon-button{min-height:40px;min-width:32px}.project-sidebar button{min-height:42px}.composer textarea{font-size:14px}.work-title .header-symbol{display:none}} +.task-pane{container-type:inline-size}.work-title{flex:1}.header-breadcrumb{white-space:nowrap;overflow:hidden}.model-launch{flex-shrink:0}.task-toolbar{overflow-x:auto;overflow-y:hidden}.task-toolbar>.task-local,.task-toolbar>.status{flex-shrink:0;white-space:nowrap}.toolbar-actions{flex-shrink:0}.toolbar-actions button{white-space:nowrap;flex-shrink:0} +@container(max-width:700px){.work-header{gap:12px;padding-left:14px;padding-right:14px}.model-launch>.button span{display:none}.model-launch>.button{padding:8px}.model-launch .model-button{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.work-title .header-symbol{display:none}.work-title h1{font-size:15px}.task-toolbar{padding-left:14px;padding-right:14px}}