fix: update flow bugs wave1 (#182, #183, #184, #185) - #187
Conversation
- #182: Update self._progress in _download_asset() loop so get_progress() returns real values instead of always 0 - #183: Support i18n-reactive {key, params} message format in Toast; center title text and action buttons - #184: Auto-clear skip_version on manual check; don't pass it to UpdateChecker so user sees real update status - #185: Confirm clear-skip feature has no temporary/phase markers (doc-only — code already uses permanent wording) Closes t-20260629141836493120-40453-1 Co-Authored-By: DeepSeek <noreply@deepseek.com>
VerdictREJECTED Stage 1 - correctnessCRITICAL: Evidence
|
Review Verdict: REJECTEDReviewed HEAD: Finding F1(CRITICAL):auto-check 意外清除 skip_version檔案:
違反 建議修復: 將 def check_update(self, clear_skip: bool = False) -> str:
...
current = self._get_app_version()
if clear_skip:
self._config.set("skip_version", None)
self._config.save()
checker = UpdateChecker(current)
else:
skip = self._config.get("skip_version")
checker = UpdateChecker(current, skip_version=skip)
...Finding F2(WARNING):resolveMessage 使用 replace 而非 replaceAll檔案: text = text.replace(`{${k}}`, v);
Finding F3(WARNING):updateToast 的 message 在 download flow 中使用已解析字串檔案: Download flow 的 ✅ 通過的檢查項目
Evidence
|
Reviewer findings F1+F2: - F1 (CRITICAL): check_update() now accepts manual: bool = False. Auto-check (mount-time) respects skip_version; only manual check (user clicked button) clears skip_version. Prevents skip from being wiped on every app restart. - F2 (WARNING): Use String.replaceAll() instead of replace() in resolveMessage() to handle duplicate placeholders correctly. Co-Authored-By: DeepSeek <noreply@deepseek.com>
Review Verdict: VERIFIED ✅Reviewed HEAD: 上一輪 finding 修復驗證
變更摘要(Round 2 diff)
通過的檢查項目
Evidence
|
VerdictVERIFIED Stage 1 - correctnessThe implementer has addressed the findings. The Evidence
|
What
Fix four update-flow issues in a single batch PR:
_download_asset()never updatedself._progressskip_version— should auto-clear itHow
self._progress = pctoutside theif on_progressblock in_download_asset()soget_progress()always returns the real download percentage, regardless of whether anon_progresscallback was passedToastMessagetype to support{ key, params }object format (same pattern asToastAction.label); addedresolveMessage()helper in Toast component for render-time i18n resolution; addedtextAlign: "center"to title div andjustifyContent: "center"to button flex containercheck_update()now callsself._config.set("skip_version", None)+self._config.save()before creatingUpdateChecker(withoutskip_version), so manual check always shows real update statusScope
Follows dispatch spec exactly — 7 files, all within update flow boundaries.
Lessons
ConfigManagerhas nopop()method — usedset(key, None)instead. Caught by./deploy.sh verifyruntime log check, not by unit tests (which use MagicMock that auto-accepts any method call)./deploy.sh verify) is essential for catching API mismatches that mocks hideCloses #182
Closes #183
Closes #184
Closes #185
Build Verification
./deploy.sh verifyPASS✓ PASS: Build verification — log clean, no errors detectedTest Evidence
🤖 Generated with Claude Code