|
| 1 | +/** |
| 2 | + * @ai-context T16「弱化文本 → `Text`」与「字号越界」的**两条棘轮基线**(批 4 B11 的切片 + 棘轮)。 |
| 3 | + * |
| 4 | + * Why 两条(规格 §5.1 的同源病灶:「字号与两个灰手写组合,对比度逐处失控」): |
| 5 | + * ① **弱化灰 `#9ca3af`** —— 白底实测 ≈2.54:1,远低于 4.5:1 正文线;终点是墨度只从 `Text` 的 |
| 6 | + * `tone` 出。但仓内大量同色字面量属非「弱化文本」语境(`background` / `border` / SVG |
| 7 | + * `fill` / 图形画布)⇒ 不该清零 ⇒ 冻结存量、只许减。 |
| 8 | + * ② **字号越界 <12px**(9/9.5/10/10.5/11/11.5)—— 规格 §4.2 是「下界 12px;10px/11px 一律 |
| 9 | + * 消灭」。604 处的观感一次性改且**几乎没有测试面** ⇒ 按 R2 只冻结不迁移;映射规则与规模 |
| 10 | + * 见 `tmp/t16a/slice.md`,执行登记给批 5/6(批 6 重排字距时一并做更合理)。 |
| 11 | + * |
| 12 | + * ★ 计次口径(选定后写死;换算已自证) |
| 13 | + * 域 = `app/src/**` 的 `.ts`/`.tsx` **减** `*.test.ts(x)` **减** `ui/primitives/**` |
| 14 | + * (原语层是墨度与字阶的真源,不是待收敛的调用点 —— 同 `statusLineBaseline` / T1 的 `prod`)。 |
| 15 | + * **先剥注释**(复用 `sliceScan.ts` 的状态机;字符串与模板只跳过、不抹内容)。 |
| 16 | + * 弱化灰取**行**口径(同行多次算 1;T1 的 295 / 上一轮探针的 246 同此);字号越界取**处**口径 |
| 17 | + * (逐次命中;计划的 604 同此)。⚠️ 两口径在本域**恰好等值**:`tmp/t16a/unit-check.mjs` 实测 |
| 18 | + * 「同一行两次命中」的行数两条都是 **0** ⇒ 换算系数 **1.0000**,故「行 == 处」可直接互引。 |
| 19 | + * 若将来某行出现两次命中,行口径会**少算**(棘轮偏松)⇒ 按处口径重测并收紧。 |
| 20 | + * |
| 21 | + * ★ 数字来源(同一支探针跑三棵树;机理逐条见 `tmp/t16a/mechanism.md`,本文件只留结论) |
| 22 | + * 弱化灰行/文件:计划 42e88740 **295/105**(计划文案写 296 ⇒ 手抄噪声)→ 上一轮探针 |
| 23 | + * 8f5bd9f1 **246/98** → 本单元 HEAD **249/100**;字号越界处/文件:**604/124 → 576/122 → 558/120**; |
| 24 | + * `fontSize` 全量 **1274 → 1171 → 1123**。三段差各有主:−49 行灰是批 4 已落库的 T13/T14/T15 |
| 25 | + * 迁移(37 文件、7 文件清零);其后 +3 行灰是 **T15 的 B1/B2 守卫回退**(`NoteLinkToSystem` |
| 26 | + * 4→5 · `NoteMoveToGroupMenu` 0→1 · `NoteRowContextMenu` 0→1,非本单元动作);上一轮探针的 |
| 27 | + * 「576」= 同一正则**少了 `11.5` 一个值类**(×10)且跑在 8f5bd9f1 上 ⇒ 576 = 586 − 10, |
| 28 | + * **不是口径差**(`regex-diff.mjs` 实测两条正则的全量命中只差 1 处、越界多重集差 0 行)。 |
| 29 | + * |
| 30 | + * ★ 冻结粒度 = **文件 → 计数**(同 `nativeButtonBaseline` / `loadingBaseline`):逐行 key 会在拆件 |
| 31 | + * 与行号漂移时假红;棘轮要防的是「永远迁不完」⇒ 总量 + 逐文件只减不增是完整的。 |
| 32 | + * 两条**不变的锚**(防「整表被换掉」)见 `ANCHOR_*`:条目数 + 一个具名文件的冻结值。 |
| 33 | + * |
| 34 | + * 副作用:无(纯数据,被 `textRatchet.test.ts` 读)。边界:**棘轮只许降** —— 真迁走一处要 |
| 35 | + * **手工收紧**(`FROZEN_*_TOTAL` 必须恰等于逐文件之和,由测试断言;常数不许手工改成自洽)。 |
| 36 | + */ |
| 37 | + |
| 38 | +/** 弱化灰冻结**总行数**(= `FROZEN_MUTED_GRAY_BY_FILE` 逐文件之和;只许降) */ |
| 39 | +export const FROZEN_MUTED_GRAY_TOTAL = 249; |
| 40 | + |
| 41 | +/** 弱化灰冻结**文件数**(条目数;迁移清零一个文件 ⇒ 必须删键,条目数随之降) */ |
| 42 | +export const FROZEN_MUTED_GRAY_FILES = 100; |
| 43 | + |
| 44 | +/** 字号越界冻结**总处数**(= `FROZEN_FONT_OOB_BY_FILE` 逐文件之和;只许降) */ |
| 45 | +export const FROZEN_FONT_OOB_TOTAL = 558; |
| 46 | + |
| 47 | +/** 字号越界冻结**文件数**(条目数;只许降) */ |
| 48 | +export const FROZEN_FONT_OOB_FILES = 120; |
| 49 | + |
| 50 | +/** |
| 51 | + * 锚(anti-table-swap):条目数 + 一个具名文件的冻结值。换一张同样「自洽」的表在计数口径下是 |
| 52 | + * 可能的,锚把「哪个文件的哪个计数」也钉住 ⇒ 换表必红。选它们是因为量大且都不是本批的迁移目标。 |
| 53 | + */ |
| 54 | +export const ANCHOR_MUTED_GRAY = { file: "components/LiveActivityPanel.tsx", count: 9, files: 100 } as const; |
| 55 | +export const ANCHOR_FONT_OOB = { file: "components/action-center/ActionCenterPanel.tsx", count: 19, files: 120 } as const; |
| 56 | + |
| 57 | +/** |
| 58 | + * 相对 `app/src` 的正斜杠路径 → 该文件**允许残留的弱化灰行数上限**(只许降,键不许新增)。 |
| 59 | + * ⚠️ 迁移清零一个文件时**删键**(不是改成 0)—— 留 0 值键会让「基线未登记的文件命中 = 0」这条 |
| 60 | + * 判据的语义变模糊(`loadingBaseline` 用 0 表示「已交给原语」,本表不采用那个约定)。 |
| 61 | + */ |
| 62 | +export const FROZEN_MUTED_GRAY_BY_FILE: Readonly<Record<string, number>> = { |
| 63 | + "components/AiConversationDock.tsx": 3, |
| 64 | + "components/AiProviderSettings.tsx": 1, |
| 65 | + "components/AiServicePanel.tsx": 1, |
| 66 | + "components/AiTaskPanel.tsx": 3, |
| 67 | + "components/AsrConfusionPanel.tsx": 4, |
| 68 | + "components/AudioLevelMeter.tsx": 1, |
| 69 | + "components/BackupPanel.tsx": 1, |
| 70 | + "components/CaptureFloatPanel.tsx": 3, |
| 71 | + "components/ChatComposer.tsx": 1, |
| 72 | + "components/ChatMessageList.tsx": 2, |
| 73 | + "components/ChatSidebar.tsx": 5, |
| 74 | + "components/CitationChips.tsx": 1, |
| 75 | + "components/ClassroomCapturePanel.tsx": 1, |
| 76 | + "components/ClassroomSourceColumn.tsx": 1, |
| 77 | + "components/ConceptCardRow.tsx": 2, |
| 78 | + "components/DiscoverySuggestSection.tsx": 2, |
| 79 | + "components/EnrichPanel.tsx": 1, |
| 80 | + "components/FeatureFlagSetting.tsx": 2, |
| 81 | + "components/FeedFragmentList.tsx": 3, |
| 82 | + "components/GoalAiSection.tsx": 2, |
| 83 | + "components/GoalCard.tsx": 1, |
| 84 | + "components/GoalDetail.tsx": 5, |
| 85 | + "components/GoalPlanApprovalDialog.tsx": 3, |
| 86 | + "components/GraduateDialog.tsx": 4, |
| 87 | + "components/GroupSidebar.tsx": 6, |
| 88 | + "components/GroupSidebarRow.tsx": 3, |
| 89 | + "components/InterviewDialog.tsx": 4, |
| 90 | + "components/InterviewSteps.tsx": 3, |
| 91 | + "components/KnowledgeCanvasView.tsx": 1, |
| 92 | + "components/KnowledgeConceptDialog.tsx": 1, |
| 93 | + "components/KnowledgeDecisionForm.tsx": 1, |
| 94 | + "components/KnowledgeDecisionLog.tsx": 2, |
| 95 | + "components/KnowledgeDetailPanel.tsx": 4, |
| 96 | + "components/KnowledgeGraphView.tsx": 4, |
| 97 | + "components/KnowledgeLinkSection.tsx": 3, |
| 98 | + "components/KnowledgeModelDialog.tsx": 1, |
| 99 | + "components/KnowledgeSystemWizard.tsx": 3, |
| 100 | + "components/KnowledgeTreeView.tsx": 4, |
| 101 | + "components/LearningLibraryEngineSection.tsx": 3, |
| 102 | + "components/LearningLibraryPanel.tsx": 2, |
| 103 | + "components/LiveActivityPanel.tsx": 9, |
| 104 | + "components/LiveImageStrip.tsx": 1, |
| 105 | + "components/LiveProfileStrip.tsx": 2, |
| 106 | + "components/MaterialInputPanel.tsx": 2, |
| 107 | + "components/ModelManagementPanel.tsx": 3, |
| 108 | + "components/NoteAiDialog.tsx": 1, |
| 109 | + "components/NoteColorPicker.tsx": 2, |
| 110 | + "components/NoteEditView.tsx": 1, |
| 111 | + "components/NoteImage.tsx": 1, |
| 112 | + "components/NoteLinkToSystem.tsx": 5, |
| 113 | + "components/NoteListBatchMenu.tsx": 1, |
| 114 | + "components/NoteListBody.tsx": 1, |
| 115 | + "components/NoteListRow.tsx": 2, |
| 116 | + "components/NoteListToolbar.tsx": 1, |
| 117 | + "components/NoteMoveToGroupMenu.tsx": 1, |
| 118 | + "components/NotePreviewView.tsx": 2, |
| 119 | + "components/NoteReadingView.tsx": 2, |
| 120 | + "components/NoteRowContextMenu.tsx": 1, |
| 121 | + "components/NoteTreeSection.tsx": 2, |
| 122 | + "components/OcrDeviceSetting.tsx": 3, |
| 123 | + "components/PracticeQuestionsOverlays.tsx": 5, |
| 124 | + "components/ProfileDetector.tsx": 5, |
| 125 | + "components/ProofreadPanel.tsx": 2, |
| 126 | + "components/ProofreadToggle.tsx": 1, |
| 127 | + "components/ReadyCheckCard.tsx": 3, |
| 128 | + "components/RefineStrategyPicker.tsx": 2, |
| 129 | + "components/RefineWorkbench.tsx": 1, |
| 130 | + "components/RetroTimeline.tsx": 3, |
| 131 | + "components/RichEditorView.tsx": 1, |
| 132 | + "components/RouteInfoPopover.tsx": 3, |
| 133 | + "components/SealToggle.tsx": 1, |
| 134 | + "components/SecondPassPanel.tsx": 4, |
| 135 | + "components/SessionDetailPanel.tsx": 4, |
| 136 | + "components/SessionListBody.tsx": 3, |
| 137 | + "components/SessionListPanel.tsx": 1, |
| 138 | + "components/SessionSearchHits.tsx": 2, |
| 139 | + "components/SopRunOverlay.tsx": 4, |
| 140 | + "components/SpeakerSwitchCard.tsx": 4, |
| 141 | + "components/StructureModelSetting.tsx": 1, |
| 142 | + "components/TaskConversationView.tsx": 2, |
| 143 | + "components/TaskLaunchDialog.tsx": 1, |
| 144 | + "components/TaskThreadCard.tsx": 2, |
| 145 | + "components/VersionPanel.tsx": 3, |
| 146 | + "components/VideoImportPanel.tsx": 1, |
| 147 | + "components/VocabManager.tsx": 2, |
| 148 | + "components/WebArticleView.tsx": 1, |
| 149 | + "components/WebImportPanel.tsx": 1, |
| 150 | + "components/WebInboxPanel.tsx": 2, |
| 151 | + "components/WeekContractCard.tsx": 3, |
| 152 | + "components/WindowSelectCard.tsx": 5, |
| 153 | + "components/action-center/ActionCenterPanel.tsx": 12, |
| 154 | + "components/notes/NotesReadingColumn.tsx": 1, |
| 155 | + "components/review/ReviewSessionPanel.tsx": 2, |
| 156 | + "components/session-detail/SessionScreenCards.tsx": 3, |
| 157 | + "pages/ChatPage.tsx": 2, |
| 158 | + "pages/GoalsPage.tsx": 3, |
| 159 | + "pages/KnowledgePage.tsx": 6, |
| 160 | + "pages/ReviewPage.tsx": 4, |
| 161 | + "pages/SessionsPage.tsx": 1, |
| 162 | + "utils/canvasElements.ts": 1, |
| 163 | +}; |
| 164 | + |
| 165 | +/** |
| 166 | + * 相对 `app/src` 的正斜杠路径 → 该文件**允许残留的字号越界处数上限**(只许降,键不许新增)。 |
| 167 | + * 这是交给**批 5/6** 的工作量底稿:映射规则 `9/10/10.5/11/11.5 → 12`(`11.5` 仅在 |
| 168 | + * `font="mono"` 时合法 —— 六档字阶的 s6 就是 11.5,仅用于数字对齐);逐文件明细见 `tmp/t16a/slice.md`。 |
| 169 | + */ |
| 170 | +export const FROZEN_FONT_OOB_BY_FILE: Readonly<Record<string, number>> = { |
| 171 | + "components/AiConversationDock.tsx": 7, |
| 172 | + "components/AiRefineCard.tsx": 1, |
| 173 | + "components/AiTaskPanel.tsx": 5, |
| 174 | + "components/AsrConfusionPanel.tsx": 4, |
| 175 | + "components/AudioLevelMeter.tsx": 3, |
| 176 | + "components/AudioPreprocSetting.tsx": 4, |
| 177 | + "components/AudioStoragePanel.tsx": 5, |
| 178 | + "components/BackupPanel.tsx": 4, |
| 179 | + "components/BoxSelectOverlay.tsx": 3, |
| 180 | + "components/CanvasNodeConcept.tsx": 3, |
| 181 | + "components/CanvasNodeModel.tsx": 3, |
| 182 | + "components/CanvasNodeQuestion.tsx": 4, |
| 183 | + "components/CaptureFloatPanel.tsx": 9, |
| 184 | + "components/ChatMessageList.tsx": 4, |
| 185 | + "components/ChatSaveNoteDialog.tsx": 1, |
| 186 | + "components/ChatSidebar.tsx": 6, |
| 187 | + "components/CitationChips.tsx": 2, |
| 188 | + "components/ClassroomBanners.tsx": 4, |
| 189 | + "components/ClassroomCapturePanel.tsx": 10, |
| 190 | + "components/ClassroomRightPane.tsx": 1, |
| 191 | + "components/ClassroomSourceColumn.tsx": 1, |
| 192 | + "components/ColumnBar.tsx": 1, |
| 193 | + "components/ConceptCardRow.tsx": 3, |
| 194 | + "components/DiscoverySuggestSection.tsx": 5, |
| 195 | + "components/EnrichPanel.tsx": 5, |
| 196 | + "components/FeatureFlagSetting.tsx": 1, |
| 197 | + "components/FeedFragmentList.tsx": 8, |
| 198 | + "components/GoalAiSection.tsx": 4, |
| 199 | + "components/GoalCard.tsx": 4, |
| 200 | + "components/GoalDetail.tsx": 18, |
| 201 | + "components/GoalPlanApprovalDialog.tsx": 6, |
| 202 | + "components/GraduateDialog.tsx": 2, |
| 203 | + "components/GroupCreateDialog.tsx": 1, |
| 204 | + "components/GroupRowContextMenu.tsx": 1, |
| 205 | + "components/GroupSidebar.tsx": 9, |
| 206 | + "components/GroupSidebarRow.tsx": 5, |
| 207 | + "components/ImageGallery.tsx": 2, |
| 208 | + "components/InterviewDialog.tsx": 3, |
| 209 | + "components/InterviewSteps.tsx": 6, |
| 210 | + "components/KnowledgeCanvasView.tsx": 6, |
| 211 | + "components/KnowledgeConceptDialog.tsx": 1, |
| 212 | + "components/KnowledgeDecisionForm.tsx": 4, |
| 213 | + "components/KnowledgeDecisionLog.tsx": 1, |
| 214 | + "components/KnowledgeDetailPanel.tsx": 3, |
| 215 | + "components/KnowledgeGraphView.tsx": 5, |
| 216 | + "components/KnowledgeLinkSection.tsx": 6, |
| 217 | + "components/KnowledgeModelDialog.tsx": 1, |
| 218 | + "components/KnowledgeSystemWizard.tsx": 3, |
| 219 | + "components/KnowledgeTreeView.tsx": 7, |
| 220 | + "components/LearningLibraryEngineSection.tsx": 2, |
| 221 | + "components/LearningLibraryPanel.tsx": 5, |
| 222 | + "components/LinkEntityPicker.tsx": 1, |
| 223 | + "components/LiveActivityPanel.tsx": 8, |
| 224 | + "components/LiveImageStrip.tsx": 6, |
| 225 | + "components/LiveProfileStrip.tsx": 8, |
| 226 | + "components/MaterialInputPanel.tsx": 3, |
| 227 | + "components/ModelCardCreateDialog.tsx": 1, |
| 228 | + "components/ModelCardFromNoteDialog.tsx": 1, |
| 229 | + "components/ModelDiskPanel.tsx": 5, |
| 230 | + "components/ModelManagementPanel.tsx": 12, |
| 231 | + "components/NoteAiDialog.tsx": 3, |
| 232 | + "components/NoteEditView.tsx": 1, |
| 233 | + "components/NoteHeaderActions.tsx": 2, |
| 234 | + "components/NoteLinkToSystem.tsx": 4, |
| 235 | + "components/NoteListBatchMenu.tsx": 1, |
| 236 | + "components/NoteListRow.tsx": 6, |
| 237 | + "components/NoteListToolbar.tsx": 4, |
| 238 | + "components/NoteMoveToGroupMenu.tsx": 2, |
| 239 | + "components/NotePreviewView.tsx": 3, |
| 240 | + "components/NoteReadingView.tsx": 7, |
| 241 | + "components/NoteRowContextMenu.tsx": 2, |
| 242 | + "components/NoteTreeSection.tsx": 3, |
| 243 | + "components/OcrDeviceSetting.tsx": 4, |
| 244 | + "components/PhotoCapturePanel.tsx": 3, |
| 245 | + "components/PracticeQuestionsOverlays.tsx": 8, |
| 246 | + "components/ProfileDetector.tsx": 12, |
| 247 | + "components/ProofreadPanel.tsx": 7, |
| 248 | + "components/ProofreadToggle.tsx": 4, |
| 249 | + "components/ReadyCheckCard.tsx": 4, |
| 250 | + "components/RefineLaunchDialog.tsx": 7, |
| 251 | + "components/RefineStrategyPicker.tsx": 10, |
| 252 | + "components/RefineWorkbench.tsx": 11, |
| 253 | + "components/RetroTimeline.tsx": 4, |
| 254 | + "components/RichEditorView.tsx": 1, |
| 255 | + "components/RouteInfoPopover.tsx": 8, |
| 256 | + "components/ScreenSelectOverlay.tsx": 1, |
| 257 | + "components/SealToggle.tsx": 2, |
| 258 | + "components/SecondPassPanel.tsx": 9, |
| 259 | + "components/SessionDetailPanel.tsx": 8, |
| 260 | + "components/SessionListBody.tsx": 1, |
| 261 | + "components/SessionListPanel.tsx": 2, |
| 262 | + "components/SessionListRow.tsx": 7, |
| 263 | + "components/SessionRowContextMenu.tsx": 2, |
| 264 | + "components/SessionSearchHits.tsx": 2, |
| 265 | + "components/SessionSelectionToolbar.tsx": 4, |
| 266 | + "components/SopRunOverlay.tsx": 7, |
| 267 | + "components/SpeakerSwitchCard.tsx": 8, |
| 268 | + "components/StructureImageSection.tsx": 3, |
| 269 | + "components/StructureModelSetting.tsx": 8, |
| 270 | + "components/SystemBadge.tsx": 1, |
| 271 | + "components/SystemStatusBadge.tsx": 2, |
| 272 | + "components/TaskConversationView.tsx": 3, |
| 273 | + "components/TaskLaunchDialog.tsx": 1, |
| 274 | + "components/TaskThreadCard.tsx": 7, |
| 275 | + "components/VersionPanel.tsx": 10, |
| 276 | + "components/VideoImportPanel.tsx": 4, |
| 277 | + "components/VocabManager.tsx": 6, |
| 278 | + "components/WebArticleView.tsx": 3, |
| 279 | + "components/WebImportPanel.tsx": 3, |
| 280 | + "components/WebInboxPanel.tsx": 4, |
| 281 | + "components/WeekContractCard.tsx": 13, |
| 282 | + "components/WindowSelectCard.tsx": 8, |
| 283 | + "components/action-center/ActionCenterPanel.tsx": 19, |
| 284 | + "components/note-selection/SelectionActionMenu.tsx": 2, |
| 285 | + "components/review/ReviewSessionPanel.tsx": 3, |
| 286 | + "components/session-detail/SessionDetailHeader.tsx": 3, |
| 287 | + "components/session-detail/SessionScreenCards.tsx": 6, |
| 288 | + "pages/ChatPage.tsx": 2, |
| 289 | + "pages/GoalsPage.tsx": 2, |
| 290 | + "pages/KnowledgePage.tsx": 14, |
| 291 | +}; |
0 commit comments