数据工单有了自己的面孔;件上四处样式对齐;缺库不再问人;5173 反代改回本机

用户在工作台上连报六条(2026-08-27):
- 对话区把数据工单摆成「执行工单」→ 契约 ExecutionWorkOrder.variant:'data'(引擎侧与执行工单无异,
  只换面孔),归一层从卡上带下来,web 新增 DataForm(同一套办法、另一副面孔:色/图标/「数据工单」/「确认写入」),
  办结卡与治理台人类工具目录同步;活动的两张数据工单卡骨架标 variant:"data"。
- 表显示不全不能右滑 → 目标件把 overflow-x:auto 写在 .tbl-wrap,平台包装是 .jc-tbl-wrap,谁都没管到;补一条。
- 表头只留中文 → 三张数据工单表去英文列名与 .thd 小字。
- 编辑态内部料号「只读字 + 输入框」并排 → 目标件 #tbl1 .jc-vcell{display:inline}(id 特异度)盖过
  table.on 的隐藏规则,表 1 每格其实都并排,PN 那格恰好有字;用 id 特异度覆盖回去。
- input 与 select 没对齐 → 徽标从前包 .ro 编辑态留着、压在下拉框头上把那格顶低 13px,改成随只读格一起藏;
  input/select 钉同一高度。
- 第一步「派数据工单还是放弃候选」不该问人 → 决策卡退役(覆盖规格「候选 ≥2 可放弃」那一条,用户定),
  查无记录一律自动派;剧本/说明书/测试/e2e 同步(e2e 新增 expectAsks.max 断言「不该问的没问」)。
顺带:5173 的 /api 反代默认指向一条公网隧道(150.158.83.131:46100 → nps → npc → 本机 :8787),
浏览器每次请求先出公网再绕回来;默认改回本机,要远端的显式给 API_PROXY_TARGET。

