V0.2.9 评审:FAILED 状态闭环 + Discarding/P2-2/P3-1 + release v0.2.10 - #14
Merged
Conversation
P1-1 FAILED 状态没有 UI 出口且失败原因不入库: - DAO 新增 markFailedIf(带 expected state + 持久化 error); - Repository.markFailed 改用 markFailedIf,error 真正写入 recognition_sessions.error; - 新增 beginClearingFailed(FAILED -> DISCARDING CAS),供用户显式清理; - RecognitionUiState.Failed 改为携带 session(含 imageUri); - ViewModel.clearFailed():删自有图片 + markDiscarded + delete session; - launchRecognition 在 Failed 状态拒绝新识别("请先清除上次失败的识别任务"), 避免旧图片泄漏; - discardPending 失败改 markFailed(不再 revertToAwaiting,语义更准确); - UI 新增 FailedSessionCard(errorContainer 配色 + "清除本次任务"按钮), MainScreen 在 Failed 状态展示。 P2-1 Discarding 期间确认对话框仍可交互: - pendingSession 不再把 Discarding 纳入(只 Awaiting/Saving 显示确认框); - dismissEnabled 从 !isSaving 扩展为 !isTerminalizing(Saving || Discarding)。 P2-2 setRecognized 返回值被忽略: - processRecognition 检查返回值,false 时 markFailed + Toast,不卡 Recognizing。 P3-1 测试 GlobalScope 泄漏: - 删除 activateStateCollection()(uiState 已是 Eagerly,无需手动订阅); - 新增 3 个测试:startup_recognizing_becomes_Failed / setRecognized_false_marks_Failed / clear_failed_deletes_image_and_returns_Ready; - FakeSessions 支持 initial / failSetRecognized,markFailed/revertToAwaiting 真实模拟。 参考:V0.2.9_CODE_ISSUES_REPORT.md P1-1/P2-1/P2-2/P3-1 Co-Authored-By: Claude <noreply@anthropic.com>
- 收录 V0.2.9_CODE_ISSUES_REPORT.md; - README 测试数 44 -> 47; - versionCode=30 / versionName=0.2.10-debug。 Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
P1-1 FAILED 状态 UI 出口 + error 入库 + clearFailed;P2-1 Discarding 对话框禁用;P2-2 setRecognized 返回值检查;P3-1 删 GlobalScope + 3 个新测试。47 测试全过。详见 commit。