feat(ds-flow): Phase 4.2/4.3/4.5 — CJK golden 字体 + timer 泄漏修复 + 基线重生成
4.5 harness/资源修复:UpdateNotifier 初始延迟由不可取消的 Future.delayed 改为 可取消 Timer,onDispose 一并取消——修 golden 整屏挂载时 pending-timer 泄漏 (生产也受益,provider dispose 不再悬挂 timer)。 4.2 CJK 测试字体:拷生产子集 NotoSansSC-Regular-subset.otf 进 test/fonts/ + flutter_test_config 注册(family 'Noto Sans SC'),golden 中文真渲染不出豆腐块。 顺带修 tablet_pages_golden_test 既存编译错(6 语言改动遗留):localeProvider override 返回值 AppLang → 改返回 LocaleNotifier 子类 _FixedLocale(钉死语言态)。 4.3 权威 Linux 容器(ghcr.io/cirruslabs/flutter)重生成全量 golden 基线: 34 tests All passed,32 张 PNG 更新(CJK 真字 + 暖阴影 + tablet zh/en 矩阵)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@@ -20,6 +20,9 @@ Future<void> testExecutable(FutureOr<void> Function() testMain) async {
|
||||
'test/fonts/Manrope-Bold.ttf',
|
||||
]);
|
||||
await _load('JetBrains Mono', const ['test/fonts/JetBrainsMono-Regular.ttf']);
|
||||
// Noto Sans SC 子集(= 生产打包同一 client/fonts/ 子集):golden 中文用真字体渲染,
|
||||
// 不出豆腐块、与真机一致(family 须匹配 PangolinFonts.cjk = 'Noto Sans SC')。
|
||||
await _load('Noto Sans SC', const ['test/fonts/NotoSansSC-Regular-subset.otf']);
|
||||
// Lucide 图标字体(family 须带 package 前缀以匹配 PangolinIcons 的 fontPackage)。
|
||||
await _load('packages/lucide_icons/Lucide', const ['packages/lucide_icons_patched/fonts/lucide.ttf']);
|
||||
await testMain();
|
||||
|
||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 65 KiB |
@@ -91,6 +91,15 @@ class _FakeMeNotifier extends MeNotifier {
|
||||
Future<Me> build() async => _demoMe;
|
||||
}
|
||||
|
||||
// 固定语言的 locale notifier:localeProvider 是 StateNotifierProvider<LocaleNotifier,
|
||||
// AppLang>,override 须返回 LocaleNotifier(子类)。构造后直接钉死 state 为目标语言
|
||||
// (prefs 在测试态为空,父类 _load() 不会改写)。
|
||||
class _FixedLocale extends LocaleNotifier {
|
||||
_FixedLocale(AppLang lang) {
|
||||
state = lang;
|
||||
}
|
||||
}
|
||||
|
||||
const Size _ipad = Size(1180, 820); // 对齐设计源 tabapp.jsx 内屏
|
||||
|
||||
Future<void> _shoot(
|
||||
@@ -112,7 +121,7 @@ Future<void> _shoot(
|
||||
tokenStoreProvider.overrideWithValue(const _NullTokenStore()),
|
||||
vpnBridgeProvider.overrideWithValue(VpnBridgeMock()),
|
||||
navViewProvider.overrideWith((ref) => view),
|
||||
localeProvider.overrideWith((ref) => lang),
|
||||
localeProvider.overrideWith((ref) => _FixedLocale(lang)),
|
||||
nodesProvider.overrideWith(_FakeNodesNotifier.new),
|
||||
meProvider.overrideWith(_FakeMeNotifier.new),
|
||||
usageProvider((days: 30, device: null)).overrideWith((ref) async => _demoUsage),
|
||||
|
||||