Skip to content

docs: 修掉两处悬空锚点 —— sla-and-escalation 指向 automation 的 Flows 一节,zh 版 mobile 的 roadmap 去锚点 - #868

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-749-dangling-anchors
Aug 6, 2026
Merged

yinlianghui merged 1 commit into
mainfrom
claude/issue-749-dangling-anchors

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes #749
Fixes #764

两单同缺陷类(站内链接的锚点在目标页不存在),文件面互斥,按 #749 的 PM 认领裁定并单一个 PR。

slug 规则先钉死(两单共用的判据)

不推断,实测:apps/docs 用 fumadocs-core 16.9.3,source.config.ts 的 mdxOptions 是空的,走默认 remark-heading —— 也就是 github-slugger。装 github-slugger@2 逐个跑出来:

"Flows (multi-step)"  -> "flows-multi-step"
"流程(多步骤)"        -> "流程多步骤"
"流程(多步驟)"        -> "流程多步驟"
"Roadmap"             -> "roadmap"
"路线图"               -> "路线图"
"路線圖"               -> "路線圖"

对照组佐证这套规则与仓库现状一致:content/docs/administration/sharing-and-security.zh-Hans.mdx:169 的既有链接 #字段级安全,目标 profiles.zh-Hans.mdx 的 ## 字段级安全 算出来正是 字段级安全 —— 现有能跳的锚点按这套规则算得出来,所以它就是渲染时用的那套。

#749 —— sla-and-escalation 三语的 automation 锚点

前提复核:issue 正文列的 automation 页标题清单已经过期(#854 重构过),所以按裁定实测了当前 main:

content/docs/administration/automation.mdx
  12:## The four kinds        ← issue 里写的是 "The five kinds"
  21:## Validation rules
  39:## Flows (multi-step)    ← 仍在
  ...

## Workflow rules 这个标题已经不存在了(#833 把那节退休成了 Flows 节里的一段说明)。但 issue 的核心断言仍然成立:automation 页三语都没有 Case Escalation 这个标题,#case-escalation 确实悬空;Case Escalation Process 是 ## Flows (multi-step) 一节内置流程表里的一行(automation.mdx:73)。前提有效。

改法按裁定:

⚠️ sla-and-escalation 是 #850 八页族之一(未派)。本 PR 只动 :128 这一行的链接,该页其它内容(包括 :129 的「工作流规则」字样)一概未碰 —— 那是 #850 的面。

#764 —— zh 版 mobile 的 roadmap 锚点

前提复核:实测确认 content/docs/whats-new.zh-Hans.mdx:98 是 ## 路线图、whats-new.zh-Hant.mdx:98 是 ## 路線圖,slug 里不含 roadmap,两处 #roadmap 悬空;英文侧 whats-new.mdx:116 的 ## Roadmap 在,guides/mobile.mdx:10 的 #roadmap 正常。前提有效。

zh 两处去锚点(/zh-Hans/docs/whats-new、/zh-Hant/docs/whats-new),en 侧不动。

全仓同类扫尾(只报不改)

按裁定第 3 条做了一次全量抽检:解析 content/docs 下所有带锚点的站内链接,用 github-slugger 算目标页每个标题的 slug 比对。其它链接形式(href=、reference-style 链接定义、fumadocs Card 的 url=、content/blog)实测零命中,内联 markdown 链接即全集。

main 上 36 条带锚点站内链接,22 条悬空。本 PR 修掉其中属于两单的 5 条;其余 17 条已另开 #866 记录,含逐条的「链接位置 / 锚点 / 目标标题 / 实际 slug」表和三类新成因(emoji 标题产生前导连字符的 slug、标题后来加了后缀、zh 页沿用英文锚点)。本 PR 后:

before: total anchored internal links: 36; dangling: 22
after : total anchored internal links: 32; dangling: 17
✓ content/docs/service/sla-and-escalation.mdx:128 /docs/administration/automation#flows-multi-step

(32 = 36 − 4,因为 4 条 zh 链接去掉了锚点、1 条 en 链接换了锚点。)

顺带记一条:.github/workflows/link-check.yml 配的是 file-extension: '.md',而 content/docs 全是 .mdx —— 这个 workflow 对产品文档实际是空转的,所以这批悬空锚点在 CI 里从来没有信号。已写进 #867。

守卫能力单已另立 #867(不带标签、不指派,交 PM 分级):记录四种已证成因、现有门禁为何都抓不到、以及 #749 评论建议的「链接语言前缀一致性」检查(本轮扫尾该类零命中,属防复发而非修存量,已在单里注明以免定级虚高)。按裁定本 PR 不加测试。

验证

worktree hotcrm-issue-749,共享锁 + NODE_OPTIONS=--max-old-space-size=4096:

VALIDATE_EXIT=0    ⚠ 5 author-time warning(s) —— 均为 main 上既有(approval 空审批人 ×4、campaign_member field-group ×1)
TYPECHECK_EXIT=0   tsc --noEmit
LINT_EXIT=0        objectstack lint --skip-i18n
HYGIENE_EXIT=0     ✓ no raw control bytes in first-party files
BUILD_EXIT=0       ✓ Build complete (1688ms) — 17 Objects / 24 Flows
TEST_EXIT=0        Test Files 66 passed (66) · Tests 1587 passed | 1 skipped (1588)

test 里 source-hygiene 元测试打印的 ✗ source hygiene: scanned director(y|ies) missing: .changeset 是该用例的预期 stderr,不是失败(TEST_EXIT=0)。

控制字节自扫(5 个改动文件 + changeset)零命中:

grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]' ... → exit 1(无匹配)

