Skip to content

docs(sales): opportunities.mdx 的列表视图一节按实际声明的九个视图重写 - #757

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-752-opportunities-view-names
Aug 5, 2026
Merged

yinlianghui merged 1 commit into
mainfrom
claude/issue-752-opportunities-view-names

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes #752

现状核对(对照 origin/main,先验证再动手)

content/docs/sales/opportunities.mdx:114-121 那一节列了六个"标准列表视图",逐一对照 src/views/opportunity.view.ts:

文档里写的 仓库里的实际情况
My Opportunities 不存在(最接近的是 my_open_deals → My Open Deals)
Pipeline This Quarter 不存在。这是 closing_this_quarter 的第三个名字:metadata label 与四个语言包一致为 Closing This Quarter / 本季度待成交商机 / Cierres de Este Trimestre / 今四半期にクローズ予定
Closing This Month 不存在
At Risk 不存在(正文"给销售代表的提示"里还引用了一次)
Top Deals by Amount 不存在
Pipeline Kanban(侧边栏快捷方式"Sales Pipeline") 视图名是 Sales Pipeline(pipeline_kanban);侧边栏那一项 nav_pipeline 的英文 label 是 Pipeline,Sales Pipeline 是视图自己的名字,两者被写反了

实际声明的是九个:open_opportunities / my_open_deals / pipeline_kanban / all_opportunities / close_date_calendar / deal_timeline / deal_gallery / stale_opportunities / closing_this_quarter,且 list.tabs 恰好curate了这九个(test/metadata-references.test.ts 的 "every listViews entry is referenced by the switcher tabs or app navigation" 保证没有第十个可达视图)。

改了什么

  • 列表视图一节整段重写为这九个视图的真实清单:各自过滤什么、怎么排序、从哪里进入。
  • 新增 ### Closing This Quarter 小节,按 closing_this_quarter is labelled "Closing This Quarter" in all four locales, but its filter applies no date restriction at all #743 / PR fix(views): window "Closing This Quarter" to deals that close this quarter (#743) #746 修后的现状写:只要 Commit / Best Case、只要进行中、且 close_date 落在当前季度内(两端都是查询时现算的日期宏),因此把 Amount 列加总得到的是本季度的承诺数;并写清 空列表是一个合法答案——视图会用 emptyState 的说明取代表格(No Deals Closing This Quarter,并指回 Open Deals),演示数据在季度最后几天也会命中这一屏。
  • 修掉正文里另一处同类引用:❌ Don't change the close date … The **At Risk** view exists to surface honest slippage 指向一个不存在的视图,改写为真正暴露停滞交易的东西——当前阶段停留时间 + Stale Opportunities + 每日 Stalled Deal Alert(14 天)。
  • zh-Hans / zh-Hant 两个语言页同步重写,视图名采用 zh-CN 语言包里的译名(进行中商机 / 销售流水线 / 本季度待成交商机 …),链接按各自 locale 前缀。
  • 一个 changeset(.changeset/opportunities-docs-view-roster.md)。

只动了 content/docs/sales/opportunities{,.zh-Hans,.zh-Hant}.mdx 和 changeset —— 没有碰 src/**、没有碰 content/docs/guides/**、没有碰 content/docs/releases/,平台版本仍为 17.0.0-rc.2。

验证

pnpm hygiene                 ✓ source hygiene clean
pnpm typecheck               ✓ (tsc --noEmit, 无输出)
npx vitest run --maxWorkers=2
                             Test Files  62 passed (62)
                                  Tests  1475 passed | 1 skipped (1476)

其中与本改动直接相关的是 test/docs-drift.test.ts(含"translated docs pages keep the English page callouts"——本 PR 未增删任何 > … 引用块,三页计数仍相等)、docs-object-coverage、sharing-coverage、docs-contact-email-uniqueness,单独跑亦为 78 passed。另外用 grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]' 自查过三个 mdx 与 changeset,无裸控制字节。

顺带发现(不在本 PR 范围,另行立单)

同一缺陷类在别的页面上还有,按 Prime Directive #10 单独立 issue、不在此 PR 修:accounts.mdx / leads.mdx / contacts.mdx / quotes.mdx 的"标准列表视图"同样列的是仓库里不存在的视图名。

🤖 Generated with Claude Code

https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa


Generated by Claude Code

…ipped views

The "Standard list views" section on `content/docs/sales/opportunities.mdx`
(and its zh-Hans / zh-Hant siblings) listed six views, five of which do not
exist (My Opportunities, Closing This Month, At Risk, Top Deals by Amount,
Pipeline Kanban), and gave the `closing_this_quarter` view a THIRD name —
"Pipeline This Quarter" — where the metadata label and all four locale bundles
say "Closing This Quarter".

The section is now the real roster of nine saved views declared in
`src/views/opportunity.view.ts`, each with what it filters, how it sorts and
where it is reached from. `closing_this_quarter` is documented as it behaves
after #743/#746: open commit/best-case deals windowed to the current quarter,
with the empty state explaining the legitimately-empty case.

Also corrected in the same sweep: the rep tip pointed at an "At Risk" view that
does not exist (now: time in stage on Stale Opportunities, plus the daily
Stalled Deal Alert), and the kanban board's sidebar entry is labelled
"Pipeline", not "Sales Pipeline" (that is the view's own name).

Fixes #752.

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 5:52pm

Request Review

@yinlianghui
yinlianghui marked this pull request as ready for review August 5, 2026 17:55
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 5, 2026
Merged via the queue into main with commit c55aaf5 Aug 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opportunities.mdx 用第三个名字("Pipeline This Quarter")称呼 closing_this_quarter 视图,并列出仓库里不存在的视图名

2 participants