mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 11:13:43 +08:00
Schema foundations for the rest of the epic. Three additions: 1. mate_conversation.archived — INT default 0. Lets a visitor "soft-close" a thread: stays on disk (history preserved, addressable, downloadable) but excluded from default /sessions listing. Pinned/archived are orthogonal; archive dominates (archived+pinned still hidden by default). 2. webchat_revoked_visitor — registry table consumed in PR 2 by the WebChatTokenRevocationService. Unique on (channel_id, visitor_id, deleted) so re-revoke is idempotent and deleted=1 un-revokes. Migration written for all three DBs (h2 IF NOT EXISTS, MySQL INFORMATION_SCHEMA guard, KingbaseES native IF NOT EXISTS) following the V147 pattern. 3. WebChatSessionView gains pinned/archived/streamStatus so the visitor- side listing surfaces the same state the admin console sees. Closes the "field exposure" gap from the epic. loadVisitorSessions gains an includeArchived flag (default false) — the default hides archived threads and excludes them from the empty-session quota, since the visitor already declared they're done with them. GET /sessions and GET /sessions/page thread an `includeArchived=true` query param through. Tests (WebChatSchemaFieldsTest, @SpringBootTest + H2 + V148): - revoked-visitor table is queryable - archived column is read/write - view exposes pinned/archived/streamStatus - archived hidden by default, visible with includeArchived=true - archived empty threads don't saturate the 5-thread quota Regression: WebChatCreateSessionTest (9/9), WebChatSessionManagementTest (5/5) — both updated for the new includeArchived param. Part of epic #355. |
||
|---|---|---|
| .. | ||
| vip/mate | ||