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 相关修改
This commit is contained in:
2026-07-09 14:53:27 +08:00
parent 805402f938
commit 0dabb8cfa5
136 changed files with 1240 additions and 14484 deletions
@@ -101,7 +101,7 @@ import { useBranding } from 'shared/composables/useBranding';
// eslint-disable-next-line vue/define-macros-order
const props = defineProps({
id: { type: Number, required: true },
id: { type: [Number, String], required: true },
messageType: {
type: Number,
required: true,
@@ -22,7 +22,7 @@ const props = defineProps({
required: true,
},
firstUnreadId: {
type: Number,
type: [Number, String],
default: null,
},
isAnEmailChannel: {
@@ -236,7 +236,7 @@ const conversationListPagination = computed(() => {
activeAssigneeTabCount.value < conversationsPerPage &&
activeAssigneeTabCount.value > chatsOnView.value.length;
if (isNoFiltersOrFoldersAndChatListNotEmpty && isUnderPerPage) {
if (isNoFiltersOrFoldersAndChatListNotEmpty && isUnderPerPage && !hasCurrentPageEndReached.value) {
return 1;
}
@@ -548,6 +548,9 @@ function onToggleAdvanceFiltersModal() {
}
function fetchConversations() {
if (chatListLoading.value) {
return;
}
store.dispatch('updateChatListFilters', conversationFilters.value);
store.dispatch('fetchAllConversations').then(emitConversationLoaded);
}
@@ -855,11 +858,7 @@ watch(chatLists, () => {
chatsOnView.value = conversationList.value;
});
watch(conversationFilters, (newVal, oldVal) => {
if (newVal !== oldVal) {
store.dispatch('updateChatListFilters', newVal);
}
});
// conversationFilters synced before each fetch in fetchConversations() — no separate watcher needed
</script>
<template>
@@ -58,6 +58,7 @@ export const getCustomFields = ({ standardFields, customAttributes }) => {
};
export const getFormattedPreChatFields = ({ preChatFields }) => {
if (!preChatFields) return [];
return preChatFields.map(item => {
return {
...item,
@@ -77,7 +78,10 @@ export const getPreChatFields = ({
preChatFormOptions = {},
customAttributes = [],
}) => {
const { pre_chat_message, pre_chat_fields } = preChatFormOptions;
// preChatFormOptions can be null when the inbox has no pre-chat form configured.
// Default parameters only apply for undefined, not null.
const options = preChatFormOptions || {};
const { pre_chat_message, pre_chat_fields } = options;
let customFields = {};
let preChatFields = {};
@@ -43,10 +43,10 @@ const actions = {
}
},
fetchAllConversations: async ({ commit, state, dispatch }) => {
fetchAllConversations: async ({ commit, state, dispatch }, explicitFilters) => {
commit(types.SET_LIST_LOADING_STATUS);
try {
const params = state.conversationFilters;
const params = explicitFilters || state.conversationFilters;
const {
data: { data },
} = await ConversationApi.get(params);
@@ -1,4 +1,5 @@
import { createConsumer } from '@rails/actioncable';
import Cookies from 'js-cookie';
const PRESENCE_INTERVAL = 20000;
const RECONNECT_INTERVAL = 1000;
@@ -12,7 +13,24 @@ class BaseActionCableConnector {
websocketHost = '',
presenceInterval = PRESENCE_INTERVAL
) {
const websocketURL = websocketHost ? `${websocketHost}/cable` : undefined;
// Read access-token for WebSocket auth from cookie
let accessToken = '';
try {
const raw = Cookies.get('cw_d_session_info');
if (raw) {
const parsed = JSON.parse(raw);
accessToken = parsed['access-token'] || '';
}
} catch (e) {
// Ignore cookie parse errors
}
// Default to the page origin so the URL is never undefined.
const wsOrigin = websocketHost || window.location.origin;
let websocketURL = `${wsOrigin}/cable`;
if (accessToken) {
websocketURL += `?access-token=${encodeURIComponent(accessToken)}`;
}
this.consumer = createConsumer(websocketURL);
this.subscription = this.consumer.subscriptions.create(