From e99330a06f0d478b716b6cf7786e1d3dfdd899dd Mon Sep 17 00:00:00 2001 From: Rogee Date: Sun, 7 Jun 2026 08:56:13 +0800 Subject: [PATCH] docs: reconcile parity tracker --- docs/CHATWOOT_PARITY_DEVELOPMENT_PLAN.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/CHATWOOT_PARITY_DEVELOPMENT_PLAN.md b/docs/CHATWOOT_PARITY_DEVELOPMENT_PLAN.md index 42b7472c..af6c0088 100644 --- a/docs/CHATWOOT_PARITY_DEVELOPMENT_PLAN.md +++ b/docs/CHATWOOT_PARITY_DEVELOPMENT_PLAN.md @@ -49,9 +49,9 @@ Hermes task landing checklist: ## Current Baseline -- Current tracking checkpoint: 2026-06-07 P3.85 search conversation payload parity, prepared as `feat(search): align conversation result payloads`. -- Latest implementation checkpoint: this checkpoint, prepared as `feat(search): align conversation result payloads`. -- Latest documentation/tooling checkpoint: this tracker update records Chatwoot search conversation Jbuilder payload parity. No route artifacts change. +- Current tracking checkpoint: 2026-06-07 tracker reconciliation, prepared as `docs: reconcile parity tracker`. +- Latest implementation checkpoint: `0b47066 feat(search): align conversation result payloads` closes P3.85 search conversation payload parity. +- Latest documentation/tooling checkpoint: this tracker update reconciles stale next-slice wording, adds the P3.84/P3.85 commit ledger rows, and keeps the executable queue pointed at Phase 2/3 drift audit, Phase 6 placeholder audit, or B12 live smoke. No route artifacts change. - Plan landing status: complete for the current known Hermes plans and user-confirmed scope. Future work should update this file directly instead of opening a parallel tracker. - Worktree status at this implementation checkpoint: SearchAPI conversation results now include Chatwoot-compatible nested `message`, `contact`, `inbox`, `agent`, and `additional_attributes` payloads from DB fallback and Meilisearch documents, while retaining P3.84 agent-sender filter parity, P3.83 conversation ordering, P3.82 contact-conversation reindex fanout, P3.81 conversation identity search, P3.80 search time-bound parity, P3.79 advanced-search feature gates, P3.78 message recency, P3.77 current-user inbox access, and prior checkpoints. Live API/browser/enterprise smoke still needs the full PostgreSQL/Redis/Meilisearch/GoChat/Vite/Chrome stack. - Next executable implementation checkpoint: continue Phase 2/3 drift audit for the next reused-frontend mismatch, or run B12 live smoke when the full PostgreSQL/Redis/Meilisearch/GoChat/Vite/Chrome stack is available. Re-run Phase 6 placeholder audit after future route/smoke changes. @@ -358,6 +358,8 @@ This ledger records the committed parity checkpoints that future slices should b | Commit | Scope | Verification summary | Follow-up state | | --- | --- | --- | --- | +| `feat(search): align conversation result payloads` | Advances P3.85 with Chatwoot search conversation-result payload parity. SearchAPI conversation hits now expose nested `message`, `contact`, `inbox`, `agent`, and `additional_attributes` data from both DB fallback rows and Meilisearch documents, and the indexing/reindexing paths preload the display relations needed by the reused frontend cards. | Focused SearchHandler, SearchRepo, and document-builder tests passed; full `go test ./...` passed outside the restricted socket sandbox; `git diff --check` passed. No route artifacts change. | Move P3.85 to Review; continue Phase 2/3 drift audit, Phase 6 placeholder audit, or B12 live smoke. | +| `feat(search): align agent sender filters` | Advances P3.84 with Chatwoot SearchAPI sender filter parity. The reused frontend `from=agent:id` filter now matches locally persisted agent/user sender variants in DB fallback and Meilisearch filters, while contact and bot sender filters tolerate Rails/local casing drift. | Focused SearchFilter, Meilisearch engine, and SearchRepo sender-filter tests passed; full `go test ./...` passed outside the restricted socket sandbox; `git diff --check` passed. No route artifacts change. | Move P3.84 to Review; continue search payload smoke or the next Phase 2/3 drift slice. | | `feat(search): align conversation search order` | Advances P3.83 with Chatwoot `SearchService#filter_conversations` ordering parity. DB fallback conversation search now defaults to `conversations.created_at DESC` with deterministic `id DESC`, instead of reusing the normal conversation list `last_activity_at` ordering. | `go test ./internal/repository -run 'TestSearchRepo_SearchConversations_DefaultOrderUsesCreatedAt\|TestSearchRepo_SearchConversations_(DisplayAndContactMatch\|DoesNotMatchLabelsOrMessages)' -count=1`; full `go test ./...` passed outside the restricted socket sandbox after retrying an unrelated `internal/worker` SQLite in-memory flake; `git diff --check` passed. No route artifacts change. | Move P3.83 to Review; continue Phase 2/3 drift audit, Phase 6 placeholder audit, or B12 live smoke. | | `feat(search): reindex contact conversations` | Advances P3.82 with Meilisearch freshness for P3.81 conversation identity search. Contact indexing now also reloads and indexes related account-scoped conversations with contact data preloaded, so contact identity changes made through direct updates or import merges refresh conversation search documents. | `go test ./internal/service -run 'TestContactService_SearchIndexHooks(ReindexContactConversations)?' -count=1`; full `go test ./...` passed outside the restricted socket sandbox; `git diff --check` passed. No route artifacts change. | Move P3.82 to Review; continue Phase 2/3 drift audit, Phase 6 placeholder audit, or B12 live smoke. | | `feat(search): align conversation identity search` | Advances P3.81 with Chatwoot `SearchService#filter_conversations` parity. Conversation search now matches `display_id` and contact identity fields (`name`, `email`, `phone_number`, `identifier`) instead of local labels/message-content text; Meilisearch conversation documents index the same display/contact identity text, and durable/full reindex paths preload contacts before creating conversation documents. | `go test ./internal/search ./internal/repository ./internal/service ./cmd/reindex_search -run 'TestDocumentBuildersSetStableUIDAndType\|TestSearchRepo_SearchConversations_(DisplayAndContactMatch\|DoesNotMatchLabelsOrMessages)\|TestDurableSearchIndexerPreloadsConversationContact\|TestNewSearchEngine_DefaultsToMeilisearch' -count=1`; full `go test ./...` passed outside the restricted socket sandbox; `git diff --check` passed. No route artifacts change. | Move P3.81 to Review; continue Phase 2/3 drift audit, Phase 6 placeholder audit, or B12 live smoke. | @@ -606,9 +608,9 @@ This ledger records the committed parity checkpoints that future slices should b ## Next Slice Contract -Committed implementation baseline: `21421c6 feat(profile): align mfa payloads` closes the current P3.39 profile/profile-MFA route and payload slice for the inspected `reference/chatwoot` frontend paths. +Committed implementation baseline: `0b47066 feat(search): align conversation result payloads` closes P3.85 SearchAPI conversation payload parity for the inspected `reference/chatwoot` search controller, Jbuilder views, and reused dashboard search result cards. -Completed documentation slice: this checkpoint makes the plan self-contained for follow-up work. The user-confirmed scope, Hermes source-plan landing map, active route/search/enterprise contracts, current route-parity numbers, next executable queue, commit ledger, and progress log are all represented in this document. +Completed documentation slice: this checkpoint keeps the plan self-contained for follow-up work. The user-confirmed scope, Hermes source-plan landing map, active route/search/enterprise contracts, current route-parity numbers, next executable queue, P3.84/P3.85 commit ledger rows, and progress log are all represented in this document. Next implementation slice: do not start from older Hermes TODOs directly. Continue with one of these evidence-backed paths: Phase 2/3 route/controller/serializer drift audit, Phase 6 placeholder audit, or B12 live smoke when the full PostgreSQL/Redis/Meilisearch/GoChat/Vite/Chrome stack is available. Every discovered failure becomes a named row in the Active Remaining Work Board before implementation. @@ -2717,3 +2719,4 @@ Verification milestone gates: - 2026-06-07: P3.83 search conversation ordering checkpoint prepared as `feat(search): align conversation search order`; audited Chatwoot `SearchService#filter_conversations` ordering. GoChat DB fallback conversation search now orders by `conversations.created_at DESC, conversations.id DESC` instead of the local conversation-list `last_activity_at` default, while Meilisearch already emits `created_at_ts:desc` for default search sort. Focused SearchRepo ordering tests passed; full `go test ./...` passed outside the restricted socket sandbox after retrying an unrelated `internal/worker` SQLite in-memory flake; `git diff --check` passed. No route artifacts change. - 2026-06-07: P3.84 search agent-sender filter checkpoint prepared as `feat(search): align agent sender filters`; audited Chatwoot `SearchService#parse_from_param`, `#apply_sender_filter`, and reused `SearchContactAgentSelector.vue`/SearchAPI message filter callers. GoChat DB fallback and Meilisearch message filters now treat `from=agent:id` as agent/user sender aliases (`agent`, `user`, `User`) and tolerate contact/bot casing aliases, so reused frontend agent filters find locally stored outgoing agent messages. Focused SearchFilter, Meilisearch engine, and SearchRepo sender-filter tests passed; full `go test ./...` passed outside the restricted socket sandbox; `git diff --check` passed. No route artifacts change. - 2026-06-07: P3.85 search conversation payload checkpoint prepared as `feat(search): align conversation result payloads`; audited Chatwoot search `conversations.json.jbuilder`, `_conversation_search_result`, `_message`, `_contact`, `_inbox`, `_agent`, and reused `SearchResultConversationsList.vue`. GoChat SearchAPI conversation results now include nested `message`, `contact`, `inbox`, `agent`, and `additional_attributes` payloads for DB fallback and Meilisearch hits; DB search, durable indexing, contact fanout reindexing, and `cmd/reindex_search` now preload the display relations needed to build those documents. Focused SearchHandler, SearchRepo, and document-builder tests passed; full `go test ./...` passed outside the restricted socket sandbox; `git diff --check` passed. No route artifacts change. +- 2026-06-07: Documentation checkpoint prepared as `docs: reconcile parity tracker`; current baseline now points at `0b47066 feat(search): align conversation result payloads`, the stale P3.39 next-slice wording is replaced, and the Commit Ledger now includes P3.84/P3.85 so the plan can be followed from this document without reading older Hermes notes. Verification for this docs-only checkpoint: `git diff --check`; no Go code or route artifacts changed.