Skip to content

docs(service): write the case detail customer panel, Related tab and AI rail to source (#945) - #956

Merged
yinlianghui merged 3 commits into
mainfrom
claude/issue-945-cases-detail-layout
Aug 6, 2026
Merged

yinlianghui merged 3 commits into
mainfrom
claude/issue-945-cases-detail-layout

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes #945

三语同步改写 content/docs/service/cases{,.zh-Hans,.zh-Hant}.mdx 中「打开一个工单时,你会看到」这份清单里剩下的三条::145 客户面板、:148 Related 页签内容、:150 AI 参考栏。三条前提逐一复核,全部成立,按 #918 / #946 已立口径写实(点名说清不存在 + 给出真实归属,不静默删名)。src/ 零改动,三个文件各只动 3 行。

复核基线

分支基线 b7791caf(main,平台 17.0.0-rc.3)。#946 / #947 落地后这三条行号未再位移,三语同址:cases.mdx / cases.zh-Hans.mdx / cases.zh-Hant.mdx 的 :145 / :148 / :150 逐一原址命中。issue 里存疑的一点也一并核了:zh-Hant 的 Related 那条措辞与另外两语一致,同在 :148,不需要按当地行文另行处理。

src/pages/case_detail.page.ts 的 regions 只有两个:

region 组件
header(:38-95) page:header(:43)、record:highlights(:57,label Key Information)、record:path(:76)
main(:96-220) 一个 page:tabs(:101),details / related / activity 三个页签

regions 在 :221 收口,紧接着是 isDefault(:223)、assignedProfiles(:224)、aria(:226)。没有第三个 region,没有侧栏,页面上没有任何 AI 组件。

一、:145 客户面板 —— 成立

页面上不存在这样一个组件。它点名的四样东西逐一定位:

  • 账户:页面上出现三次 —— 页眉副标题 {crm_account}(:50)、record:highlights 的字段列表(:71)、record:details 的 Case Information 分区(:125)。
  • 主要联系人:只有一处 —— record:details 的 Case Information 分区(crm_contact,:126)。
  • 合同等级:无承载。crm_case 没有任何指向合同的关系字段;crm_contract 上也没有等级字段(src/objects/contract.object.ts 只有 contract_type / status / billing_frequency / payment_terms 等)。全仓最接近的是 crm_account.tier,label 是 Customer Tier(src/objects/account.object.ts:344),它在账户记录上,本页不展示。
  • 本月未结工单:无承载。src/objects/ 下一个 Field.summary 都没有,也没有任何按月计数的汇总。

改法:保留「客户面板」这个名字并说清它不存在,把账户与主要联系人指回真实位置,后两样写明在工单的任何界面上都没有承载。

二、:148 Related 页签 —— 成立

Related 页签是一个 page:accordion(:162),items 里只有一项 Open Tasks(:167-190):record:related_list,objectName: 'crm_task'、relationshipField: 'related_to_case'、filter 为 status neq completed、limit: 10。原文四样:

  • 子任务 —— 半对:它是「尚未完成的关联任务」,不是全部子任务,且一次最多十条。
  • 附件 —— 这一页没有任何附件组件(src/pages/ 全目录都没有文件类组件)。对象层面 crm_case.enable.files = true(src/objects/case.object.ts:300),所以工单确实可以挂附件 —— 文中把「能挂」与「这一页不列」分开写,不含糊带过。
  • 关联商机 —— crm_case 与 crm_opportunity 双向都没有关系字段(全仓指向 crm_case 的 lookup 只有 crm_task / crm_event / crm_knowledge_article 三个,外加 parent_case 自引用)。
  • 里程碑 —— 存在,但归属不同:crm_case.activityMilestones(:302-310)声明 escalated / resolved / closed 三条,由平台发到 Activity 时间线,不是 Related 上的记录列表。

三、:150 AI 参考栏 —— 成立

没有第三个 region,main 里除了 page:tabs 什么都没有;src/pages/ 全目录唯一与 AI 沾边的是 home.page.ts:234 的一段文案卡片。真实归属:服务技能(src/skills/)是真的,页面下方《AI Copilot 如何提供帮助》一节已经在讲它们 —— 靠提问触达,而不是靠工单旁边的面板。文中指回该节的名字而不加链接锚点。

顺带给读者一个坐标:本仓唯一真正渲染 record:reference_rail 的地方是商机详情页(src/pages/opportunity_detail.page.ts:226-256),而且它列的是 Quotes / Products / Open Tasks 三个关联记录列表,不是建议。

#612 不等待、也不预判:本条改的是「这一页没有这个组件」,与它该叫 Copilot 还是别的名字无关;Service Copilot 这个称呼在本 PR 里一字未改,全站用语定调仍归 #612。#595 同样不预判:全文只写今天的行为,没有评价 High/Medium/Low 该不该有时钟、账户等级该不该驱动 SLA。

落地行零回退

三个文件各只有 3 行变动(合计 9 insertions(+), 9 deletions(-)),PR #939 / #946 / #947 落地的 :142 页眉、:143 关键信息、:144 状态路径,以及标准列表视图小节、经理提示各行,原文逐字未动。

反向验证的方向

纯文档改写,没有可以「删掉再看诊断变红」的代码分支;test/ 下 70 个测试文件没有任何一个读 content/docs/service/cases*.mdx(docs-drift.test.ts 的规则面是 src/docs/*.md 的流程阈值、仪表盘磁贴引用、译页 callout 计数,都不覆盖本页这几句散文)。按裁定如实报告:守卫盲区(散文列),predicted GREEN —— 六道门在改前改后都应绿,绿本身不构成对文案正确性的证据;证据是上面每条的 file:line。

验证

全部在 flock -w 7200 /tmp/os-heavy-verify.lock 内串行执行,NODE_OPTIONS=--max-old-space-size=4096:

门 退出码 关键行
pnpm validate 0 ✓ Validation passed (1056ms)
pnpm typecheck 0 无输出
pnpm lint 0 13 warning(s), 14 suggestion(s) —— 与 main 既有一致
pnpm hygiene 0 ✓ no raw control bytes in first-party files / ✓ source hygiene clean
pnpm build 0 ✓ Build complete (1149ms)
pnpm test -- --maxWorkers=2 0 Test Files 70 passed (70) / Tests 1602 passed | 1 skipped (1603)

push 前控制字节自扫:grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]' 覆盖三个 mdx 与 changeset,退出码 1(无命中)。未起任何 dev server。

附带

  • changeset:.changeset/cases-detail-layout-write-real.md(patch),站内路径一律反引号包裹。
  • 自查后追加的两个提交只做字段标签校正:crm_task 那个 lookup 的 label 是 Related Case(src/objects/task.object.ts:175)而不是 Related To Case;crm_account.tier 的中文 label 是「客户分层」(src/translations/zh-CN.ts:96)而不是「客户等级」。
  • 施工中发现两族越界失实,行集与本单互斥,未在本 PR 顺手改:①同页 :147 Details 页签「所有元数据字段」与 :55 「详情屏幕分为 6 个分区」表;②sales/opportunities{,.zh-Hans,.zh-Hant}.mdx 的 :151 / :152 与 opportunity_detail.page.ts 的 aside 区实况不符。两族的 issue 编号在立单后补在本 PR 的评论里。

Generated by Claude Code

claude added 3 commits August 6, 2026 13:19
…AI rail to source (#945)

The "when you open a case, you'll see" list still promised a Customer panel, a
Related tab carrying four kinds of record and an AI Reference Rail.
`src/pages/case_detail.page.ts` declares two regions and nothing else: a header
holding the page header, the Key Information strip and the status path, and a
main region holding one tab strip. No side panel, no third region, no AI
component.

- Customer panel: no such component. Account is on the page three times over
  (header subtitle, Key Information, a Details field) and primary contact is a
  field in the Details tab's Case Information section. Contract tier and open
  cases this month have no carrier at all - a case links to no contract,
  crm_contract has no tier field, and nothing counts cases by month.
- Related: one accordion item, Open Tasks (crm_task via related_to_case, status
  != completed, limit 10). No attachments list on the page, no opportunity
  relationship in either direction, and the case's three activityMilestones land
  in the Activity timeline instead.
- AI Reference Rail: no rail of any kind; the service skills are reached by
  asking, and the one record:reference_rail in this app is on the opportunity
  detail page listing related records.

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

Co-authored-by: Claude <noreply@anthropic.com>
The Related tab bullet spelled the crm_task lookup as "Related To Case"; the
field's label is "Related Case" (src/objects/task.object.ts:175, translations
en.ts / zh-CN.ts). All three locales plus the changeset.

Co-authored-by: Claude <noreply@anthropic.com>
The two Chinese pages glossed Customer Tier as 客户等级 / 客戶等級; the field's
label in src/translations/zh-CN.ts is 客户分层.

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

Request Review

Copy link
Copy Markdown
Collaborator Author

补上正文里预留的两个 issue 编号(均未指派,只打 documentation,不打 pm:queue):

两单的重复检查方式写在各自正文里:本轮 search_issues 对有命中的查询一律返回 API rate limit already exceeded(零命中的查询正常返回),故以「零命中作反证」的方式做的检查,逐条列了查询串。


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review August 6, 2026 13:42
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 6, 2026
Merged via the queue into main with commit 7003858 Aug 6, 2026
9 checks passed
yinlianghui added a commit to yinlianghui/hotcrm that referenced this pull request Aug 10, 2026
…ectstack-ai#959) (objectstack-ai#967)

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 objectstack-ai#956.
English, Simplified Chinese and Traditional Chinese; no metadata changed.

Co-authored-by: Claude <noreply@anthropic.com>
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