diff --git a/CHANGELOG.md b/CHANGELOG.md index 75928ec..1904ca5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -76,6 +76,12 @@ > `0.1.12`),由 `scripts/version.py` 从 git **算出来**;开发交付的独立说明写入本文件“开发快照”章节,并打 `snapshot/vX.Y.Z` 注释标签 ⇒ 每次开发交付均可追溯, > 但"发布版本"仍然只能由人定(CI 不会自动升版本、不会打 tag)。 +## 开发快照 snapshot/v0.1.58 - 2026-10-25 + +### Changed + +- 问题流水表最左侧增加序号,按当前筛选结果从1连续编号,后台续载与虚拟滚动保持连续;不改变业务字段、原始数据或完整导出口径。 + ## 开发快照 snapshot/v0.1.57 - 2026-10-25 ### Changed diff --git a/web/src/QAOperations.test.tsx b/web/src/QAOperations.test.tsx index 4d46912..a40d08e 100644 --- a/web/src/QAOperations.test.tsx +++ b/web/src/QAOperations.test.tsx @@ -64,6 +64,18 @@ describe('QA operations workbench', () => { } }) + it('adds a leading serial column without changing business fields or virtual spacer geometry', () => { + const many = Array.from({ length: 200 }, (_, index) => ({ ...item, id: 'row-' + index })) + const html = renderToStaticMarkup() + expect(html).toMatch(/]*>序号<\/th>中文问题<\/th>/) + expect(html).toMatch(/data-qa-row="row-0"[^>]*>]*>1<\/td>/) + const rows = [...html.matchAll(/data-qa-row="row-(\d+)"[^>]*>]*>(\d+)<\/td>/g)] + expect(rows.length).toBeGreaterThan(1) + for (const row of rows) expect(Number(row[2])).toBe(Number(row[1]) + 1) + expect(html).toContain('colSpan="17"') + expect(html).toContain('aria-rowcount="201"') + }) + it('keeps the first rows interactive while later batches load or fail', () => { const prefix = { ...page, total: 2, has_more: true, next_cursor: 'next' } const loading = renderToStaticMarkup() diff --git a/web/src/QAOperations.tsx b/web/src/QAOperations.tsx index 3087edb..c0dc8c7 100644 --- a/web/src/QAOperations.tsx +++ b/web/src/QAOperations.tsx @@ -97,6 +97,7 @@ const QARow = memo( if (!(event.target as HTMLElement).closest('button,a,input,select,textarea,summary')) onSelect(item.id) }} > + {rowIndex - 1} {qaColumns.map(({ key }) => ( sum + ledgerColumnWidth(c.key), 160) }} + style={{ width: qaColumns.reduce((sum, c) => sum + ledgerColumnWidth(c.key), 224) }} > + {qaColumns.map((c) => ( ))} @@ -247,6 +249,9 @@ export function QAOperationsView(props: ViewProps) { + + 序号 + {columns.map(({ key, label }) => ( {props.onFiltersChange && editableFieldKeys.includes(key as EditableField) ? ( @@ -267,14 +272,14 @@ export function QAOperationsView(props: ViewProps) { {!items.length && page && !props.loading && !props.error ? ( - + 没有符合条件的问答,请调整表头筛选、时间范围或关键词。 ) : null} {visible.padTop > 0 ? ( - + ) : null} {items.slice(visible.start, visible.end).map((item, index) => { @@ -292,7 +297,7 @@ export function QAOperationsView(props: ViewProps) { })} {visible.padBottom > 0 ? ( - + ) : null} diff --git a/web/src/qaOps.css b/web/src/qaOps.css index 92ebd8f..a599a0e 100644 --- a/web/src/qaOps.css +++ b/web/src/qaOps.css @@ -294,6 +294,11 @@ table-layout: fixed; font-size: 13px; } +.qa-ops-table .qa-ops-index { + text-align: right; + color: var(--ink-mute); + font-variant-numeric: tabular-nums; +} .qa-ops-table th { position: sticky; top: 0;