feat: 调整通知中心语义和徽标计数#284
Conversation
PR AI Review / PR AI 语义预检中文
PR 将通知中心拆分为语义分区(后台异常、待确认动作、已过期建议、澄清请求、卡片更新),引入 primaryBadgeCount 将卡片详情更新排除在主徽标之外,并为已过期的日程建议增加 past_due 状态和弱化 UI。变更范围合理,遵循现有架构模式,测试覆盖充分。 影响范围
黄金链路
风险项
测试缺口
English
PR restructures the action center into semantic sections (background issues, pending actions, past-due suggestions, clarifications, card updates), introduces primaryBadgeCount to exclude informational card updates from the main badge, and adds past_due status with de-emphasized UI for expired calendar suggestions. Changes are well-scoped, follow existing architecture patterns, and have solid test coverage. Affected Areas
Golden Path
Findings
Test Gaps
|
PR Preflight Summary / PR 预检汇总中文
English
PR Policy Preflight / PR 规则预检PR Policy Preflight / PR 规则预检中文
未发现确定性规则问题。 English
No deterministic policy findings. PR Flutter Quality / Flutter 质量预检PR Flutter Quality / Flutter 质量预检中文
English
Flutter Analyzer Baseline
No new analyzer issues introduced by this PR. Flutter Test Baseline
No new Flutter test failures introduced by this PR. |
whbzju
left a comment
There was a problem hiding this comment.
Reviewed the Action Center semantics changes. The overall direction makes sense, but I think these should be addressed before merge:
-
[P2]
past_duecan block future device-action resync.SystemActionServiceintroduces the newpast_duestatus, butScheduleStateService._maintainDeviceActionstill treats any non-pendingexisting device action as historical and returns early. If a future schedule item expires and gets markedpast_due, then the user/agent later updates that schedule item to a new future time,_maintainDeviceActionwill keep the oldpast_dueaction instead of clearing/recreating a confirmable device action. Please treatpast_dueas rebuildable/clearable, not the same ascompleted/dismissed/rejected. Relevant paths:lib/data/services/system_action_service.dart,lib/data/services/schedule_state_service.dart. -
[P2] Expired reminders are still strong badge items. The UI copy says future calendar and reminder suggestions need confirmation, but
markPastCalendarActionsPastDue()only scansactionType == calendar.actionReviewDeadline()already knows how to parse reminderdue_date, so expired reminders remainpending, continue to count toward the primary badge, and stay under “Actions to confirm.” Either include reminders in the past-due transition or narrow the copy/tests to make it explicit that only calendar suggestions are softened. Relevant path:lib/data/services/system_action_service.dart. -
[P3] All-day calendar suggestions can be moved out of pending too early.
actionReviewDeadline()usesend_time ?? start_timefor calendar actions and does not account forall_day. For an all-day event with only a date/start time, this can mark the suggestionpast_dueafter midnight even though the user may still reasonably add it during that day. Please use the all-day end-of-day boundary, or require/use an explicitend_timefor all-day actions. Relevant path:lib/data/services/system_action_service.dart.
I did not see whitespace issues in git diff --check origin/main...origin/pr/284.
摘要
验证
Closes #280