docs(service): write the index page's dashboards & reports section to source (#948) - #955
Merged
Merged
Conversation
… 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Aug 6, 2026
yinlianghui
marked this pull request as ready for review
August 6, 2026 13:41
This was referenced Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #948
content/docs/service/index{,.zh-Hans,.zh-Hant}.mdx的《Standard dashboards & reports》四行,三语全部写实。原文四行的失实分两类,本 PR 逐行核过源码后重写。stale-premise 复核结论: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 Priorityoldest open cases磁贴不存在dataset: 'case_metrics',即全部是聚合,没有任何一个列单条记录src/reports/case.report.ts:41Cases Opened by Priority × Day(文档把两个维度写反了)、:7Cases by Status and Priority(文档写成×)、:19SLA Performance Report(文档少了Report)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)已落地的口径一致。两页矛盾就此消除:本页原来是撒谎的那一页。改了什么
case_metrics。sla-and-escalation页立好的写法改成 SLA Violation Rate + 只统计已关闭工单,并显式否掉「达成率百分比」。零回退:PR #947 的
Service Overview指称与首现Customer Service附注原样保留;#913 / #922 / #932 落地的其它行未触碰。src/零改动,releases/未触碰,zh 内链不带锚。新增守卫
test/docs-service-index-analytics.test.ts(20 assertions)散文没有任何东西检查(
os validate/pnpm lint不看content/docs),所以检查写在断言所在处,双向:**加粗**名字都必须解析到真实 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*立过这个写法),所以幻影名字不可能靠加粗蒙混过关。service_dashboard的每个 widget title 都必须出现——新增磁贴而摘要不更新,这里就红。case_metrics加 owner 维度、或加一个按客服排名 / 按工单年龄的磁贴,本文件立刻红——因为那时散文就在另一个方向上错了。SLA Performance后面不跟Report的短名)。逆向验证(方向为事前预测的 RED):
git stash掉三个 mdx、只留守卫跑,20 条里 13 条红(三语各 4 条 + en 的加粗规则);其余 7 条是纯源码事实断言与 zh 两页的加粗规则(旧 zh 加粗名全是 CJK,被规则按设计跳过),本就与文档词面无关,保持绿——这是预期,不是漏检。验证
pnpm typecheckpnpm validatepnpm lintnode scripts/check-source-hygiene.mjsno raw control bytes in first-party files,扫描面含content与.changesetpnpm buildBuild complete,10 Reports / 5 Dashboardspnpm test -- --maxWorkers=2Test 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