静态渲染实证:900px 宽的框里横向能滑 200px;编辑态同一行 3 input + 1 select 全部 32px 同一 y;
只读 PN 格 display:none。活动包 1.4.0;2097 测 / typecheck / lint / depcruise 绿。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FJcX8A6TWp4GRs41TYryEh
This commit is contained in:
xcs
2026-08-27 12:36:13 +08:00
co-authored by Claude Fable 5
parent 3171d8a864
commit 51c87af583
15 changed files with 197 additions and 116 deletions
@@ -185,15 +185,13 @@ describe('案例模型与清单的对齐', () => {
for (const name of mentioned) expect(ITEMS, `说明书提到但不存在的计划项: ${name}`).toContain(name);
});
it('两种决策卡骨架都在说明书里:候选放弃/创建(create/abandon)与审核(approve/reject/custom:)', () => {
it('说明书里只剩审核那一种决策卡(approve/reject/custom:);候选放弃/创建那张已退役 —— 缺库一律自动派数据工单(2026-08-27 用户定)', () => {
const n = manifest.assets.businessModel.narrative;
expect(n).toContain('"kind":"decide","itemId":"S0d_p08_master"');
expect(n).toContain('"value":"create"');
expect(n).toContain('"value":"abandon"');
expect(n).toContain('"kind":"decide","itemId":"S4_review"');
expect(n).toContain('"approve"');
expect(n).toContain('"reject"');
expect(n).toContain('"custom:"');
expect(n).not.toContain('"value":"create"');
expect(n).not.toContain('"value":"abandon"');
expect(n).toContain('"value":"approve"');
expect(n).toContain('"value":"reject"');
expect(n).toContain('custom:');
});
it('T_release 剧本里 judge criterion 的原文逐字对得上 acceptanceCriteria 的 label', () => {
@@ -139,7 +139,9 @@ describe('doneWhen —— 开局不许真,干完必须真', () => {
describe('说明书与剧本的骨架', () => {
it('五张卡的骨架都住在说明书里(压拍之后只有说明书还在)', () => {
expect(NARRATIVE).toContain('"kind":"entry","itemId":"S0_bind"');
expect(NARRATIVE).toContain('"kind":"decide","itemId":"S0d_p08_master"');
expect(NARRATIVE).not.toContain('"kind":"decide","itemId":"S0d_p08_master"');
// 两张数据工单都得标 variant:"data" —— 对话区凭它换成「数据工单」那副面孔
expect(NARRATIVE.match(/"variant":"data"/g)?.length).toBe(2);
expect(NARRATIVE).toContain('"title":"数据工单 · 芯片主数据创建(P-08)');
expect(NARRATIVE).toContain('"title":"数据工单 · 原厂技术资料创建(P-10)');
expect(NARRATIVE).toContain('"title":"评估输入与资料补齐确认');
@@ -166,22 +168,21 @@ describe('说明书与剧本的骨架', () => {
expect(secondPass).toMatch(/收不了步|收不掉/);
});
it('S0 剧本写明都在库时数据工单两项本就不会进「当下可为」;S0d_p08_master 剧本按候选总数判断该不该问人(=1 必建、≥2 才问、原 PN 硬阻塞)', () => {
it('S0 剧本写明都在库时数据工单两项本就不会进「当下可为」;S0d_p08_master 剧本写明 found 的一颗都不建', () => {
const s0 = ASSESSMENT_STEPS.find((s) => s.item === 'S0_bind')?.guide ?? '';
expect(s0).toContain('当下可为');
expect(s0).toContain('不要对计划项用');
expect(s0).toMatch(/都在库/);
const s0d = ASSESSMENT_STEPS.find((s) => s.item === 'S0d_p08_master')?.guide ?? '';
expect(s0d).toContain('硬阻塞');
expect(s0d).toContain('候选总数 = 1');
expect(s0d).toContain('absent');
expect(s0d).toMatch(/found" 的一行都不建/);
});
it('S0d_p08_master 剧本按候选总数(不是「不在库的颗数」)判断要不要问人 —— 候选总数 ≥2 时逐颗不在库的都要问(2026-08-27 实测逼出的措辞修正)', () => {
it('S0d_p08_master:查无记录一律派数据工单,不问人 —— 决策卡退役(2026-08-27 用户定:「只要有缺失就要自动派数据工单不需要人选择」)', () => {
const s0d = ASSESSMENT_STEPS.find((s) => s.item === 'S0d_p08_master')?.guide ?? '';
expect(s0d).toContain('候选总数');
expect(s0d).toContain('不在库');
expect(s0d).toMatch(/候选总数\s*≥\s*2/);
// 反面提示:「不在库的只有一颗」不该被读成跳过决策卡的理由
expect(s0d).toContain('不是跳过决策卡的理由');
expect(s0d).toMatch(/一律建,不问人/);
expect(s0d).toMatch(/exists_status = "found" 的一行都不建/);
expect(s0d).not.toMatch(/发一张决策卡问人/);
expect(s0d).not.toMatch(/候选总数\s*≥\s*2/);
});
it('s_bound 哨兵真的检查了「有料号不在库」这件事(都在库时门不该开;退回旧写法会红)', () => {
@@ -208,11 +209,6 @@ describe('说明书与剧本的骨架', () => {
expect(p10?.doneWhen).toBeUndefined();
});
it('候选放弃到只剩最后一颗时不许再放弃(至少留一颗,防止全放弃死锁)', () => {
const s0d = ASSESSMENT_STEPS.find((s) => s.item === 'S0d_p08_master')?.guide ?? '';
expect(s0d).toContain('至少留一颗候选');
});
it('P-08 交回之后先 finish 再发 P-10 卡,顺序写死进两段 guide(2026-08-27 实测:漏收步会让工作区画面停在 P-08 那两张表,P-10 卡发出后人却看不见资料表、提交闸拦死)', () => {
const s0d = ASSESSMENT_STEPS.find((s) => s.item === 'S0d_p08_master')?.guide ?? '';
expect(s0d).toContain('finish S0d_p08_master');
@@ -239,8 +235,8 @@ describe('说明书与剧本的骨架', () => {
it('数据工单的名单只认 absent,「建哪几颗」与「要不要问人」分开写(2026-08-27 实测:原 PN 缺库那单,模型把在库的候选派成了数据工单,缺的那颗没人建)', () => {
const g = ASSESSMENT_STEPS.find((s) => s.item === 'S0d_p08_master')?.guide ?? '';
expect(g).toMatch(/问题一 · 建哪几颗/);
expect(g).toMatch(/问题二 · 建之前要不要先问人/);
expect(g).toMatch(/【名单】/);
expect(g).toMatch(/一律建,不问人/);
expect(g).toMatch(/exists_status = "found" 的一行都不建/);
});
@@ -300,8 +296,8 @@ describe('说明书与剧本的骨架', () => {
it('第二颗缺库的候选也要先问(每一颗都有被放弃的权利)', () => {
const g = ASSESSMENT_STEPS.find((s) => s.item === 'S0d_p08_master')?.guide ?? '';
expect(g).toMatch(/这一颗也要先发一张决策卡问人/);
expect(g).toMatch(/第一颗问过了不代表第二颗也问过/);
expect(g).toMatch(/不问人,直接建/);
expect(g).not.toMatch(/这一颗也要先发一张决策卡问人/);
});
it('created 认的是「卡交回来了」,不是「表里有行」—— 写骨架 ≠ 建好了(2026-08-27 e2e:模型铺完骨架就标 created、直接 finish,撞「从没给它发过卡」连拒五拍)', () => {
@@ -311,6 +307,23 @@ describe('说明书与剧本的骨架', () => {
expect(g).not.toMatch(/只有它在 \\`parts\.profile\\` 里真有一行/);
});
it('件上三处样式毛病钉死(2026-08-27 用户:表显示不全不能右滑 / 编辑态内部料号只读字与输入框并排 / input 与 select 没对齐)', () => {
const html = manifest.assets.viewTemplates.find((v) => v.name === 'p08-master-create')?.html ?? '';
expect(html).toContain('.jc-tbl-wrap { overflow-x: auto;');
expect(html).toContain('#tbl1.on td > .jc-vcell:not(.ro) { display: none; }');
expect(html).toContain('input.jc-cell, select.jc-cell { height: 32px;');
// 徽标不再包 .ro(编辑态要随只读格一起藏,只留下拉框)
expect(html).not.toContain('<span class="jc-vcell ro"><span class="stx"');
});
it('数据工单三张表的表头只留中文:没有英文列名、没有 .thd 小字(2026-08-27 用户定)', () => {
for (const name of ['p08-master-create', 'p10-document-create'] as const) {
const html = manifest.assets.viewTemplates.find((v) => v.name === name)?.html ?? '';
expect(html, name).not.toContain('class="thd"');
for (const th of html.match(/<th[^>]*>[^<]*<\/th>/g) ?? []) expect(th, name).not.toMatch(/[a-z]_[a-z]/);
}
});
it('五段进度,每段名 ≤10 字;除放行外每项恰属一段', () => {
expect(ASSESSMENT_PHASES).toHaveLength(5);
for (const p of ASSESSMENT_PHASES) expect(p.name.length, p.name).toBeLessThanOrEqual(10);