Commit Graph
339 Commits
Author SHA1 Message Date
Rogee 9816848ca2 fix: Web Widget SDK + Auto-Reply AgentBot sender + LLM 真实模型对接
## 核心修复

### 1. Auto-Reply Sender 修复(所有渠道)
- AutoReplyListener.sendAutoReply() 通过 botInboxRepo 查询 inbox 关联的 AgentBot
- 使用正确的 SenderType="AgentBot"(非小写 agent_bot)传递真实 AgentBot ID
- bootstrap 注入 agentBotInboxRepo/agentBotRepo 依赖

### 2. 事件数据 BUG 修复(影响所有 Webhook 渠道)
- incoming_persister.dispatch(): 补全 sender_type/content 到 event.Data
- channel/webhook.go: HandleWebhook 同步分发也补全 sender_type/content
- 未补全前 AutoReplyListener 找不到字段直接跳过

### 3. Web Widget SDK 生产验证修复
- cookie → localStorage token 同步(frontend/index.html)
- 路由双注册修复(router.go)
- Vite SPA 模式 + /widget 重写(vite.config.ts)
- WidgetService 注入 Dispatcher 触发事件分发

### 4. LLM 真实模型对接
- 配置 deepseek-v4-flash @ http://10.58.144.6:2014/v1
- LLM-mode auto-reply 规则创建并验证通过
- Prompt 文档落地: docs/captain-ai-auto-replay-prompt.md

### 5. 新增基础设施
- Helm chart (deploy/helm/)
- Widget SDK 生产测试页面
- QA 报告

Closes: BUG-W2 (auth sync), BUG-W3 (route double-reg),
       BUG-WEBHOOK-EVENT (missing event data fields)
2026-07-28 14:03:19 +08:00
Rogee 1c6b8c661c fix: 文件上传Metadata jsonb BUG + search config + fake:ai provider + QA报告
修复:
- message_service.go: 附件Metadata零值字符串''→'{}'(PG jsonb列报错)
- config.dev.yaml/config.development.yaml: search.engine改为db
  (避免依赖未运行的MeiliSearch导致搜索500)

新增:
- fake_provider.go: Captain/AI fake LLM Provider
- test-captain-llm-provider.sh: 测试脚本
- QA测试报告: 93项CDP功能点覆盖验证

文档:
- CDP_TESTING_HANDOFF.md: 进度更新(89%->92%->95%)
- 报告: 11.846~11.897 完整测试日志
2026-07-27 22:01:28 +08:00
rogee 5c604c116e chore: commit all QA artifacts 2026-07-27 15:50:18 +08:00
rogee c3806b701a feat(parity): align Chatwoot 4.15.1 contracts 2026-07-14 12:11:52 +08:00
rogee d16bb55d91 feat(realtime): complete fake channel reply flow 2026-07-13 14:57:28 +08:00
rogee a712b91982 fix(copilot): harden provider configuration flow 2026-07-13 14:57:28 +08:00
rogee 8b9eedc0e2 feat(copilot): finish configuration center 2026-07-13 14:57:28 +08:00
rogee 0a69d80f7c feat(copilot): complete runtime provider configuration 2026-07-13 14:57:28 +08:00
rogee 6b42853c0b update doc 2026-07-13 10:47:58 +08:00
rogee df23caf7d9 feat(copilot): move provider configuration to settings 2026-07-12 22:27:29 +08:00
rogee 32d3329d1b docs(copilot): define global configuration 2026-07-12 22:16:56 +08:00
rogee d2cb6bbbc6 update cdp test round 6 2026-07-10 17:56:36 +08:00
rogee 9c852cd99b add fake channel 2026-07-09 18:14:45 +08:00
rogee 8fed449b95 add plan 2026-07-09 15:43:15 +08:00
rogee 0dabb8cfa5 docs: 整理文档目录结构 — 清理过时文档、归集功能子目录、统一命名规范
清理:
- 删除 34 份过时文档(gap reports/QA临时报告/验收报告/阶段性文档)
- 删除 docs/.hermes/skills 第三方 skills 副本(16 文件)
- 删除 skills-lock.json

目录归集:
- 根目录仅保留 README.md 索引
- product/ — 产品与架构设计(PRD + ARCHITECTURE + P2设计文档 + AI/企业路线图)
- tracking/ — Chatwoot parity 开发跟踪
- requirements/ — M01-M12 模块需求
- plans/ — 历史实现计划
- parity/ — 路由 parity 与前端契约
- qa/ — QA 报告与测试计划
- ops/ — 运维部署

命名规范:
- 全小写 kebab-case,禁止全大写文件名
- product/tracking/ops 用 NN- 序号前缀
- requirements 用 MNN- 两位零填充模块号
- plans/qa 用 YYYY-MM-DD- 日期前缀
- requirements M1-M9 零填充为 M01-M09(修复字典序)

同步更新:
- backend/cmd/route_parity/main.go 路径默认值
- backend/scripts/parity_frontend_smoke.sh 报告路径
- 所有 docs 内部交叉引用
- .gitignore 排除编译产物 (backend/gochat, backend/route_parity)
- 新增迁移 000052/000053
- 前端 WS 相关修改
2026-07-09 14:53:27 +08:00
rogee 805402f938 qa 2026-07-09 13:59:31 +08:00
rogee e8d1876478 Fix sidebar missing Bots/Campaigns: add all feature flags to seed data
The seed data only enabled 16 of 37 feature flags used by the frontend.
Two missing flags caused sidebar navigation bugs found during QA:

