Skip to content

docs(service): cases 升级整节与 index 生命周期第 2 步按 flow / hook 写实(#914、#915) - #922

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-914-915-service-copies
Aug 6, 2026
Merged

yinlianghui merged 1 commit into
mainfrom
claude/issue-914-915-service-copies

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes #914
Fixes #915

两单是同一族(#876 / #885、#887 / #894、#904 / #913)未被行清单枚举到的副本,一次收口:措辞逐句对照三个 PR 已落地的文本抄平,不出第四种口径。

逐处复核(源码证据)

先按 rule 6 复核前提,全部成立:

文档说法 源码实测
High + Customer 自动升级分支 src/flows/case-escalation.flow.ts:76-79 start 条件全文只有 record.priority == "critical" + 二次升级守卫;grep -rn "account.type|account_type" src/flows/ 零命中,24 个 flow 无一读取账户类型
改派给客服的经理 同文件 :93-104 update_record 只写 is_escalated / escalation_reason / escalated_date / status,:99 注释开头即 No owner reassignment;通知正文 :133 自己写着 It remains assigned to you.
跟进任务归原客服 流程无任务节点(:106-110 注释说明为何刻意没有);任务由 src/objects/case.hook.ts:136-152 的 case_status_side_effects 开出,owner_id 取 account.owner_id,priority: 'urgent',次日到期,且仅限 accountId 存在的工单
通知客服 + 经理 + 支持团队 :128 recipients: ['{caseRecord.owner_id}'] 一项;grep -rn "support_manager@|support-team@|escalation_team@" src/ 零命中
「紧急会立即提醒支持经理」 同一个 notify 节点,同上
Escalate Case 手动按钮 src/actions/case.actions.ts:14-19 确实存在,可作为 High 的真实路径写进页面

改了什么

content/docs/service/cases{,.zh-Hans,.zh-Hant}.mdx

content/docs/service/index{,.zh-Hans,.zh-Hant}.mdx

  • 生命周期第 2 步(:27):改为 Critical 立即提醒工单负责人、而不是支持经理,收件人列表只有 {caseRecord.owner_id} 一项;四个优先级名统一为兄弟页已用的拉丁写法 Low / Medium / High / Critical(中文两页此前只有这一行把 Critical 译作「紧急 / 緊急」)。

不得触碰的行 —— hunk 证明

git diff -U0 的三个 hunk 头(三语一致):@@ -34 +34 @@、@@ -89,4 +89 @@、@@ -96,5 +93,11 @@。

验证

六道门全绿(flock 串行,NODE_OPTIONS=--max-old-space-size=4096):validate / typecheck / lint / hygiene / build 退出码均 0,pnpm test -- --maxWorkers=2 → 66 files / 1597 passed, 1 skipped。控制字节:pnpm hygiene 的 TEXT_SCANNED 覆盖 content/ 与 .changeset/,输出「no raw control bytes in first-party files」;另做 grep -naP 自扫无命中。

反向验证方向:predicted GREEN,实测 GREEN —— 守卫盲区,如实报告。 仓内没有任何测试断言这两页的这几句散文(grep -rln "content/docs/service" test/ 只有 docs-object-coverage.test.ts,它检查的是「对象是否有页面」而非页面内容;docs-drift 的三语守卫比的是 > 引用块数量,本次未增删)。把本次 6 个文件的改动 stash 回基线后跑全量,同样是 66 files / 1597 passed —— 改前改后都绿。所以本 PR 的证据是上表的 file:line 源码复核,不是一次红转绿。

纯文档改动,未触碰 src/**;已带 changeset(.changeset/service-escalation-residue-cases-and-index.md);未起 dev server。


Generated by Claude Code

…ycle alert to source (#914, #915)

The cases page still carried the unswept twin of the five-step escalation list
(#876 / #885 wrote it real on the SLA page): a High+Customer trigger branch, a
reassignment to the agent's manager, a follow-up task on the original agent and
a three-party mailshot — none of which exist. Its priority-table sentence made
the same two claims 48 lines above the notify-node wording #887 / #894 had
already corrected on that very page.

Measured against src/flows/case-escalation.flow.ts and src/objects/case.hook.ts:
the start condition is `record.priority == "critical"` and nothing else, the
update_record node writes is_escalated / escalation_reason / escalated_date /
status and never owner_id, the follow-up task comes from the
case_status_side_effects hook and is owned by the ACCOUNT owner, and the notify
node's recipient list is the single entry `{caseRecord.owner_id}`.

The service index page's lifecycle step 2 carried the second copy of the
fictional support-manager recipient, ten lines above the line PR #913 had just
written real. Its four priority names are aligned to the Latin spelling the
sibling pages use.

Documentation only, six files. No src/** change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hotcrm Ignored Ignored Aug 6, 2026 9:01am

Request Review

@yinlianghui
yinlianghui marked this pull request as ready for review August 6, 2026 09:05
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 6, 2026
Merged via the queue into main with commit 2d7cc4e Aug 6, 2026
9 checks passed
yinlianghui added a commit to yinlianghui/hotcrm that referenced this pull request Aug 10, 2026
… source (objectstack-ai#948) (objectstack-ai#955)

All four bullets of `content/docs/service/index*.mdx` "Standard dashboards &
reports" were wrong in all three locales, in two independent ways.

The dashboard bullet advertised a `top agents` tile and an `oldest open cases`
tile. `src/dashboards/service.dashboard.ts` ships ten widgets and neither is
among them — and neither is a widget nobody built yet: `case_metrics`
(`src/datasets/case.dataset.ts`) declares Status, Priority, Origin, Type and
Created as its only dimensions, so nothing in analytics can rank agents, and
every widget on the dashboard binds that dataset, i.e. aggregates it, so no tile
lists individual cases by age. `content/docs/service/cases.mdx:188` (objectstack-ai#912 / PR
objectstack-ai#939) had already written the agent half to source, so the two service pages
contradicted each other; this page was the one that was lying. The bullet now
names the ten real tiles and states why the other two cannot be built.

The three report bullets named labels that do not exist in
`src/reports/case.report.ts`: `Cases Opened by Day × Priority` inverts the two
dimensions of the real `Cases Opened by Priority × Day` (priority in `rows`, the
day in `columns` — `sla-and-escalation.mdx` already had the order right after
objectstack-ai#917 / PR objectstack-ai#924), `Cases by Status × Priority` spells `and` as `×`, and
`SLA Performance` drops the `Report` its label ends with. The SLA bullet also
still carried the "% of cases resolved within SLA target" claim PR objectstack-ai#924 removed
from the SLA page: no such measure exists — the report gives case count,
SLA Violation Rate and average resolution time by priority, over closed cases
only.

`test/docs-service-index-analytics.test.ts` pins both directions: every bolded
Latin name in the section must resolve to a real widget title, report label or
dataset label (phantom names stay in the *italics* this page already uses for a
name the product lacks, objectstack-ai#927 / PR objectstack-ai#932); every widget title must appear, so a
new tile cannot land while the summary goes stale; and the source side of both
negative claims is pinned too, so adding an agent dimension or an agent-ranking
tile fails here rather than silently making the prose wrong the other way.
Reverse-verified: restoring the four old lines turns 13 of the 20 assertions
red.

PR objectstack-ai#947's `Service Overview` reference and its first-mention `Customer Service`
annotation are untouched, as are the objectstack-ai#913 / objectstack-ai#922 / objectstack-ai#932 lines elsewhere on the
page. No metadata changed.

Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment