Files
X-Financial/document/development/通知中心状态持久化/TODO.md
2026-06-03 21:43:35 +08:00

1.5 KiB
Raw Blame History

通知中心状态持久化 TODO

  • 调研现有小铃铛通知来源、localStorage 键和单据中心已读逻辑。[CONCEPT: 背景与问题] 证据:TopBar.vueuseDocumentCenterInbox.jsdocumentCenterNewState.js 已确认。
  • 新增后端通知状态模型、Schema、Service 与 API endpoint。[CONCEPT: 方案设计] 证据:notification_states 支持按用户保存已读与隐藏状态。
  • 将通知状态接口挂载到 API v1 router并保持当前用户隔离。[CONCEPT: 功能能力] 证据:GET /notification-statesPOST /notification-states 已接入。
  • 新增前端 notificationStates 服务封装读取与批量保存。[CONCEPT: 前端] 证据:服务层统一请求 /notification-states
  • 改造 TopBar 已读、清空逻辑,优先同步服务端,保留本地降级。[CONCEPT: 前端] 证据:小铃铛点击已读、清空通知都会写入状态接口。
  • 优化通知弹窗笔记本与窄屏布局,避免条数多时挤压。[CONCEPT: 小屏幕布局] 证据弹窗限制视口高度列表滚动描述两行截断420px 下隐藏行箭头。
  • 补充后端和前端回归测试。[CONCEPT: 测试方案] 证据:server/tests/test_notification_states.pyweb/tests/sidebar-document-unread-dot.test.mjs
  • 运行容器后端定向 pytest、前端 Node 测试与前端 build。[CONCEPT: 指标与验收] 证据pytest 2 passedNode 4 passedVite build passed。