Skip to content

docs(service): write the index page's dashboards & reports section to source (#948) - #955

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-948-index-dashboards-reports
Aug 6, 2026
Merged

docs(service): write the index page's dashboards & reports section to source (#948)#955
yinlianghui merged 1 commit into
mainfrom
claude/issue-948-index-dashboards-reports

Conversation

@yinlianghui

@yinlianghui yinlianghui commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Fixes #948

content/docs/service/index{,.zh-Hans,.zh-Hant}.mdx 的《Standard dashboards & reports》四行,三语全部写实。原文四行的失实分两类,本 PR 逐行核过源码后重写。

stale-premise 复核结论:issue 的四项事实全部成立

issue 的说法 复核 证据
top agents 磁贴不存在 ✅ 成立 src/dashboards/service.dashboard.ts 十个 widget:Open Cases / Critical Cases / Avg Resolution Time / SLA Violations / Cases by Status / Cases by Priority / Cases by Origin / Daily Case Volume / SLA Compliance / Open Cases by Priority
oldest open cases 磁贴不存在 ✅ 成立 同上;且十个 widget 全部 dataset: 'case_metrics',即全部是聚合,没有任何一个列单条记录
三报表名对不上 ✅ 成立 src/reports/case.report.ts:41 Cases Opened by Priority × Day(文档把两个维度写反了)、:7 Cases by Status and Priority(文档写成 ×)、:19 SLA Performance Report(文档少了 Report)
「% of cases resolved within SLA target」度量不存在 ✅ 成立 src/datasets/case.dataset.ts 的 measures 只有 case_count / avg_resolution / avg_sla_violated,没有任何达成率度量

top agents 的「为什么做不出来」也复核到源:case_metrics 的 dimensions 只有 status / priority / origin / type / created_date,没有 owner 维度——与 content/docs/service/cases.mdx:188(#912 / PR #939)、sla-and-escalation.mdx:51(#917 / PR #924)已落地的口径一致。两页矛盾就此消除:本页原来是撒谎的那一页。

改了什么

零回退:PR #947Service Overview 指称与首现 Customer Service 附注原样保留;#913 / #922 / #932 落地的其它行未触碰。src/ 零改动,releases/ 未触碰,zh 内链不带锚。

新增守卫 test/docs-service-index-analytics.test.ts(20 assertions)

散文没有任何东西检查(os validate / pnpm lint 不看 content/docs),所以检查写在断言所在处,双向:

  1. listed ⇒ exists:本节里每一个不含 CJK 的 **加粗** 名字都必须解析到真实 widget title / report label / dataset label / 仪表盘的两个名字。不存在的名字一律用 斜体(本页 service/index 的《Where to find things》(:63-67) 四项与 crm.app.ts 的 Service 分组三项对不上:Service Board 不存在、Tasks 不在这个组、Knowledge 被漏掉、导航项实际叫 Service Overview #927 / PR docs(service): write the index page's 《Where to find things》 list to the real navigation (#927) #932 已用 *Service Dashboard* 立过这个写法),所以幻影名字不可能靠加粗蒙混过关。
  2. exists ⇒ listed:service_dashboard 的每个 widget title 都必须出现——新增磁贴而摘要不更新,这里就红。
  3. 两条否定断言的源码侧也钉住:给 case_metrics 加 owner 维度、或加一个按客服排名 / 按工单年龄的磁贴,本文件立刻红——因为那时散文就在另一个方向上错了。
  4. 三行报表名逐字比对源码 label,并禁止四条已退役说法回潮(含 SLA Performance 后面不跟 Report 的短名)。

逆向验证(方向为事前预测的 RED):git stash 掉三个 mdx、只留守卫跑,20 条里 13 条红(三语各 4 条 + en 的加粗规则);其余 7 条是纯源码事实断言与 zh 两页的加粗规则(旧 zh 加粗名全是 CJK,被规则按设计跳过),本就与文档词面无关,保持绿——这是预期,不是漏检。

验证

结果
pnpm typecheck exit 0
pnpm validate exit 0(仅既有 5 条 author-time warning)
pnpm lint exit 0(13 warning / 14 suggestion,均为既有)
node scripts/check-source-hygiene.mjs exit 0 — no raw control bytes in first-party files,扫描面含 content.changeset
pnpm build exit 0 — Build complete,10 Reports / 5 Dashboards
pnpm test -- --maxWorkers=2 exit 0 — Test Files 71 passed;Tests 1622 passed,1 skipped

控制字节自扫(grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]')对五个改动文件均无命中。未起 dev server。

Refs #937 #947 #917 #924 #912 #939 #927 #932

… source (#948)

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` (#912 / PR
#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
#917 / PR #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 #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, #927 / PR #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 #947's `Service Overview` reference and its first-mention `Customer Service`
annotation are untouched, as are the #913 / #922 / #932 lines elsewhere on the
page. No metadata changed.

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

Co-authored-by: Claude <noreply@anthropic.com>
@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 1:25pm

Request Review

@github-actions github-actions Bot added the ci/cd CI plumbing and the verification pipeline label Aug 6, 2026
@yinlianghui
yinlianghui marked this pull request as ready for review August 6, 2026 13:41
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 6, 2026
Merged via the queue into main with commit 9cd96f6 Aug 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd CI plumbing and the verification pipeline

Projects

None yet

2 participants