同步:完善质量分析工作台并更新主题字体

同步已上线的智能分析执行协议、来源查询、图表报告与管理页面配套代码。
补齐数据库迁移、运行依赖和回归测试,保留原有指标计算口径。
统一午夜黑及其他主题的控件细节、中文和业务数字字体。
排除本地业务数据、凭据、预览、发布与验收产物。

验证:生产构建通过,320项前端回归通过;本轮仅同步Git,不再次部署。
This commit is contained in:
2026-10-30 22:40:58 +08:00
parent edef747e3b
commit ff7bbe3e46
393 changed files with 62999 additions and 1783 deletions
+19
View File
@@ -0,0 +1,19 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { consumeEventStream } from '../web/src/eventStream.ts';
const consume=async chunks=>{const events=[];const encoder=new TextEncoder();await consumeEventStream(new ReadableStream({start(c){for(const chunk of chunks)c.enqueue(encoder.encode(chunk));c.close();}}),event=>events.push(event));return events;};
test('a comment before an event cannot hide the recorded result',async()=>{
const events=await consume([': heartbeat\nevent: progress\nid: 12\ndata: {"message":"来源已返回"}\n\n']);
assert.equal(events.length,1);assert.equal(events[0].id,'12');assert.equal(events[0].data.message,'来源已返回');
});
test('an interrupted final frame cannot falsely complete a running turn',async()=>{
const events=await consume(['event: progress\nid: 1\ndata: {"status":"RUNNING"}\n\n','event: completed\nid: 2\ndata: {"status":"COMPL']);
assert.equal(events.length,1);assert.equal(events[0].event,'progress');
});
test('CRLF and chunk boundaries preserve events and multi-line data',async()=>{
const events=await consume(['id: 4\r\nevent: answer\r\ndat','a: {"answer":\r\ndata: "完整回答"}\r\n\r','\n']);
assert.equal(events[0].data.answer,'完整回答');
});
test('a malformed structured terminal event is rejected before it changes task status',async()=>{
await assert.rejects(consume(['event: completed\ndata: {broken}\n\n']),/事件格式异常/);
});