Skip to content

feat: improve Dartdoc HTML migration lane#702

Open
shczhen wants to merge 10 commits into
codex/html-migration-iosfrom
codex/html-migration-dartdoc
Open

feat: improve Dartdoc HTML migration lane#702
shczhen wants to merge 10 commits into
codex/html-migration-iosfrom
codex/html-migration-dartdoc

Conversation

@shczhen

@shczhen shczhen commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #696.

Implements the Flutter/Dartdoc generated HTML migration lane as a semantic renderer stacked on the TypeDoc base branch:

  • enables the Dartdoc lane semantic renderer
  • renders Dartdoc library, class, enum, member, relationship, signature, parameter, inherited marker, anchor, and implementation sections as Fumadocs-safe MDX
  • builds the Dartdoc TOC from index.json, keeping primary library/class/enum/etc. entries in meta.json while writing member detail pages as hidden routes for stable link rewrites
  • filters helper pages such as __404error.html, flutter_main_page.html, and library-index.html out of primary navigation
  • rewrites internal .html and .html#anchor links to migrated routes
  • strengthens the Dartdoc fixture to cover real index.json navigation, helper filtering, class/member rendering, hidden member routes, parameter tables, and implementation blocks

Verification

  • bun x biome format --write scripts/html-to-md-migration.mjs scripts/html-to-md-migration.test.ts scripts/html-migration
  • node --check scripts/html-to-md-migration.mjs
  • bun run test scripts/html-to-md-migration.test.ts
  • bun x biome check scripts/html-to-md-migration.mjs scripts/html-to-md-migration.test.ts scripts/html-migration
  • bun run types:check
  • Dartdoc dry-run: node scripts/html-to-md-migration.mjs --source /Users/czhen/Documents/GitHub/AgoraIO/shengwang-doc-source/html-docs/agora-chat/Flutter --output /tmp/check-dartdoc-agora-chat-dry --product agora-chat --platform flutter --route-base-path /zh-CN/api-reference --dry-run
  • Dartdoc full generation: node scripts/html-to-md-migration.mjs --source /Users/czhen/Documents/GitHub/AgoraIO/shengwang-doc-source/html-docs/agora-chat/Flutter --output /tmp/check-dartdoc-agora-chat-full --product agora-chat --platform flutter --route-base-path /zh-CN/api-reference
  • DITA non-regression dry-run: node scripts/html-to-md-migration.mjs --source /Users/czhen/Documents/GitHub/AgoraIO/shengwang-doc-source/html-docs/rtc/Android --output /tmp/check-dita-rtc-android-dartdoc-branch --product rtc --platform android --route-base-path /zh-CN/api-reference --dry-run

bun run test still fails on existing baseline failures outside this change: legacy sitemap audit count/stale-rule expectations, DocsShell.test.tsx mobile section menu expectation, and docs content regression expectations.

Stacking

Base: codex/html-migration-typedoc / PR #698.

@shczhen
shczhen force-pushed the codex/html-migration-dartdoc branch from 12035e6 to a4d8139 Compare July 9, 2026 09:15
@shczhen
shczhen changed the base branch from codex/html-migration-typedoc to codex/html-migration-ios July 9, 2026 09:15
@shczhen
shczhen force-pushed the codex/html-migration-ios branch from 70fc6b3 to e484a4b Compare July 9, 2026 09:24
@shczhen
shczhen force-pushed the codex/html-migration-dartdoc branch from a4d8139 to 6c8eff6 Compare July 9, 2026 09:24
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Vercel Preview

Preview URL: https://docs-portal-n6xs06vyy-agora-devx.vercel.app

@shczhen

shczhen commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

Issue #762 已修复:Dartdoc 根页改为基于 index.json 的 canonical library landing,Agora Chat Flutter 中文标题/描述和 navScope 已生成;英文 quickstart 不再进入 API 根页。迁移测试 12/12、真实 817 文件生成通过。该 lane 保持 inactive,未扩入 PR #712

@shczhen

shczhen commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

对应 #773 的根因修复已推送:2f74c23ac。新增 cheerio 根级直接开发依赖;干净 frozen install、真实 Dartdoc dry-run(817 个文件)及迁移测试 12/12 均通过。请 doc team 继续测试,PR 不合并。

@shczhen
shczhen force-pushed the codex/html-migration-ios branch from f58a5e3 to a0b1c66 Compare July 14, 2026 05:29
@shczhen
shczhen force-pushed the codex/html-migration-dartdoc branch 2 times, most recently from 2f74c23 to dafbc8d Compare July 14, 2026 05:29
@shczhen

shczhen commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

已将本 stacked PR 重放到当前 #701 head,消除父分支冲突;当前 head dafbc8d97,merge state CLEAN。验证:28/28 迁移测试、类型检查、Biome、真实 Dartdoc 817-file dry-run 通过。未合并,继续供 doc team 测试。

@shczhen

shczhen commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

Issue #780 已在本 PR 修复(0b5d96d40):Dartdoc 迁移现在会幂等补齐并登记产品级/Reference 导航 meta,使局部 navScope 能被页树解析。迁移测试 29/29、类型检查、Biome、脚本语法检查通过,待文档团队复测。

@shczhen

shczhen commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

#792/#793 更新:#792 同源重跑 816 个 Dartdoc MDX,正文 H1=0,重复来自旧 baseline DocsShell;#793 已在 c88173b 根修复 hidden method 的最近 Flutter scope 继承,隐藏 method 不进入侧栏。专项 7/7、types 与双轴审查通过,待文档团队复测。

@shczhen

shczhen commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

#799 已在本 PR 原分支修复(c7a079181):Dartdoc 签名、定义和 Implementation 统一显示 Dart 标题,并覆盖 Gradle/Text fallback。迁移测试 29/29、types、Biome 通过,待文档团队复测。

@shczhen

shczhen commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

#805 复核结论:本 PR 当前生成器已包含 #762 的正确 Dartdoc 根页/导航修复,问题出在汇总 PR #712 未同步并且此前未发布真实生成内容。已在 PR #712cbe781dce 同步脚本,并以 5ce5337db 发布 canonical agora-chat/flutter 全量输出。未修改本 PR 之外的 lane,也未覆盖 /im/flutter 指南。

@shczhen

shczhen commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

Issue #809/#814 已在本 PR 修复并推送:b225278f7bbc9ff923。根因是 responsive shell 双挂载正文,不是 Dartdoc 生成内容;现在正文单挂载,并有 sendMessage method H1 唯一性回归。目标 2/2、迁移 29/29、DocsContent 48/48、types/Biome/diff check 通过,待文档团队复测。

@shczhen

shczhen commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

Issue #810/#815 已重新沿 #780/#793 修复链完整核对。本 PR 的 c88173b1c 已通用支持隐藏 method 通过最深 route-prefix 祖先继承 Flutter navScope,不会把 method 暴露到侧栏。聚合 PR #712 已用真实生成内容补测 canonical route、getPage、server payload 与局部侧栏,全部通过;本 PR 最新 head 仍保留该修复,待文档团队复测。

@shczhen

shczhen commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

Issue #819 已修复并推送:9f73a1a13。Dartdoc renderer 现在输出纯文本 heading,并把原链接保留为相邻独立 link,直接消除 Fumadocs permalink 造成的 nested anchor;迁移测试 29/29、types/Biome/diff check、双复核通过。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant