From 131f0c4e06b51f21d3de971a34c08513be5c65b4 Mon Sep 17 00:00:00 2001 From: Zhou Weidong <502333560@qq.com> Date: Mon, 19 Oct 2026 10:01:18 +0800 Subject: [PATCH] =?UTF-8?q?docs(plans):=20=E8=AE=B0=E5=BD=95=20K19=20?= =?UTF-8?q?=E7=BD=91=E7=BB=9C=E6=96=87=E6=A1=88=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/plans/PROGRESS.md | 97 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/docs/plans/PROGRESS.md b/docs/plans/PROGRESS.md index a04625d..a7f6abd 100644 --- a/docs/plans/PROGRESS.md +++ b/docs/plans/PROGRESS.md @@ -2202,6 +2202,103 @@ $ flutter test --- +## 35. K19 非 ApiException 网络文案修复 + +### 35.1 缺陷与修复 + +Trae 复核发现,账号中心三个逻辑类在断网、超时等非 `ApiException` +失败时,把内部哨兵键直接交给 `errorText`,会原样上屏: + +```text +accountProfileLoadFailed +accountProfileSaveFailed +accountDevicesLoadFailed +accountExportLoadFailed +``` + +修复严格沿用既有 `errorText` 约定: + +- 非 `ApiException` 统一置 `networkError`; +- `ApiException.message` 继续原样透传; +- 未修改 `errorText` 映射表; +- 未修改既有测试断言。 + +修改位置: + +```text +ReelShort/lib/pages/account/account_profile_logic.dart +ReelShort/lib/pages/account/account_devices_logic.dart +ReelShort/lib/pages/account/account_export_logic.dart +``` + +### 35.2 TDD 与定向测试 + +先给 `FakeAccountRepository` 增加通用异常开关,并新增四个页面测试。 +修复前红灯: + +```text +00:01 +4 -4: Some tests failed. + +should_show_localized_network_copy_when_profile_load_fails +should_show_localized_network_copy_when_profile_save_fails +should_show_localized_network_copy_when_devices_fail +should_show_localized_network_copy_when_export_fails +``` + +修复后定向测试: + +```text +$ flutter test test/account/account_pages_test.dart +00:01 +8: All tests passed! +``` + +四个用例分别使用中文、英文、印尼语当前语言环境,断言上屏 +`l10n.networkError`,且不出现内部哨兵键。 + +### 35.3 最终门禁 + +```text +$ dart analyze lib test +Analyzing lib, test... +No issues found! +``` + +```text +$ flutter test +00:23 +339: All tests passed! +``` + +```text +$ flutter build apk --debug +Running Gradle task 'assembleDebug'... 7.2s +✓ Built build/app/outputs/flutter-apk/app-debug.apk +``` + +### 35.4 Git + +```text +27ab7ce fix(account): 本地化网络异常文案 +42ce1d1 fix(account): 合并网络异常文案修复 +9b3ab9d..42ce1d1 develop -> develop +``` + +提交 author/committer 均为 `Zhou Weidong <502333560@qq.com>`。 + +### 35.5 用户验证建议 + +设备侧取证由用户执行: + +1. 登录后断开手机网络,打开「个人资料」。 + 预期:显示当前语言的网络异常文案,不出现 `accountProfileLoadFailed`。 +2. 恢复网络后修改昵称,再断网保存。 + 预期:显示当前语言的网络异常文案,不出现 `accountProfileSaveFailed`。 +3. 断网打开「登录设备」。 + 预期:显示当前语言的网络异常文案,不出现 `accountDevicesLoadFailed`。 +4. 断网打开「数据导出」。 + 预期:显示当前语言的网络异常文案,不出现 `accountExportLoadFailed`。 + +--- + ## 34. K19 客户端账号中心 ### 34.1 基线与实施范围