复核第 1 轮:对比入口预先问默认基准带 5 秒超时、问到没有默认基准时写「选择基准对比…」直接去对比页手动选、切回页面时再问一次;工件页签的悬停照实写,320px 时校验值和大小不再拆开

- 对比入口(pages/runs/compare/entry.tsx):预先问 compare/base 卡着不回时 5 秒后按没问到算,叫法退回「与上一次对比」、可点,不再一直停在不可点的「正在查找」;问到没有默认基准(多为工作流的第一次运行)时写「选择基准对比…」,点了直接去只带本次的对比页手动选(对比页自己再找一次),不再写「与上一次对比」、点了再问一遍弹提示;切去别的标签页再切回来时再问一次,问的期间保留原来的叫法、可点,问到不一样才换,问不到不改;更正预先问那段注释的前提(compare/base 不回 409、422,不先问是因为这些入口本来不给点)
- 运行详情「工件」页签头的悬停写上证据快照、核查记录和每个节点的产出三组(RUN_ARTIFACTS_TEXT.tabTitle,RunDetailView 只换这一处);证据快照的悬停不再说「结论里的数字从这里来」,点明含核查、质询时执行的查询;核查记录的悬停用行上的种类名,指明其间执行的查询见「证据快照」;两句都在 45 字内
- 工件行的校验值和大小包在一起排、一起折行,这一栏窄于 22rem 时收起校验值:320px 下大小不再单独折到种类下面,每行仍是两行
- 对比页没带运行时的说明缩成 32 字,不逐个列菜单项的叫法
- 检查:check-compare 补预先问超时、没有默认基准、切回页面再问、点了才发现没有基准后叫法跟着改、工件页签悬停几节;check-verify 改两组悬停的断言、补 320px;check-schedules 的假 compare/base 补上 previous: false(和服务端一致),断言运行详情菜单项与触发历史链接的叫法一字不差
This commit is contained in:
ThearchyHelios
2026-10-06 18:25:35 +08:00
parent b8dfbdb335
commit 53bb356fae
8 changed files with 292 additions and 72 deletions
+10 -2
View File
@@ -1519,7 +1519,10 @@ await section('详情:触发历史和运行详情的「与上一次对比」
started_at: r.started_at, finished_at: r.finished_at, schedule_id: r.schedule_id })
const compareApi = (method, path, body, url) => {
if (method !== 'GET') return null
if (path === '/runs/run-f10/compare/base') return { json: { base_run_id: 'run-f12', reason: 'same_schedule', base: ref(f12) } }
// previous 同服务端 pick_base:上一次(f11)失败了,基准不是紧挨着的上一次,同触发历史里 f10 那一行(COMPARE_F10)
if (path === '/runs/run-f10/compare/base') {
return { json: { base_run_id: 'run-f12', reason: 'same_schedule', base: ref(f12), previous: COMPARE_F10.previous } }
}
if (path === '/runs/run-f10/compare' && url.searchParams.get('base') === 'run-f12') {
return { json: { target: ref(f10), base: ref(f12), summary: COMPARE_F10.summary, metrics: [], queries: [], notes: [],
template: { base_version: 3, target_version: 3, same_graph: true, nodes: [] } } }
@@ -1536,7 +1539,11 @@ await section('详情:触发历史和运行详情的「与上一次对比」
const menu = await open('/runs/run-f10', { state: stateOf() })
await menu.page.locator('[data-run-detail="run-f10"]').waitFor({ timeout: 10000 })
await menu.page.getByRole('button', { name: '更多操作' }).click()
await menu.page.locator('[data-menu=compare]').click()
// 菜单项等预先问到默认基准才可点,叫法照它的 previous 定
const item = menu.page.locator('[data-menu=compare]')
await until(async () => !(await item.isDisabled().catch(() => true)))
const menuLabel = (await item.innerText().catch(() => '')).trim()
await item.click()
const a = await landed(menu.page)
const hist = await open('/schedules/s-weekly?tab=history', { state: stateOf() })
const link = hist.page.locator('[data-fire-id="f10"] [data-fire-compare]')
@@ -1550,6 +1557,7 @@ await section('详情:触发历史和运行详情的「与上一次对比」
const [ra, rb] = [await reasonOf(menu.page), await reasonOf(hist.page)]
check('……两处写的默认基准一字不差:同一定时任务上一次成功的运行', ra === REASON_SCHEDULE && rb === REASON_SCHEDULE, `${ra} | ${rb}`)
check('……触发历史上看得见的字说明比的是上一次成功的运行', label === '与上一次成功的运行对比', label)
check('……运行详情「更多」里的入口和触发历史的链接叫法一字不差', menuLabel === label, `${menuLabel} | ${label}`)
const tiles = (page) => until(async () => (await page.locator('[data-compare-summary] [data-compare-class]').evaluateAll((els) =>
els.map((e) => `${e.getAttribute('data-compare-class')}=${e.querySelector('[data-compare-count]')?.textContent?.trim()}`))).join(' '))
const [ta, tb] = [await tiles(menu.page), await tiles(hist.page)]