docs(guides): name real built-in views in search-and-navigation (#973) - #979
Merged
Conversation
The *Built-in vs personal vs shared* bullet taught the concept with two examples and neither was a view. *All Open Opportunities* splices the two real opportunity views — Open Deals (`open_opportunities`, default + pinned) and All Opportunities (`all_opportunities`, unfiltered). *Pending My Approval* is the phantom PR #969 removed from `revenue/approvals` and #960 from `quick-tour`; this page was its last landing place, and the approvals plugin ships My Pending / I Submitted / Completed / All on `sys_approval_request`. The zh pages were wrong in their own ways: zh-Hans quoted 待我审批, the navigation label of `nav_approval_requests` rather than a view; zh-Hant quoted 待我審核, which no locale pack carries at all (this app ships en / zh-CN / ja-JP / es-ES and no Traditional Chinese pack). Both now name the real views and quote the zh-CN labels the console resolves. Names swapped without a denial: this bullet is an example, not a navigation roster. `src/` untouched. `test/docs-search-navigation-views.test.ts` pins the bullet's names and glosses against the shipped metadata and the two retired spellings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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 #973
guides/search-and-navigation的《内置 vs 个人 vs 共享》里,教「内置视图」这个概念本身的那一条 bullet 举了两个例子,两个都不是视图名。三语同步改成真名,src/零改动。逐名复核(fresh main
01da4a8e,平台 17.0.0-rc.3)src/views/opportunity.view.ts:Open Deals(open_opportunities,isDefault+pinned,落地视图)与 All Opportunities(all_opportunities,无filter,未筛选的全量)src/与已安装的@objectstack/plugin-approvals双面零命中;revenue/approvals由 PR #969 写实、quick-tour由 #960 覆盖后,本页是它最后一处落脚点sys_approval_request.listViews上内置 My Pending / I Submitted / Completed / All(沿 PR #969 口径)nav_approval_requests的 zh-CN label(src/translations/zh-CN.ts:1219),不是视图名zh 侧引用的简体界面名也都实测过:
进行中商机/全部商机来自src/translations/zh-CN.ts的crm_opportunity._views;我的待办来自审批插件自带的 zh-CN 包。该包只导出 schema、不导出语言包,且构建产物把非 ASCII 全部写成\uXXXX转义(所以grep 我的待办 dist/index.js是 0 命中,很容易被误读成「插件没有中文」)——守卫里解一次转义再断言,把这条 gloss 钉住而不是放任不管。口径
revenue/approvals不同,那页保留了「这三个名字哪里都不存在」的记录)。:56这一条 bullet 行族,三语同步;「个人 / 共享」两条不动(SLA policy matrix: per-priority × tier clocks, first-response stamping, escalation that reassigns #595 不预判),src/零改动,zh 内链无新增。守卫
test/docs-search-navigation-views.test.ts源码侧钉:Open Deals 是默认 tab、All Opportunities 无 filter、插件出 My Pending、zh-CN 三个 label、以及两个幻影名在真名集合里零命中(将来哪个插件真的发了同名视图,是测试红、不是文档偷偷变对)。页面侧钉:bullet 里每个强调名必须是本应用或插件真出的 label(粗体与斜体都读——#973 的两个幻影正是斜体写的),每个「…」必须是语言包真有的字串,两个退休拼法不得回归。
反向验证(先定方向再跑):把 bullet 还原成旧文,预测 8 条红——三语各自的「名字必须存在」与「退休拼法」,加 zh 两页的 gloss 检查;实测正是这 8 条,6 条源码事实照常绿(它们不读本页)。第一轮里 en 页是被空值守卫(0 个粗体名)挡下的,而不是被成员检查——那说明守卫读不到缺陷真正的形状,于是把提取改成粗体+斜体、空值门槛降到 2,再跑,报错变成逐名点名:
names a view "All Open Opportunities" that nothing in this app ships。验证
六道门在共享锁内串行,全绿:
validate/typecheck/lint/hygiene/build退出码 0,pnpm test -- --maxWorkers=2→ 74 files / 1696 passed / 1 skipped,退出码 0。守卫盲区如实报:PR #969 新增的
docs-revenue-approvals-navigation.test.ts只读content/docs/revenue/approvals*.mdx(其PAGES清单即为这三份文件),不读本页——单跑确认它对本改动是 predicted GREEN / observed GREEN,也就是说它的绿说明不了本 PR 的对错;覆盖本页的是新增的那支守卫。Generated by Claude Code