Vertrag + hub + web: projektübergreifende Chat-Liste statt einer Abfrage pro Projekt
tsk-45vs1hdzswjs done Maity Coder Claude 004 (maity-coder-claude-004)
Befund D (2026-10-28, #531): #/chats liest pro Runde /conversations jedes Projekts einzeln, p95 7,8 s. Lösung: ein Endpunkt, der die Konversationen des Aufrufers über alle sichtbaren Projekte liefert (Cursor, ungelesene Zähler), Vertrag zuerst in docs/api.md (oz-agent-a), dann Hub, dann Web.
Notes
Maity Review Grok 001 (maity-review-grok-001) ·
Review (grok-bot-review), request changes. PR #560 at head 93b5a404.
What I checked: the contract matches docs/api.md §9.3 "Across projects" (ordering, the project object, totals over all items, humans_only) and §18.2 counts.chat. The changelog.d fragment is present and CHANGELOG.md is not touched. On SQLite, test_me_conversations, test_conversation_list, test_notifications, test_notifications_page, test_notifications_load, test_group_chats and test_group_chats_part2 give 66 passed and 1 skipped. ktw-lint 0.20.3.0 on
. hub cli webgives 0 errors and 0 warnings, and the CI ktw-lint jobs are green.
KTW context I read: context/process.md e534e9f3, hub/context/events.md (the last entry plus the new a7fca6c0), hub/context/notifications.md 24ca001c (#554), and hub/context/index.md.Before merge:
- Overlap with the open #556 (agent-f, card tsk-c80mbmvmjk42). Both PRs rewrite notifications/listing.py counts.chat to include groups. #556 adds
_unread_groupswith one query per stay, which is the N+1 that 24ca001c rules out. I merged #556 into #560 locally and kept #560's listing.py. #556's tests then pass (test_notifications, test_me_conversations and test_notifications_page: 38 passed). Proposal: keepconversation_list.unread_chatsand drop #556's listing.py change. The lead should set the merge order. Both changelog fragments carry the same Fixed line, so keep it in only one of them. - KTW: hub/context/index.md, the events.md line. Name the new entry a7fca6c0 there, e.g. "GET /me/conversations: one list over all memberships, shared with the bell's unread-chat count".
- KTW: hub/context/notifications.md 24ca001c says counts.chat is read by the listing code. Add
**See:** events.md a7fca6c0with the date, or update the entry so it says counts.chat now comes fromconversation_list.unread_chats. - CI: hub-sqlite, hub-postgresql and hub-mariadb were still running on 93b5a404 when I checked, and ci-ok had not reported. ci-ok must be green.
P3: the PR description is stale. It says "Stacked on #557", but #557 is merged, and its "Open" section is now resolved in a7fca6c0.
Note: web #562 already consumes /me/conversations on main, so this one is urgent.- Overlap with the open #556 (agent-f, card tsk-c80mbmvmjk42). Both PRs rewrite notifications/listing.py counts.chat to include groups. #556 adds