- agent_bots: the '机器人' settings link was hidden (isAllowed=false)
- campaigns: the '活动' (Campaigns) parent had no accessible children,
  so clicking it did nothing instead of expanding to show sub-items

Add all 37 feature flags from FEATURE_FLAGS to the smoke seed data so
every sidebar menu item is visible and navigable.

Also includes QA test report for the full-page CDP testing session.
2026-07-08 15:11:11 +08:00
rogee a1ae852eb2 Fix widget i18n missing locale files and clean up unused locales
- widget/i18n/index.js: only import en.json and zh_CN.json (the only
  locale files present); remove 40+ imports for missing locale JSONs
  that caused Vite compile failure and global white screen
- dashboard/i18n/index.js: remove unused locale imports for consistency
- Remove 62 unused locale JSON files from widget/i18n/locale/
- Minor: update index.html, test helpers, e2e test, languages spec
2026-07-08 09:57:00 +08:00
rogee aeddedf2a3 Reorganize repo: backend/, deploy/, docs/ layout + AGENTS.md
Restructure the monorepo into clear top-level directories:
- backend/: Go module root (cmd, internal, pkg, configs, migrations,
  docs/swagger, scripts, tests, go.mod, Makefile, .air.toml)
- deploy/: Docker (Dockerfile, docker-compose*), quickstart, fluentd
- docs/: project documentation + reports/ (moved from repo root)
- AGENTS.md: new AI coding-agent guide at repo root

Update all references to the new layout:
- Dockerfile: COPY backend/go.mod, COPY backend/ (context = repo root)
- docker-compose files: context ../.., dockerfile deploy/docker/Dockerfile,
  env_file ../../.env, volume mounts ../../backend:/app
- deploy/quickstart/compose.yaml: dockerfile deploy/docker/Dockerfile
- CI: working-directory: backend for go commands, file deploy/docker/Dockerfile,
  coverage path backend/coverage.out, health_check backend/scripts/
- backend/Makefile: docker target uses -f ../deploy/docker/Dockerfile ../
- README: architecture tree, quickstart, config paths updated

Move root stray scripts (rename_models.*, run_m11_tests.sh, verify_build.sh,
gorm_bool_main.go) to backend/scripts/legacy/. All moves via git mv to
preserve history. Build, vet, SQLite tests, and docker compose config verified.
2026-07-07 14:44:12 +08:00
rogee d884fdda0a Align GoChat with Chatwoot frontend contracts 2026-06-13 22:13:32 +08:00
rogee 71abf58636 docs: update Chatwoot parity alignment review 2026-06-11 09:57:09 +08:00
rogee 2bb54b21a5 1:1 2026-06-10 07:24:13 +08:00
rogee ac7f351308 update 2026-06-09 18:03:16 +08:00
rogee f45fbfd5f0 feat(captain): secure custom tool auth config 2026-06-07 16:32:13 +08:00
rogee 8f9adecd04 feat(captain): validate custom tools 2026-06-07 16:20:39 +08:00
rogee dd7bcf4118 feat(captain): align custom tool limits 2026-06-07 16:06:19 +08:00
rogee 0d8de3be0b feat(captain): gate custom tools 2026-06-07 15:50:23 +08:00
rogee 0aff792b40 feat(search): index csat surveys 2026-06-07 15:36:51 +08:00
rogee 8eabadc3fc feat(search): index provider webhooks 2026-06-07 15:23:29 +08:00
rogee 28e7205410 feat(search): index message delivery 2026-06-07 15:11:42 +08:00
rogee 730481c99d feat(search): index automation actions 2026-06-07 15:01:49 +08:00
rogee 140b17ed72 feat(search): index conversation maintenance 2026-06-07 14:40:13 +08:00
rogee 4ba1e6e847 feat(search): index conversation bulk actions 2026-06-07 14:29:39 +08:00
rogee af624f7728 feat(search): index contact labels 2026-06-07 14:19:38 +08:00
rogee 74249d5bf5 feat(crm): queue contact bulk actions 2026-06-07 14:03:48 +08:00
rogee 64f36ad642 feat(enterprise): align account limits API 2026-06-07 13:46:17 +08:00
rogee c28eb010c6 fix(webhooks): replace parity stubs 2026-06-07 13:18:25 +08:00
rogee 7ea4bf9362 fix(routes): align whatsapp call ids 2026-06-07 13:04:27 +08:00
rogee 5062acec61 fix(routes): align dashboard app ids 2026-06-07 12:39:23 +08:00
rogee 27f927327d feat(conversations): align destroy job 2026-06-07 12:26:48 +08:00
rogee bec65a86e4 feat(conversations): align transcript delivery 2026-06-07 12:08:53 +08:00
rogee 83878eb606 feat(conversations): align typing events 2026-06-07 11:43:59 +08:00
rogee 5ae2d7fec9 feat(conversations): align last seen reads 2026-06-07 11:33:08 +08:00
rogee 6b6289f896 feat(conversations): align mute semantics 2026-06-07 11:20:12 +08:00
rogee 148201905a feat(conversations): align toggle priority fallback 2026-06-07 11:04:40 +08:00
rogee e6c9660659 feat(conversations): align toggle status fallback 2026-06-07 10:56:29 +08:00
rogee f7515b111d feat(automation): align attachment uploads 2026-06-07 10:44:45 +08:00
rogee f46bce7528 docs: land parity tracking handoff 2026-06-07 10:27:56 +08:00
rogee 168f12070e feat(macros): align attachment uploads 2026-06-07 10:22:36 +08:00
rogee 023ab10b31 fix(search): align search filters 2026-06-07 10:01:02 +08:00