Skip to content

Commit a38585d

Browse files
committed
test(ui): 收紧 nativeButton 基线里过期的 1 处余量
1 parent 4270860 commit a38585d

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

‎app/src/ui/primitives/nativeButtonBaseline.ts‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,27 @@
4343
* ⚠️ **另一处「余量」不许收紧**:`pages/ChatPage.tsx` 实测 **2** < 冻结 **5** 是**拆件搬运**的正常
4444
* 形态 —— 3 处随 `✨ 发起任务` 菜单搬进 `components/chat/ChatLaunchMenu.tsx`(见 `SPLIT_MOVES`),
4545
* 两侧之和必须仍等于源键的 5(`nativeButton.ratchet.test.ts` ④ 的守恒判据)。
46+
*
47+
* ★ **收紧 1 处余量(批 7 T12 · 7a 段收口;依据 `rulings.md` §C31.2 的 Important I1)**:
48+
* 批 7 收口实测 **392 处 / 114 文件**,而常量与逐文件表之和都是 **393** ⇒ 差值来源 =
49+
* `components/SessionDetailPanel.tsx` **登记 1 / 实测 0**(该文件不在 T6 的写集内,登记值过期)。
50+
* 据实收紧:`["components/SessionDetailPanel.tsx"] 1 → 0`。**保留键、不整键删除** —— 因为
51+
* `buttonMigration.test.ts:271` 的「逐文件基线键数 == 114」是一条**普查等式**,删键会让它红,
52+
* 而那与本次收紧无关。连带**必改**:`FROZEN_NATIVE_BUTTON_TOTAL 393 → 392` ——
53+
* `buttonMigration.test.ts:272` 断言「常量 == 逐文件 entries 之和」,键值降 1 会让和降 1;
54+
* 两者**同为下降**,符合 §C5.1「只许降或持平」。⇒ 收紧后 **Σentries == 常量 == 实测 == 392**(零余量)。
55+
* ⚠️ 本文件外的遗留散文(本次未改,已登记进 T12 报告):`components/MotionIntensityControl.tsx:14`。
4656
*/
47-
export const FROZEN_NATIVE_BUTTON_TOTAL = 393;
57+
export const FROZEN_NATIVE_BUTTON_TOTAL = 392;
4858

4959
/** `const *Btn*` 样式常量族的冻结**行数**(T12 迁移后实测 56;迁移前 79)。 */
5060
export const FROZEN_BTN_STYLE_CONST_LINES = 56;
5161

5262
/** `const *Btn*` 样式常量族的冻结**文件数**(T12 迁移后实测 44;迁移前 55)。 */
5363
export const FROZEN_BTN_STYLE_CONST_FILES = 44;
5464

55-
/** 相对 `app/src` 的路径 → 基线计数(T12 迁移后实测 394/114 ⇒ 收口评审 M-3 收紧总量为 **393**,键数仍 114) */
65+
/** 相对 `app/src` 的路径 → 基线计数(T12 迁移后实测 394/114 ⇒ 收口评审 M-3 收紧总量为 **393**,键数仍 114;
66+
* 批 7 T12 再收紧 `SessionDetailPanel` 键 1 → 0 与总量 → **392**,见上方 ★;零值键 = 该文件「必须保持 0 处」) */
5667
export const FROZEN_NATIVE_BUTTON_BY_FILE: Readonly<Record<string, number>> = {
5768
"components/action-center/ActionCenterPanel.tsx": 11,
5869
"components/AiConversationDock.tsx": 9,
@@ -143,7 +154,7 @@ export const FROZEN_NATIVE_BUTTON_BY_FILE: Readonly<Record<string, number>> = {
143154
"components/session-detail/SessionDetailHeader.tsx": 2,
144155
"components/session-detail/SessionRefineSection.tsx": 3,
145156
"components/session-detail/SessionScreenCards.tsx": 1,
146-
"components/SessionDetailPanel.tsx": 1,
157+
"components/SessionDetailPanel.tsx": 0,
147158
"components/SessionListBody.tsx": 1,
148159
"components/SessionListPanel.tsx": 2,
149160
"components/SessionRowContextMenu.tsx": 5,

0 commit comments

Comments
 (0)