changeset:.changeset/dangling-anchors.md('hotcrm': patch),站内路径一律反引号写(#797)。


Generated by Claude Code

sla-and-escalation linked /docs/administration/automation#case-escalation in
all three locales, but the automation page has no "Case Escalation" heading —
"Case Escalation Process" is a row in the table under "## Flows (multi-step)".
English now links #flows-multi-step; the Chinese pages drop the anchor because
their heading is 流程(多步骤)/ 流程(多步驟), whose slug differs.

guides/mobile in Chinese linked whats-new#roadmap while the translated heading
is 路线图 / 路線圖 — heading translated, anchor not. Both drop the anchor,
matching PR #755 / #762. English keeps #roadmap, which resolves.
@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:03am

Request Review

@yinlianghui
yinlianghui marked this pull request as ready for review August 6, 2026 01:07
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 6, 2026
Merged via the queue into main with commit 9e151de Aug 6, 2026
9 checks passed
yinlianghui added a commit to yinlianghui/hotcrm that referenced this pull request Aug 10, 2026
…ach (objectstack-ai#881) (objectstack-ai#893)

The closing paragraph of the *Sharing* section on
`content/docs/revenue/contracts.mdx` was rewritten in objectstack-ai#699 (0899b4f) against
the reach measured in objectstack-ai#694: neither route an admin can take actually delivers
"contracts follow the account" today — a sharing rule on Contract widens the
records it matches for every holder of the object, and a Controlled-by-Parent
OWD derives org-wide in this release, the parent link not being consulted per
caller. That commit touched the English page only. Both Chinese pages stayed on
the pre-correction text, which said the two routes merely "open contract
visibility to every user of the object" and omitted the conclusion the
correction exists to deliver.

`contracts.zh-Hans.mdx` and `contracts.zh-Hant.mdx` now carry the same three
facts as the English page, and cite the *Controlled by Parent, in practice*
section by its translated heading — “由父级控制”在实践中 /
「由父層控制」在實務中 — on top of the page-level link they already had. No new
anchor link: the translated headings do not slugify to the English anchor, so
the zh pages keep the un-anchored form used since objectstack-ai#868, and the English page
cites that section as plain text as well.

Translation only — no new assertion beyond what the English page states. No
English page, metadata, profile, sharing-rule or OWD change; the reach being
described stays pinned by `test/parent-derived-reach.test.ts`. The first two
bullets of the same section, rewritten in objectstack-ai#878, are untouched.

Fixes objectstack-ai#881

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