Skip to content

docs(analytics): 把 analytics 落地页写实,并清掉散在 8 页上的 cube 词汇残留 (#976, #977) - #987

Merged
yinlianghui merged 2 commits into
mainfrom
claude/issue-976-977-cube-vocabulary
Aug 6, 2026
Merged

docs(analytics): 把 analytics 落地页写实,并清掉散在 8 页上的 cube 词汇残留 (#976, #977)#987
yinlianghui merged 2 commits into
mainfrom
claude/issue-976-977-cube-vocabulary

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes #976
Fixes #977

并单实施。口径全部沿 PR #975analytics/cubes / analytics/reports 刚立的写法:本仓零 cube 声明,语义层是 src/datasets/ 的九个 dataset(ADR-0021),平台侧主张中性化而不预判为假。三语同步,zh 内链带前缀不带锚。

#976analytics/index 六处

# 原文 改后(事实来源)
1 Cubes — 4 cubes (sales, pipeline, service, marketing) 九个 datasetsrc/datasets/),本应用不声明任何 cube,由分析服务内部编译;四个名字在应用里零命中,按退役名以 斜体 点出去处
2 4 ready-made dashboards (CRM, Sales, Service, Executive) 五个,逐个用真 label 列出(src/dashboards/index.ts,缺的是 Sales Activity
3 10+ standard reports across leads, deals, cases, contracts 恰十份(交易 4 / 工单 3 / 线索 1 / 客户 1 / 流失 1),并写明没有合同报表、也建不出来——九个 dataset 都不读 crm_contract
4 A rep running Pipeline by Stage 改为真报表 Opportunities by Stage;另起一段按 #975 的双真身写法交代 Pipeline by Stage 是三仪表盘共用的漏斗磁贴 + 该报表柱状图的标题,报表库里搜不到
5 the Analytics group contains Dashboards / Reports / Cubes 真名 Insights 及其五个真实 children(src/apps/crm.app.ts),并说明其余仪表盘各自钉在 Sales / Activity / Service 组下;沿 #968 quick-tour 已立口径,退役名 Analytics / Dashboards / Reports / Cubes 保留为斜体
6 The AI Copilot can read directly from cubes + 三个示例问题 写成本应用侧的事实(六个 skill 不点名任何 dataset / cube / measure,Live Data Access 接对象工具在记录上聚合),平台侧 agent 是否另读编译后的 cube 明确不作断言。三个示例问题按能不能答分开:commit vs forecast 有数据(预测记录上的 Commit/Quota/Closed/Pipeline),东区/西区与产品-销售周期两条没有(交易上不存区域、无 dataset 读行项目、Days in Current Stage 是查询后公式)

第 6 条的悬空链接一条:前提已失效,未改。 单里说 /docs/ai-copilot/sales-copilot 不存在、content/docs/ai-copilot/ 只有 index / knowledge-bases / live-schema。fresh main 上该页三语俱在(sales-copilot{,.zh-Hans,.zh-Hant}.mdx),meta.jsonpages 也列着它;链接文字早在 #589 / PR #611 就从 Sales Copilot 改成了 Sales Skills,目标页一直在。链接原样保留,并加了存在性 pin,将来页面被移走时是这条测试红,而不是悄悄变回一条悬空链接。

顺带随命中行族一并写实的两处:frontmatter 的 description(“data cubes that power them”),以及页尾「Start here」的“the four built-in dashboards”——留着会和上面的表自相矛盾。

#977 — 8 页词汇残留(glossary:54 未动)

页面 处理
whats-new:105 按本页自己的先例(#897/#898 把「四个知识库」原地更正为「一个知识文章库 + HotCRM 不附带独立知识库」)原地更正而非加注:列出九个 dataset,并写明不声明任何 cube、那四个名字打不开
getting-started/for-developers:41 目录树 cubes/datasets/src/cubes/#492 被移除)
reference/performance-and-limits:75/83 标题 Reporting & cubesReporting & analytics;`Cube refresh frequency
reference/faq:133/138 同上:空磁贴排查那条改为「编译后的 cube 由分析服务刷新,本应用不声明计划」;「每几分钟增量刷新 + ⟳ Refresh 按钮」改为逐仪表盘真实间隔 + 明确「本应用元数据不声明任何手动刷新控件,控制台上若有,来自平台」。⟳ 按钮不预判为假,只说本应用没声明
sales/pipeline-management:93 改名即可:Opportunity Metricsopportunity_metrics)、度量 Total Amount、维度 Stage
getting-started/introduction:21 「self-service data cubes」→「它们底下的 dataset」(self-service 是平台侧 UI 主张,不再由本行断言)
marketplace/fork-hotcrm:21administration/sandbox-and-releases:93 单纯改名
reference/glossary:54 未动,并加了正向 pin:概念本身为真,将来的词汇扫描不得误伤

测试

新增 test/docs-analytics-vocabulary.test.ts(39 条),一切数字与产品名都从 src/ 推导而非抄写:仪表盘/报表 label 取自 barrel、dataset 计数取自 barrel、导航组与 children 取自 CrmApp.navigation、刷新间隔取自各 dashboard 的 refreshInterval。两处树遍历各带 vacuity guard。

粗体/斜体规则只跑在「Where to find things」一节上:Dashboards / Reports / Cubes 仅作为导航条目是幻影,作为本页链出去的三个文档页完全是真的("What's included" 表正是这个意思在加粗)——与 docs-quick-tour-navigation.test.ts 把规则限定在左导航块同一处理。

反向验证(方向预判:改前红、改后绿,实测一致):把 content/docs/ 整体退回 origin/main 后跑,25 / 39 红,en 页命中 8 条(仪表盘数、报表数、dataset 数、Insights children、nav 块粗体、幻影斜体、真报表名、退役 cube 名),两个 zh 页各 7 条,加上 #977 的三条(cubes/ 目录、刷新间隔、⟳ 字形)。恢复后 39/39 绿。

一处如实报告的方向差异bolds only real navigation labels 这条在两个 zh 页上改前改后都是绿的——boldNames() 按既有约定过滤含 CJK 的粗体串,而旧 zh 页导航节里加粗的是「仪表盘」「报表」「多维数据集」,本来就被过滤掉。中文页那一节真正抓住旧文的是幻影斜体那条(Analytics / Dashboards / Reports / Cubes 一个都没被点名)。没有为了凑「三语同红」去改判据。

守卫单跑确认不触:#923docs-conversion-rate-spelling,carrier 是 cubes / reports 两页,本 PR 未动,也未引入 转换率 拼法)、#955#968docs-quick-tour-navigation)、#736 的 callout 三语配平(本 PR 未新增/删除任何 > 块)。

六道门(flock -w 7200 /tmp/os-heavy-verify.lock 内串行,NODE_OPTIONS=--max-old-space-size=4096):

pnpm validate   EXIT=0   5 Dashboards  10 Reports(与文档新数字一致)
pnpm typecheck  EXIT=0
pnpm lint       EXIT=0   13 warning(s), 14 suggestion(s)(全部 main 既有)
pnpm hygiene    EXIT=0   no raw control bytes in first-party files
pnpm build      EXIT=0   ✓ Build complete
pnpm test       EXIT=0   Test Files 74 passed | Tests 1721 passed | 1 skipped

push 前另做控制字节自扫:grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]' 覆盖本 PR 全部 29 个改动文件,零命中。未起 dev server。

顺带记录(未在本 PR 修)

src/ 零改动,content/docs/releases/ 未动,@objectstack/* 版本未动。changeset:.changeset/analytics-landing-page-cube-vocabulary.md


Generated by Claude Code

… vocabulary (#976, #977)

`content/docs/analytics/index.mdx` is the first screen a reader of the analytics
docs sees, and every count on it named something else. Six claims, all three
locales, rewritten against `src/`:

- 4 cubes (Sales, Pipeline, Service, Marketing) -> no cube of this app's own;
  the semantic layer is the nine datasets in `src/datasets/`, compiled into
  cubes by the analytics service (ADR-0021). The four names hit nothing.
- 4 dashboards -> five; Sales Activity was missing.
- "10+ standard reports across leads, deals, cases, contracts" -> exactly ten,
  and none of them is a contract report: no dataset reads `crm_contract`, so
  none can be built.
- a rep running *Pipeline by Stage* -> **Opportunities by Stage**, with the
  name's two real identities (a shared dashboard tile, a chart title) written
  the way PR #975 wrote them on the reports page.
- the **Analytics** navigation group -> **Insights**, with the five entries the
  app pins to it; nothing in the sidebar is called Dashboards/Reports/Cubes.
- "the AI Copilot can read directly from cubes" -> what this app declares (no
  skill names a dataset, cube or measure; the data-question skill aggregates
  over records), leaving the platform side undecided rather than asserted.

The `/docs/ai-copilot/sales-copilot` link the issue reported as dangling is not:
#589 / PR #611 renamed the link text and the target page has been there
throughout. Left as is, and pinned.

Eight further pages carried the same retired vocabulary (#977): whats-new now
lists the nine datasets; for-developers draws `datasets/` instead of the
`src/cubes/` directory removed in #492; performance-and-limits and faq state the
refresh cadence the app really declares (each dashboard's own `refreshInterval`
- 60s / 180s / 300s) instead of an "every 5 min incremental, nightly full"
figure nothing in `src/` configures, and no longer promise a manual refresh
button no dashboard declares; pipeline-management, introduction, fork-hotcrm and
sandbox-and-releases were renames only. The glossary's definition of the cube
concept is deliberately untouched.

`test/docs-analytics-vocabulary.test.ts` derives every count and product name on
these pages from `src/` and fails when the app and the page disagree. Reverse
verification: 25 of its 39 rules go red on the pre-fix tree, green after.

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 2:43pm

Request Review

@github-actions github-actions Bot added the ci/cd CI plumbing and the verification pipeline label Aug 6, 2026
…t labels

The landing page's Copilot section cited Commit / Quota / Closed / Pipeline as
figures on the forecast record. Three of the four are: closed_amount is labelled
**Closed Won** on crm_forecast and only becomes **Closed** as a measure on the
Forecast Metrics dataset. Say both, so the name a reader sees on the record and
the name they select in a report each appear where they belong.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa
@yinlianghui
yinlianghui marked this pull request as ready for review August 6, 2026 14:47
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 6, 2026
Merged via the queue into main with commit e4d7c43 Aug 6, 2026
10 checks passed
This was referenced Aug 6, 2026
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