test(presenter)+fix(i18n): 淘汰策略与共享缓存解耦;注释里的 ASCII 引号

- prune() 抽成独立函数:全局缓存被所有用例共享,谁往里面灌 240+ 条都会顺手清掉
  别的用例刚缓存的键(实测:并行跑时 the_second_identical_refresh_... 假红)。淘汰
  策略改在本地 Cache 上测,两条判据各自确定;
- clippy -D warnings:from_ref 代替 &[x.clone()];
- model.rs 注释里的 "原因 + OS 原文" 用 ASCII 引号 → 页面字面量白名单守门报红,改
  中文引号;core/events 的三处文档失真登记为 TowerFinding(scope 外);
- 出处文案口径:TooLarge 的 detail 只留数字(presenter 不产人读文案)。
This commit is contained in:
AskaEth committed 2026-11-11 16:52:47 +08:00
1 parent 0b6b8f0a62
commit dd9962e610
11 files changed
+127 -64

No files matched your search

@@ -211,12 +211,12 @@ fn shot_cell(shot: &ScreenshotView, texts: Texts) -> Shot {
},
},
// 像素长度与宽高对不上:壳层不该拿到这种数据,但拿到了也不能画成花屏。
ScreenshotPreview::Ready(_) => {
missing(shot, texts.saves_preview_reason(ScreenshotThumbKind::Decode), stamp)
}
ScreenshotPreview::NotGenerated => {
missing(shot, texts.saves_preview_none(), stamp)
}
ScreenshotPreview::Ready(_) => missing(
shot,
texts.saves_preview_reason(ScreenshotThumbKind::Decode),
stamp,
),
ScreenshotPreview::NotGenerated => missing(shot, texts.saves_preview_none(), stamp),
ScreenshotPreview::Failed(failure) => {
missing(shot, texts.saves_preview_reason(failure.kind), stamp)
}
@@ -225,7 +225,7 @@ fn shot_cell(shot: &ScreenshotView, texts: Texts) -> Shot {
/// 「没有可画的像素」那一格:**框里说为什么**(短句),**格子下面照旧是大小与时间**。
///
/// 为什么原因不进副文案:`160px` 宽的格子里,"原因 + OS 原文"会摊成三行,把墙变得比图还吵;
/// 为什么原因不进副文案:`160px` 宽的格子里,「原因 + OS 原文」会摊成三行,把墙变得比图还吵;
/// 而 `ScreenshotThumbFailure::detail`(`9437184 > 8388608 字节` / `Access is denied.`)留在
/// DTO 里,是排障用的原文,不是给墙看的正文。D54 第 6 条要的是「逐条、结构化、不是静默」——
/// 那一句在框里,每条各说各的。