docs: record contact merge parity checkpoint
This commit is contained in:
@@ -16,12 +16,12 @@ Build GoChat as a Go backend that can directly reuse the frontend from `referenc
|
||||
|
||||
## Current Baseline
|
||||
|
||||
- Latest implementation checkpoint: `7a033e2 feat(crm): complete contact label avatar gaps`.
|
||||
- Latest implementation checkpoint: `1e3bf47 feat(crm): align contact merge action`.
|
||||
- Worktree status at this planning checkpoint: clean.
|
||||
- `go test ./...` passes.
|
||||
- Route dump succeeds with `TOTAL: 817` after contacts/companies labels, avatar, custom-attribute, and trailing-slash nested route aliases were added.
|
||||
- Route dump succeeds with `TOTAL: 818` after the Chatwoot `/actions/contact_merge` route was added.
|
||||
- Route parity artifacts now exist under `docs/parity/` and are generated by `cmd/route_parity`.
|
||||
- Tracked frontend-critical route audit covers 261 Chatwoot routes: 261 exact, 0 method-compatible, 0 parameter-compatible, 0 missing.
|
||||
- Tracked frontend-critical route audit covers 262 Chatwoot routes: 262 exact, 0 method-compatible, 0 parameter-compatible, 0 missing.
|
||||
- `/api/v1/widget` stubs are burned down and public inbox/contact/conversation/message core flows are backed by real handlers.
|
||||
- Handler test stability fixes are committed into the baseline before feature parity work continues.
|
||||
- `.codegraph/` is generated indexing output and is not part of tracked product code.
|
||||
@@ -75,19 +75,20 @@ This ledger records the committed parity checkpoints that future slices should b
|
||||
| `a465bbe feat(conversations): finish message mutation parity` | Finished the B3 mutation gap set: message delete now returns the Chatwoot deleted-message serializer and clears attachments; message status update supports `status`/`external_error` with API-inbox-only enforcement; `MessageFinder` now supports latest, `before`, `after`, and between windows; multipart `attachments[]` create attachment rows and serialize them in message payloads; team assignment returns the raw team payload. | Focused handler/service/repository tests passed; full `go test ./...` passed; `git diff --check` passed. | B3 core dashboard message flows move to review; continue with B4 contacts/companies while tracking deeper delivery/storage side effects. |
|
||||
| `3481597 feat(crm): align contact company payloads` | Started B4 contacts/companies parity: added Chatwoot-shaped `{ meta, payload }` and `{ payload }` CRM serializers, strict empty-query `422` handling, contact create `{ contact, contact_inbox }` envelope, selected custom-attribute deletion, companies nested `company` params, company contacts on `contacts.company_id`, relation search/add routes, and Rails-compatible PATCH routes. | Focused contacts/companies tests passed; handler/service/repository tests passed; route dump regenerated with `TOTAL: 809`; route parity remained `251 exact, 0 missing`; sandboxed full `go test ./...` failed on socket restrictions, escalated full `go test ./...` passed; `git diff --check` passed. | Continue B4 with merge/import/export/labels/avatar/company destroy-custom-attributes, contact/company notes payload depth, Meilisearch-backed CRM search, and frontend smoke fixtures. |
|
||||
| `7a033e2 feat(crm): complete contact label avatar gaps` | Completed the next B4 CRM route/behavior slice: added `contact_labels` persistence, Chatwoot `{ payload: labels }` contact label list/update endpoints, contact list/search label filtering via contact labels, contact/company avatar delete responses, company `destroy_custom_attributes`, and tracked trailing-slash nested route aliases. | Focused CRM tests passed; handler/service/repository/router tests passed; route dump regenerated with `TOTAL: 817`; route parity is `261 exact, 0 missing`; sandboxed full `go test ./...` failed on local socket restrictions, escalated full `go test ./...` passed; `git diff --check` passed. | Continue B4 with contact merge, import/export job/data-import behavior, contact/company notes serializer depth, Meilisearch-backed CRM search, and frontend smoke fixtures. |
|
||||
| `1e3bf47 feat(crm): align contact merge action` | Completed B4 contact merge parity for the reused dashboard action: added the exact `POST /api/v1/accounts/:account_id/actions/contact_merge` route, changed merge responses to the raw Chatwoot contact model serializer, moved conversations/contact inboxes/notes/messages from mergee to base, preserved base attributes while filling blanks from mergee, and covered legacy lowercase contact message senders. | Focused merge/CRM tests passed; handler/service/repository/router tests passed; route dump regenerated with `TOTAL: 818`; route parity is `262 exact, 0 missing`; full `go test ./...` passed; `git diff --check` passed. | Continue B4 with import/export job/data-import behavior, contact/company notes serializer depth, Meilisearch-backed CRM search, and frontend smoke fixtures. |
|
||||
|
||||
## Next Slice Contract
|
||||
|
||||
Completed implementation slice: B4 second checkpoint now covers contact/company CRUD payloads, company-contact relations, contact labels, label filtering, avatar deletion, selected custom-attribute deletion, and company destroy-custom-attributes for the dashboard CRM flows.
|
||||
Completed implementation slice: B4 contact merge checkpoint now covers contact/company CRUD payloads, company-contact relations, contact labels, label filtering, avatar deletion, selected custom-attribute deletion, company destroy-custom-attributes, and dashboard contact merge behavior for the CRM flows.
|
||||
|
||||
Next implementation slice: continue B4 with contact merge, import/export/data-import job behavior, contact/company note serializer depth, and Meilisearch-backed CRM search. Keep B3 in review for delivery/storage side-effect parity.
|
||||
Next implementation slice: continue B4 with import/export/data-import job behavior, contact/company note serializer depth, and Meilisearch-backed CRM search. Keep B3 in review for delivery/storage side-effect parity.
|
||||
|
||||
| Step | Required result | Reference source | Verification |
|
||||
| --- | --- | --- | --- |
|
||||
| N1 | Finish remaining contact/company behavior gaps: merge, import/export/data-import, and notes/conversations depth. | Chatwoot contacts and enterprise companies controllers/Jbuilder views/frontend API clients. | Handler/service tests assert status codes, persistence, and exact `{ payload }` or `{ meta, payload }` shape. |
|
||||
| N1 | Finish remaining contact/company behavior gaps: import/export/data-import and notes/conversations depth. | Chatwoot contacts and enterprise companies controllers/Jbuilder views/frontend API clients. | Handler/service tests assert status codes, persistence, and exact `{ payload }` or `{ meta, payload }` shape. |
|
||||
| N2 | Move CRM search behavior to Meilisearch-backed document shape instead of DB/LIKE as the final path. | Chatwoot search usage and local Meilisearch decision. | Search tests run against mocked Meilisearch engine and preserve CRM payload contracts. |
|
||||
| N3 | Preserve completed auth/profile/conversation/message fixtures while expanding the CRM suite. | Existing focused tests and Chatwoot frontend clients. | Existing auth/profile/conversation/message focused tests remain green. |
|
||||
| N4 | Regenerate route artifacts after route changes; current route dump is `TOTAL: 817` and tracked route parity is `261 exact, 0 missing`. | `cmd/dump_routes`, `cmd/route_parity`. | Route commands run when applicable. |
|
||||
| N4 | Regenerate route artifacts after route changes; current route dump is `TOTAL: 818` and tracked route parity is `262 exact, 0 missing`. | `cmd/dump_routes`, `cmd/route_parity`. | Route commands run when applicable. |
|
||||
| N5 | Update this tracker after every implementation checkpoint. | This document. | `git diff --check`; `go test ./...` for Go changes. |
|
||||
|
||||
Current B2 profile checkpoint:
|
||||
@@ -126,8 +127,10 @@ Current B4 contacts/companies checkpoint:
|
||||
- Added Chatwoot-compatible `PATCH /contacts/:contact_id`, `PATCH /companies/:company_id`, `GET /companies/:company_id/contacts/search`, and `POST /companies/:company_id/contacts` body-based contact assignment routes.
|
||||
- Added `contact_labels` persistence and Chatwoot-compatible `GET/POST /contacts/:contact_id/labels` responses as `{ payload: [...] }`; contact list/search/filter label params now filter contact label lists instead of conversation labels.
|
||||
- Added `DELETE /contacts/:contact_id/avatar`, `DELETE /companies/:company_id/avatar`, and `POST /companies/:company_id/destroy_custom_attributes` with Chatwoot-shaped `{ payload }` responses and `422 { error: "custom_attributes must be an array" }` validation.
|
||||
- Added trailing-slash aliases for Chatwoot nested label/contact-inbox collection routes; route dump is now `TOTAL: 817` and tracked route parity is `261 exact, 0 missing`.
|
||||
- Remaining B4 gaps: contact merge, import/export/data-import job behavior, contact/company notes payload depth, CRM Meilisearch search shape, and frontend smoke validation.
|
||||
- Added trailing-slash aliases for Chatwoot nested label/contact-inbox collection routes.
|
||||
- Added exact `POST /api/v1/accounts/:account_id/actions/contact_merge` and raw contact-model response shape for dashboard merge actions; merge moves conversations, contact inboxes, notes, and contact-sender messages to the base contact while preserving base attributes over mergee attributes.
|
||||
- Route dump is now `TOTAL: 818` and tracked route parity is `262 exact, 0 missing`.
|
||||
- Remaining B4 gaps: import/export/data-import job behavior, contact/company notes payload depth, CRM Meilisearch search shape, and frontend smoke validation.
|
||||
|
||||
Active B4 task board:
|
||||
|
||||
@@ -137,7 +140,7 @@ Active B4 task board:
|
||||
| B4.2 | Company-contact relation semantics on `contacts.company_id`. | Enterprise company contacts controller. | Done | `3481597`; relation add/list/search tests. |
|
||||
| B4.3 | Contact label list/update and label-filtered contact search. | `contacts/labels_controller.rb`, `LabelConcern`, contact frontend API. | Done | `7a033e2`; label update/list/filter tests. |
|
||||
| B4.4 | Contact/company avatar delete and company destroy-custom-attributes. | Contacts controller `avatar`; enterprise companies controller `avatar` and `destroy_custom_attributes`. | Done | `7a033e2`; avatar/custom-attribute tests. |
|
||||
| B4.5 | Contact merge behavior and response shape. | `contacts_controller.rb#merge`, merge service/jobs. | Todo | Merge preserves conversations/contact inboxes/custom attributes and returns Chatwoot payload. |
|
||||
| B4.5 | Contact merge behavior and response shape. | `actions/contact_merges_controller.rb`, `ContactMergeAction`, contact merge Jbuilder view. | Done | `1e3bf47`; merge route/handler/service tests. |
|
||||
| B4.6 | Import/export/data-import behavior. | Contacts import/export controllers, data import models/jobs. | Todo | Async request, persisted import/export records, and frontend-visible status/download behavior. |
|
||||
| B4.7 | Contact/company notes and conversations payload depth. | Nested notes/conversations controllers and Jbuilder views. | Todo | Payload fixtures match Chatwoot serializers for nested CRM views. |
|
||||
| B4.8 | CRM search through Meilisearch document shape. | Chatwoot frontend search usage and local Meilisearch engine. | Todo | Mocked Meilisearch tests cover contacts/companies and DB fallback is not the final path. |
|
||||
@@ -326,7 +329,7 @@ Current Phase 2 route findings:
|
||||
|
||||
| Type | Count | Required action |
|
||||
| --- | --- | --- |
|
||||
| Exact tracked critical routes | 261 | Keep covered while expanding audit scope. |
|
||||
| Exact tracked critical routes | 262 | Keep covered while expanding audit scope. |
|
||||
| Method-compatible update routes | 0 | First tracked batch now has exact Rails-compatible method coverage. |
|
||||
| Missing tracked critical routes | 0 | Current tracked frontend-critical route set has no route-level gaps. |
|
||||
|
||||
@@ -671,3 +674,4 @@ Verification milestone gates:
|
||||
- 2026-06-05: Started B3 dashboard conversation/message serializer parity. Conversation list/filter/show/create/update and message list/create/update/retry now return Chatwoot frontend payload shapes instead of the Go response envelope; message creation accepts frontend composer JSON/multipart fields and preserves `echo_id`/`content_attributes`; account-scoped conversation `display_id` routing is now generated and resolved. Verified focused conversation/message handler tests, full `go test ./...`, and `git diff --check`.
|
||||
- 2026-06-05: B4 contacts/companies first checkpoint committed as `3481597 feat(crm): align contact company payloads`; focused CRM tests, handler/service/repository tests, escalated full `go test ./...`, route dump `TOTAL: 809`, route parity `251 exact, 0 missing`, and `git diff --check` passed.
|
||||
- 2026-06-05: B4 contacts/companies second checkpoint committed as `7a033e2 feat(crm): complete contact label avatar gaps`; contact labels now persist through `contact_labels`, label list/update returns Chatwoot `{ payload }`, CRM contact list/search/filter labels use contact labels, contact/company avatar delete and company destroy-custom-attributes match Chatwoot response envelopes, route dump is `TOTAL: 817`, route parity is `261 exact, 0 missing`, escalated full `go test ./...` passed, and `git diff --check` passed.
|
||||
- 2026-06-05: B4 contact merge checkpoint committed as `1e3bf47 feat(crm): align contact merge action`; `/api/v1/accounts/:account_id/actions/contact_merge` now matches Chatwoot route usage, merge returns the raw contact model serializer, moves mergee conversations/contact inboxes/notes/messages to the base contact, preserves base attributes while filling blanks from mergee, route dump is `TOTAL: 818`, route parity is `262 exact, 0 missing`, full `go test ./...` passed, and `git diff --check` passed.
|
||||
|
||||
Reference in New Issue
Block a user