Skip to content

docs(sales): 把 activities 页的活动量指标指向真正报告它的仪表盘 (#747) - #772

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-747-activities-dashboard-row
Aug 5, 2026
Merged

yinlianghui merged 1 commit into
mainfrom
claude/issue-747-activities-dashboard-row

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes #747

立单前提复核(origin/main = 440db01)

先按「issue 是线索不是规格」核对:activities.mdx 今天刚被 PR #750 重写过,但那一行原封不动地活了下来——#750 的文件面只覆盖了 #739 列的三处,这一行被它按「不在本 PR 内顺手修」明确留下了。

$ git log --oneline -1 -- content/docs/sales/activities.mdx
3ac9f33e docs(sales): activities.mdx 与落地的活动模型对账,并补齐 Sales Cloud 索引表 (#750)

$ grep -n "Sales Dashboard" content/docs/sales/activities.mdx
108:- **Sales Dashboard** — "Activities per rep this week" widget.

前提成立,三语同一行。

实测:这句话三个部分全错

派发注记给的「仪表盘 × 数据集绑定表」(#755 实测)我按 src/dashboards/ 重新验证了一遍,结论一致:

断言 实测
小部件在 Sales Dashboard 上 ❌ sales_dashboard(label Sales Performance)没有任何活动小部件。十五个 widget 全部绑 opportunity_metrics 或 forecast_metrics;对 src/dashboards/sales.dashboard.ts grep activit 零命中
小部件叫 "Activities per rep this week" ❌ 活动量在另一张仪表盘 sales_activity_dashboard(label Sales Activity,随 #592 / #671 落地)上,per-rep 的那个 widget 叫 Activity by Rep(activity.dashboard.ts:116:dataset: 'event_metrics'、dimensions: ['owner']、values: ['event_count']、filter: { status: 'held' })
按本周的时间窗 ❌ Sales Activity 刻意完全不带 dateRange(activity.dashboard.ts 文件头注释:datetime 筛选器绑定在 rc 上不可信,见 #520 / 上游 #3912、#3777),globalFilters 只有一个 Rep 下拉。按周的读数是另一个 widget Activity Volume by Week,它的周桶落在 start_datetime 这个 dimension 上(event.dataset.ts:41 dateGranularity: 'week')

读者按这页去 Sales Performance 上找活动量,找不到任何东西。

改动

三语同步重写该行,指向真实的仪表盘与真实的 widget 名,并把这个 widget 到底在数什么说清楚——这是原文最容易误导人的地方:

  • Activity by Rep 数的是「已举行的活动(Event)记录」,不是任务。 filter: { status: 'held' } 打在 event_metrics 上,也就是真正发生过的电话与会议。而 activities.mdx 是任务页,原文那句「Activities per rep」放在任务页的语境里,读起来像是在数任务。
  • 已完成的任务是同一张仪表盘上的另一个数——Tasks Completed 磁贴(task_metrics、filter: { is_completed: true })。两者不是一回事,现在分开写。
  • 明说 Sales Performance 只承载管道指标,免得读者继续往那边找;按周的读数指向 Activity Volume by Week。

issue 里的第二问「顺带确认 content/docs/analytics/dashboards.mdx 是否已经列出这张仪表盘」——已经列了(dashboards.mdx:76 有完整的 ## ☎️ Sales Activity 一节,十三个磁贴齐全,并且被 test/docs-drift.test.ts 的 dashboard-tile 守卫盯着),所以那边不需要改动,本行链接过去即可。链接不带锚点,与同类页(meetings-and-calls.mdx:78、email-and-calendar.mdx:52)的既有写法一致。

行文风格沿用 #750 立下的样式:加粗主语开头,破折号后写实测到的事实,并诚实交代限制。

同页扫查结果

按要求扫了本页其余的仪表盘 / 小部件类断言。同类的只有一处,但它属于列表视图类(#758 的缺陷类,而 #758 没覆盖 activities 页),且它的正确修法取决于 src/pages/home.page.ts(本任务 ⛔ 的文件面)要不要动,所以按「越界即停」单独立单,没有塞进本 PR:

第 1 项没有在本 PR 顺手改,是有意的:主页那句话的正确写法取决于那三个空标签页是否要先修,换一个同样站不住的说法不比留着旧的强——这正是 #747 本身记录的失败模式。

验证

平台仍钉在 17.0.0-rc.2,无任何依赖变更;content/docs/releases/ 未触碰;改动仅三行 mdx + 一个 changeset。

$ pnpm hygiene
  ✓ no console.log in src/     ✓ no TODO/FIXME markers
  ✓ no raw control bytes in source files      ✓ no source file over 100KB
✓ source hygiene clean

$ pnpm typecheck        # tsc --noEmit,无输出

$ pnpm validate
  ✓ Validation passed (1377ms)
  Data: 17 Objects  344 Fields
  UI: 1 Apps  14 Views  8 Pages  5 Dashboards  10 Reports  26 Actions
  (余下 5 条 ⚠ 为 main 上既有的审批 staffing / field-group 警告,与本改动无关)

$ pnpm vitest run --maxWorkers=2
 Test Files  62 passed (62)
      Tests  1479 passed | 1 skipped (1480)

其中 test/docs-drift.test.ts 是本改动最相关的守卫(它盯 content/docs/analytics/dashboards.mdx 的磁贴清单必须解析到真实 widget title)——单跑亦绿:

$ pnpm vitest run test/docs-drift.test.ts test/docs-object-coverage.test.ts test/analytics-integrity.test.ts --maxWorkers=2
 Test Files  3 passed (3)
      Tests  62 passed (62)

纯文档改动,没有新增测试:本页的散文不在任何守卫的扫描面内(docs-drift 的 tile 规则只对 content/docs/analytics/dashboards.mdx 三语开火)。把 activities 页纳入那个守卫是一个独立的能力扩张,不该搭在本次修字的车上;#725 已经在跟进该守卫的覆盖面(zh 页散文无人检查)。

🤖 Generated with Claude Code

https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa


Generated by Claude Code

…activity (#747)

`content/docs/sales/activities.mdx:108` (and its zh-Hans / zh-Hant siblings)
promised an "Activities per rep this week" widget on the **Sales Dashboard**.
All three parts of that sentence were wrong, so a reader following the row
found nothing at all:

- `sales_dashboard` (label **Sales Performance**) has no activity widget of any
  kind. All fifteen of its widgets bind `opportunity_metrics` or
  `forecast_metrics`; grep for `activit` in `src/dashboards/sales.dashboard.ts`
  returns nothing.
- Activity volume lives on a different dashboard — `sales_activity_dashboard`
  (label **Sales Activity**, shipped with #592/#671) — whose per-rep widget is
  titled **Activity by Rep** (`event_metrics`, dimension `owner`, measure
  `event_count`, filter `status: held`).
- It is not windowed to a week. Sales Activity deliberately ships no
  `dateRange` at all (see the header note in `activity.dashboard.ts` on the
  datetime-filter defect), and the week-by-week read is a separate chart,
  **Activity Volume by Week**, whose bucket lives on the `start_datetime`
  dimension (`dateGranularity: 'week'`).

The row now names the real dashboard and the real widget, and says what the
widget actually counts: logged interactions per owner — events that reached
**Held**, so the calls and meetings that really happened, not tasks. Completed
tasks are a separate number on the same dashboard, the **Tasks Completed**
tile — a distinction the old wording hid behind "activities" on a page about
tasks.

`content/docs/analytics/dashboards.mdx` already carries a **Sales Activity**
section listing all thirteen tiles, so the issue's secondary ask needed no
change; the row links there.

Fixes #747.

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

vercel Bot commented Aug 5, 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 5, 2026 6:36pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants