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