Skip to content

docs(sales): 把商机详情页 aside 区的两条描述写实(#959) - #967

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-959-opportunities-aside
Aug 6, 2026
Merged

yinlianghui merged 1 commit into
mainfrom
claude/issue-959-opportunities-aside

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes #959

content/docs/sales/opportunities{,.zh-Hans,.zh-Hant}.mdx 的「当你打开一个商机时,会看到」清单里,:151 承诺了一块 Competitors & Notes 侧面板,:152 把参考栏说成 Sales Copilot suggestions(Customer 360、营收预测、相关信号)。按 src/pages/opportunity_detail.page.ts 复核:该页声明三个区域——header、main、以及一条 width: 'small' 的 aside——aside 里只有一个组件,record:reference_rail。没有第二块侧面板,整页也没有任何 AI 组件。

复核结论(premise 成立)

立单时的行号在 origin/main = 4705aed5 上仍是 :151 / :152,三语同址;本页 #866(PR #934)动过的 :148 报价链接零改动。issue 正文列的 aside 实况逐项复核为真,并把「对象 / 过滤 / limit」一并核准写实:

entry 对象 关系字段(标签) limit 过滤
Quotes crm_quote crm_opportunity(Opportunity) 3 无
Products crm_opportunity_line_item crm_opportunity(Opportunity) 3 无
Open Tasks crm_task related_to_opportunity(Related Opportunity / 关联商机) 3 无

补测到位、这次一并写进文档的两点:

  • 参考栏渲染出来的每张卡片 = 关联总数徽章 + 最多三条记录 + 一个 View all 链接;数量为 0 的卡片折叠成一个 + N empty 小按钮。以 hotcrm 实际装的 @objectstack/console 产物为准测量(dist/assets/plugins-views-*.js:$filter:{[relationshipField]:parentId}, $top: limit ?? 3, $count:true)。
  • Open Tasks 这张卡片不按状态过滤——rail 的 entry 不声明过滤条件,查询也只带关联字段——所以它统计并列出本商机的全部任务,不分状态;真正过滤掉 Completed、一次十条的是 Related 标签页上的 Open Tasks 关联列表(filter: status neq completed,limit: 10)。

改动

:151 / :152 两行 × 三语,沿 #956 的口径:点名说清 + 给出真实归属,不静默删名。

  • Competitors & Notes:不存在这样一个面板,页面上也没有任何组件渲染 talking points。Competitors 字段本身是真的——商机上的多选字段,选项至今仍是占位的 Competitor A/B/C——但它不在本页上,而是在编辑表单的 Sales Strategy 分区里填写,紧挨 Next Steps;本页最接近「备注」的是 Details 标签页里可折叠的 Description 分区(Description + Next Steps)。
  • AI Reference Rail:与 cases 页那条不同,这里的参考栏确实存在,错的是内容——它列的是上表三个已关联记录的快照,一条建议都没有,整页也没有任何 AI 组件。Customer 360 与营收预测是真实技能,但走的是提问这条路径(沿 cases 页已立写法),下方《How the AI Copilot helps》一节本来就在讲这件事。

#612(全站 Copilot 用语定调)与本条相邻但不同:即使用语保留 Copilot 品牌,:152 描述的内容仍然是错的,两条互不等待。src/ 零改动;content/docs/releases/ 未触碰;zh 内链不带锚。

验证

flock -w 7200 /tmp/os-heavy-verify.lock 内串行跑六道门,全部 exit 0:

门 结果
pnpm validate ✓ Validation passed (1202ms)(5 条既有 author-time 警告,与本改动无关)
pnpm typecheck tsc --noEmit 无输出
pnpm lint 13 warning(s), 14 suggestion(s),均为既有项
pnpm hygiene ✓ no raw control bytes in first-party files / ✓ source hygiene clean
pnpm build ✓ Build complete (1527ms),dist/objectstack.json 1921.4 KB
pnpm test -- --maxWorkers=2 Test Files 71 passed (71) / Tests 1631 passed | 1 skipped (1632)

守卫盲区如实报告:本仓没有任何测试断言这三份 mdx 的这两行文本,也没有 docs↔page-metadata 的一致性门,所以这两行的改动在六道门下 predicted GREEN——门的绿不是本改动正确性的证据,正确性由上表逐项对着 src/pages/opportunity_detail.page.ts:227-256 与实际装的 console 产物测量得到。测试输出里那几行 ✗ source hygiene failed: ... 是 hygiene 自检测试自己的负例装置(断言检查器在植入违规时会失败),不是失败。

未起 dev server;文档改动,用户可见,已附 changeset .changeset/opportunity-detail-aside-write-real.md。


Generated by Claude Code

The "when you open an opportunity, you'll see" list promised a Competitors &
Notes side panel and an AI Reference Rail of "Sales Copilot suggestions
(Customer 360, Revenue Forecast, related signals)".
src/pages/opportunity_detail.page.ts declares three regions - header, main and
one narrow aside - and the aside holds exactly one component, a
record:reference_rail. There is no second panel and no AI component on the page.

- Competitors & Notes: no such panel, and nothing on the page renders talking
  points. Competitors is a multi-select field on the opportunity whose options
  are still the placeholders Competitor A/B/C, authored in the edit form's
  Sales Strategy section and not shown on this page; the nearest notes surface
  is the Details tab's collapsible Description section (Description, Next Steps).
- AI Reference Rail: the rail exists, but its three entries are snapshots of
  already-linked records - Quotes (crm_quote via Opportunity), Products
  (crm_opportunity_line_item via the same lookup) and Open Tasks (crm_task via
  Related Opportunity) - each a total-count badge, at most three records and a
  View all link, with empty entries folded into a "+ N empty" chip. No
  suggestion is produced here or anywhere on the page; the skills are reached by
  asking, as the section below already says. The rail's Open Tasks entry carries
  no status filter (entries declare none and the rail queries on the
  relationship alone), so the filtered not-Completed list is the Related tab's.

Names are kept and answered rather than silently deleted, following #956.
English, Simplified Chinese and Traditional Chinese; no metadata changed.

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:58pm

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