Repository navigation
docs(sales): 用真实的视图名册重写 accounts / leads / contacts / quotes 四页的「标准列表视图」 - #768
Merged
Merged
Conversation
…ections against the shipped views (#758) The "Standard list views" section on all four pages (and their zh-Hans / zh-Hant siblings) listed views that do not exist. Accounts named five phantoms and omitted every one of Account Cards, Accounts by Location, Enterprise Accounts, Upcoming Renewals and At-Risk Accounts; Contacts and Quotes advertised five views where three exist; Leads advertised five, one of which was real. Each roster is now measured against the object's *.view.ts declaration -- filter, sort and entry point per view -- plus the behaviour that makes an empty list readable: the two account customer-success queues are scoped to Type = Customer and read hand-maintained fields, and a fresh org has no quotes at all until the first Generate Quote. Two corrections worth calling out: - Hot Leads is documented as it behaves. Its cut is 4.5 stars against a whole-star rating, so it is the 5-star queue; a 4-star lead is on High Priority. The old page called Hot Leads "rating >= 4 stars", which is the other view's filter. The threshold divergence itself is filed separately -- the docs describe the current behaviour. - The rep tip pointing at a nonexistent "Today's Follow-ups" view now says what the Next Follow-up Date really drives: the sort order of Hot Leads, stamped on intake and re-stamped by Schedule Follow-up. Enterprise Accounts is also clarified as a revenue cut (>= $10M), not the Customer Tier field, and the map plots Office Location, not the billing address. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
yinlianghui
marked this pull request as ready for review
August 5, 2026 18:23
This was referenced Aug 5, 2026
Closed
yinlianghui
added a commit
to yinlianghui/hotcrm
that referenced
this pull request
Aug 10, 2026
…≥ 4) (objectstack-ai#774) * fix(leads): one definition of "hot" — align the Hot Leads view to the routing flow (objectstack-ai#766) The `hot_leads` list view cut at `rating >= 4.5` while the `lead_assignment` flow's hot branch (edge `e2`) cuts at `>= 4`. `rating` is a whole-star field — `lead.hook.ts` rounds the computed score, `Field.rating(5)` renders as a star widget with no half steps, and the one seeded 4.5 was deleted for the same reason (objectstack-ai#591) — so `>= 4.5` was `== 5` on every row that can exist. A 4-star lead was therefore routed hot, stamped with the 1-day SLA, and its owner alerted "Hot lead — assign within 24h", while the queue that alert points at could never contain it. The flow is the semantics producer (its verdict has user-visible consequences), so the view follows it: threshold `>= 4`. The comment crediting an `auto_flag_hot_lead` workflow is removed — no such automation exists in this repo — and replaced with a reference to the real producer. `test/hot-lead-threshold-parity.test.ts` derives both thresholds from the shipped metadata and pins their agreement, including a truth table that asks the real AutomationEngine and the real view filter, for every rating a lead can carry, whether "routed hot" and "in the queue" give the same answer. Docs: the Hot Leads / High Priority rows on leads.mdx and its zh-Hans / zh-Hant siblings described the pre-fix behaviour (objectstack-ai#768 wrote them against the old threshold) and now match what ships. Fixes objectstack-ai#766 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa * test(leads): drop the unused high_priority binding from the parity guard CodeQL flagged `highPriorityView` as unused, and it was: the file compares the hot_leads threshold against the lead_assignment hot branch, and high_priority carries no part of that invariant. Removed rather than given an assertion to justify it. Post-objectstack-ai#766 high_priority holds the same filter as hot_leads, so the only assertion available would pin that sameness — a guard over an open product decision (objectstack-ai#775: merge the two views, or re-differentiate high_priority on a non-rating criterion), either outcome of which would turn it red with nothing broken. A comment now records why the binding is absent, so the next reader does not re-add it. No assertion changed: 16 tests before and after. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #758
延续 PR #757(opportunities.mdx)的写法:以各对象的
src/views/*.view.ts声明为唯一事实来源,逐个视图对账过滤条件、排序和入口,按现状描述行为,不为散文加钉子测试。四个页 × 三个语言 = 12 个文件,改动限定在列表视图小节 + 幽灵视图引用,其余小节没动。逐页对账结果(基线 origin/main = c55aaf5)
四页没有一页是准确的,#758 的前提全部成立:
list.tabs里,可达)tabs,切换器列出全部)对得上的只有 accounts 的 My Accounts、leads 的 Hot Leads(名字对、阈值写错)和 contacts 的 Primary Contacts。
散文里的幽灵视图(#757 同款顺带清扫)
leads.mdx给销售代表的提示曾写「填下次跟进日期——它驱动 Today's Follow-ups 视图」。该视图不存在;这个日期真正驱动的是 🔥 Hot Leads 的排序,且由lead_assignment在入库时盖章(四星及以上明天、其余三天后),schedule_followup会按新建任务的到期日重新盖章。三个语言页都已改写。leads.zh-Hant.mdx:81把视图叫「疑似重複潛在客戶」,语言包里是「疑似重复线索」——改为「疑似重複線索」,并在小节开头一句说明:视图名依产品界面中文名写作「線索」,与本页行文的「潛在客戶」是同一件事。leads.mdx:81/zh-Hans引用的 Suspected Duplicates 视图核对属实(lead.view.ts:398),未动。三处值得单独看的实测结论
rating >= 4.5(lead.view.ts:358),而rating是Field.rating(5)、打分钩子Math.round到整星,所以它实际上是五星队列;四星线索在 High Priority 里。文档因此明确写「四星的线索没有丢,它在 High Priority」。阈值本身与路由流Hot Lead (rating ≥ 4)的分叉是 src 侧问题,另立 🔥 Hot Leads 视图的 rating ≥ 4.5 与整星评分/路由流的「hot = rating ≥ 4」不一致:被判定为 hot、发了告警的四星线索永远进不了这个队列 #766,本 PR 不碰src/**。annual_revenue >= 10000000(account.view.ts:129),与tier: 'enterprise'无关——种子数据里 Acme(tier=enterprise、营收 500 万)就不在这个视图里。文档写明了这一点。同理 Accounts by Location 的图钉取自office_location,不是账单地址。type = customer过滤,再读手工维护、无默认值的health_score/next_renewal_date——空是数据缺口而非过滤条件坏了,页面这样写。Quotes 三个视图都没有声明 emptyState,而报价只能从商机生成,所以新组织看到的就是一张空网格;文档如实说明,没有替它虚构一段解释文案(与 opportunities 的closing_this_quarter有真实 emptyState 的情况不同)。语言
英文页用 metadata label;zh 页用
src/translations/zh-CN.ts的_views译名(zh-Hant 为对应繁体写法),跨节链接按语言前缀。机械核对:四个对象声明的全部 21 个视图名在对应英文页中均出现;21 个中文/繁体译名在对应 zh 页中均出现;原先 18 个不存在的视图名在 12 个文件里已一个不剩。验证
首轮
pnpm test是红的,而且红得有价值:docs-drift.test.ts的 callout 平价守卫抓到我在 zh-Hant 版 leads 页多加了一个> …说明框(3 vs 英文页的 2)。那段说明是繁体页特有的术语提示,不是「别人踩过的坑」,因此并入小节开头的正文而不是保留成 callout——不是为了让检查变绿而删英文页的框。第二轮全绿。变更集:
.changeset/sales-list-view-rosters.md。未触碰content/docs/releases/、opportunities.mdx(#757 刚定稿)、guides/**(#756 在飞)、index.mdx与src/**;平台版本保持 17.0.0-rc.2。顺带发现(均已另立单,本 PR 不修)
hot_leads的rating >= 4.5与路由流「hot = rating ≥ 4」不一致:被判为 hot、发了 24 小时告警的四星线索永远进不了这个队列(需产品决定收哪一边)。_views少了三个视图标签(renewals_due / at_risk_accounts / hot_leads),而其余三个语言包都有;_views没有任何跨语言覆盖守卫 #767 ——finding:en.ts 的_views少了三个视图标签,其余三个语言包都有;_views没有跨语言覆盖守卫。Generated by Claude Code