本卡屬 FR-196(母卡 CM-3875(已建)),卡 P-4,第三期批 8。只改 jedi-python-package。依賴:P-3。
通知中心套件第四棒:合併。同一個人、同一件事(例如同一張任務)在設定的秒數內又來一筆且前一筆還沒讀,就不新增,改成「有 N 項更新」。Email 不合併。
extend notify_service:寫 inbox 前查一次;ITemplateRenderer.render 多收 count
repo:~/Projects/Jedicogy/module/jedi-python-package
改既有:jedi-notification-center/jedi_notification_center/app/service/notify_service.py
改既有:jedi-notification-center/jedi_notification_center/infra/repository/inbox_repo_impl.py(find_mergeable)
改既有:jedi-notification-center/jedi_notification_center/domain/ports.py(render 簽名加 count)
新開:jedi-notification-center/tests/test_merge.py
inbox_repo_impl.find_mergeable(recipient_user_id, merge_key, since) -> row|None(未讀且 created_at>=since)。notify_service:型錄 merge_window_sec 非 null 時先查;命中→merged_count+=1、created_at=now、title=render(count=merged_count);否則新列。Email 外送不受合併影響(每次都照 outbound policy)。ITemplateRenderer.render(event, params, locale, count=1);範本吃 {count}。tests:五分鐘內同任務兩次 assigned → 一列 merged_count=2;已讀後再來 → 新列;視窗外 → 新列;不同收件人各自一列
~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-196-2611-notification-center/design.md §3 決策定案、§5 詳細設計(§5.1 套件職責與 port、§5.2 資料表、§5.3 API、§5.5 前端)、§6 拆卡表本卡那列、§8 風險;討論稿(Artifact,連結在 README)只在想知道「為什麼這樣裁」時看~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-196-2611-notification-center/prototype/index.html(四個分頁:鈴鐺、通知中心、通知設定、系統橫幅;純畫面,只取結構與資訊順序;文案依 i18n 重寫)infra/task_alert/(entity/model/mapper/repo+domain/task_alert/service/task_alert_notification_domain_service.py claim/mark);排程先例 core/scheduler_update.py;SocketIO 登記 config/socketio_namespaces.py(檔頭紅線)與 handler 先例 jedi-survey app/handler/fill_survey_socketio_handler.py;橫幅先例 FE src/components/ai-quota/AiQuotaBanner.vue、掛點 src/layout/AppLayout.vue 124;iam 通知接口 common/iam_ports.py;十個寄信點行號在 design.md 表 4-1jedi-bulletin/jedi_bulletin/plugin/(contract/assembly/migrations)、jedi-notification/README.md;主系統接線 core/plugins/bulletin.py、core/plugins/_host.py::host_defaults、core/plugins/license.py::TenantAdminDirectory;寄信點 app/flow_engine/service/workflow_execution_service.py:1246、stage_entered_notify_service.py:117、app/task_alert/service/scan_alert_app_service.py:74;既有投遞紀錄表 infra/task_alert/model/task_alert_notification.py;鈴鐺 FE src/layout/AppTopbar.vue 484~540、TopbarStageQueue.vue;seed 先例 scripts/sql/2026-05-22-seed-oscal-ssp-roles.sql、2026-11-10-fr194-ui-routes-entry-gates.sqldocs/claude/domain-capabilities.md、FE docs/claude/frontend-overview.md §4。三擇一、預設不新增:reuse → extend → 確認沒有才新增。回寫列出本卡 reuse 了哪些、新增了哪些、為什麼不能 reuse。本案設計已做過重複盤點(橫幅、投遞紀錄、去重戳、個人資料頁),卡上「reuse/extend/new」是結論,照它做。