feat(qaops): 完成流水表六项体验与AI执行修正
build / build (push) Successful in 1m11s

统一AI分析入口及双任务安全确认,采用全量载入的可见行渲染,保留完整原文。
右侧非模态详情固定五项质量字段,清理冗余展示并对齐查询和同步按钮。
默认4并发由数据库准入与逐任务租约保护,保留共享限流冷却、截断归因和有界重试。
兼容真实引用标题字段,不伪造证据或准确率,不修改源生产问答与公司区域规则。

验证:完整make verify退出0,710项Go通过、124项已声明可选跳过且必需0跳过;
另全量mirror隔离PostgreSQL race退出0,AI单元race退出0。
真实本地浏览器通过六项交互、390px内滚动及显式AI部分失败/零缺口故障夹具。
治理原生备份已真实恢复,schema57、72表计数与29张QA内容哈希一致。
候选镜像、精确提交CI与正式上线验收待本次提交后执行,不宣称已部署。
This commit is contained in:
姚章浩
2026-10-19 22:09:32 +08:00
parent 4a2b2b7d84
commit 9470a127f7
21 changed files with 754 additions and 209 deletions
+42 -4
View File
@@ -1,3 +1,5 @@
// @ts-expect-error The test runner provides Node; the browser bundle intentionally omits @types/node.
import { readFileSync } from 'node:fs'
import { renderToStaticMarkup } from 'react-dom/server'
import { describe, expect, it, vi } from 'vitest'
import { QAOperationsTabs, QAOperationsView } from './QAOperations'
@@ -101,12 +103,13 @@ describe('QA operations workbench', () => {
expect(html).toContain('数据源有待审核的安全告警')
expect(html).toContain('fixture real read failure')
})
it('keeps a name-only person summary with the original available separately', () => {
it('removes workflow personnel from details while preserving the record data', () => {
const detail = { ...item, trigger_person: JSON.stringify({ name: '示例姓名', unionId: 'fixture-union' }) }
const html = renderToStaticMarkup(<QAOperationsView {...props} detail={detail} />)
expect(html).toContain('<dd>示例姓名</dd>')
expect(html).toContain('原始人员信息')
expect(html).toContain('fixture-union')
const drawer = html.slice(html.indexOf('<aside'))
expect(drawer).not.toContain('示例姓名')
expect(drawer).not.toContain('原始人员信息')
expect(drawer).not.toContain('fixture-union')
})
it('provides a row-level detail target and categorical color tags without adding business columns', () => {
const html = renderToStaticMarkup(<QAOperationsView {...props} />)
@@ -182,3 +185,38 @@ describe('QA operations workbench', () => {
expect(restored.activeTab).toBe('qaops')
})
})
it('opens a modeless right drawer with fixed leading quality fields and no redundant organization/personnel details', () => {
const html = renderToStaticMarkup(<QAOperationsView {...props} detail={{ ...item, record_origin: 'dobotai_2_0' }} />)
const drawer = html.slice(html.indexOf('<aside'))
expect(html).not.toContain('qa-ops-backdrop')
expect(drawer).toContain('aria-modal="false"')
expect(drawer).toContain('qa-detail-quality')
const labels = ['是否覆盖', '是否正确', '产品分类', '问题类型', '根因分析']
for (const label of labels) expect(drawer).toContain(label)
expect(drawer.indexOf('根因分析')).toBeLessThan(drawer.indexOf('原始问题'))
for (const label of [
'<dt>区域</dt>',
'当前组织关联',
'当前通讯录部门/区域',
'组织版本',
'源端组织快照',
'记录来源',
'问答状态',
'流程触发人员信息',
'原始人员信息',
])
expect(drawer).not.toContain(label)
})
it('names the ledger explicitly as 问题流水表', () => {
const html = renderToStaticMarkup(<QAOperationsTabs view="records" onChange={vi.fn()} />)
expect(html).toContain('>问题流水表</button>')
})
it('uses matching query/sync action sizing and keeps synchronization status outside the button baseline', () => {
const css = readFileSync(new URL('./qaOps.css', import.meta.url), 'utf8')
expect(css).toContain('.qa-ops-query .qa-query-action')
expect(css).toMatch(/\.qa-ops-query \.qa-query-action\s*\{[^}]*width:\s*96px/)
expect(css).toMatch(/\.qa-ops-query \.qa-mirror-sync-line\s*\{[^}]*margin-bottom:\s*0/)
})