docs(app-shell): 两个 AppContent 路由测试的生产端叙述改写为「历史 + 现状」两段 (#3749) - #3860
Merged
Conversation
三处注释以现在时枚举「侧边栏 / QuickActions 现在发哪些 URL」,而这些 URL 已被 #3660(`sys-datasources`)与 #3739(`sys-objects` + 首页 Manage Objects 卡片)改指 metadata-admin 引擎的规范路由。断言全部正确且全绿 —— 陈旧的只有叙述,以及两个以 生产端命名的 `it` 标题:它们实际量的是别名路由仍能解析且只跳一次。 手法照 #3666:每处拆成「#3610 当时如此」(过去时)与「#3660/#3739 之后如此」 (现在时)两段,现状段正面陈述两条别名今天的身份 —— 不再是任何导航的目标,而是 书签与外部链接的到达路径,这正是重定向必须继续工作的理由。按 #3656,现状段不靠 「不再指向 X」的否认句复述别名 URL。 - `AppContent.noAppComponentRoutes.test.tsx`:头注拆段;两个 `it` 标题从 `sys-datasources:` / `sys-objects:` 改为 `shell alias:` / `host alias:`,即两条 别名各自的改写者(shell 自己的 `LegacyMetadataRedirect` vs 宿主的 `MetadataRedirect`)—— 文件正文本来就画了这条区分。用例体内两处重申同一陈旧 断言的行内注释同步(`sys-datasources` item still points straight at this spelling / this case now measures what production actually does),否则改完标题 的文件会自相矛盾。顺带把同一段落里 `isMetadataRoute` 的现在时「substring test」 收敛为过去时 —— #3638 起它是 `pathSegments.includes('metadata')` 段测试。 - `AppContent.pseudoRouteSegments.test.tsx`:生产端表格按实读重写(逐条读自 `AppSidebar` / `UnifiedSidebar` / `QuickActions` / `HomePage` / `InboxPopover`), 并补一段说明两条旧拼写并未消失,只是从 `navigation` 行移到了上面两行的到达面。 `metadata` 两种拼写下都是完整路径段,所以本文件要证伪的论断不受影响。 - `AppContent.tsx`(#3610 那段):收尾句补上 #3739 也已重指,并注明 `sys-objects` 的链路早在 #3658 就离开了这两条路由。该段前半的过去时叙述保留。 零行为改动:两个测试文件跑前跑后同为 43 passed,断言与用例数未动。 无 changeset —— 注释-only,照 #3666(bd04651)与 #3785(f9d70a7)先例。 Fixes #3749
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
CI 的 Changeset Declaration 门(scripts/check-changeset-presence.mjs)守的是 「fixed 组内任一包的 `<pkg>/src/**` 被改动 -> 必须有 `.changeset/*.md` 声明」, 本次三个改动文件全部落在 packages/app-shell/src 下,所以门要求声明。 先前照 #3666(bd04651)与 #3785(f9d70a7)判断「注释-only 不带 changeset」是 读错了先例:那两个 PR 早于这道门(#3387 引入),且 #3785 只动 content/docs/**, 根本不在守护面内。门自己写明了正确出口 —— 「If this change really should release nothing, say so — that is a pass, not a workaround」,即空 frontmatter,照 .changeset/registry-inputs-spec-parity-gate-3797.md 的先例写法。 空 frontmatter 而非 patch:AppContent.tsx 只改 JSX 注释,两条 LegacyMetadataRedirect 路由声明与其余每一行代码未动;两个测试文件断言与用例数 逐字节未变(前后同为 43 passed)。确无可发布的行为改动。 本地验证: node scripts/check-changeset-presence.mjs -> exit 0(识别为空 frontmatter 豁免) node scripts/check-changeset-no-major.mjs -> exit 0
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
1 similar comment
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Collaborator
Author
yinlianghui
marked this pull request as ready for review
August 8, 2026 22:13
This was referenced Aug 8, 2026
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 #3749
纯注释 / 标题改写,零行为改动。三处叙述以现在时枚举「侧边栏 / QuickActions 现在发哪些 URL」,而这些 URL 已经被 #3660 与 #3739 改掉了。
前提复核(动笔前,
origin/main@c32323e1e)前提仍活,两条都逐一核过:
AppSidebar/UnifiedSidebarsys-datasources/apps/setup/metadata/datasourced2fd044b7)AppSidebar/UnifiedSidebarsys-objects/apps/setup/metadata/objectQuickActions"Manage Objects"/apps/setup/metadata/object而
AppContent.noAppComponentRoutes.test.tsx:8-14仍写着sys-datasources -> …/component/metadata/resource?type=datasource、sys-objects -> …/system/metadata/object,并以现在时说「侧边栏 offers two entries」。下一个按 grep 找生产端的 agent 会把它读成现状 —— #3661 / #3669 已经为同一族转写付过一次真实代价。手法(照 #3666)
每处拆成两段:「#3610 当时如此」(过去时)+「#3660 / #3739 之后如此」(现在时)。现状段正面陈述两条别名今天的身份 —— 不再是任何导航的目标,而是书签、外部链接、以及宿主自己的别名路由所对应的到达路径,这正是重定向必须继续工作的理由。按 #3656,现状段不靠「不再指向 X」这类否认句复述别名 URL(那会让针对 X 的 grep 继续命中改写本想清掉的那一条)。
三处改动
1.
packages/app-shell/src/console/__tests__/AppContent.noAppComponentRoutes.test.tsx## The defect->## The defect, as it stood at objectui#3610(整段转过去时),新增## What those two URLs are NOW (objectui#3660, #3739)。it标题从生产端名改为它们真正所量的东西,并按各自的改写者区分 —— 这条区分文件正文本来就画了(「the alias here is the ENTRY」 vs 「rewritten by the HOST」):sys-datasources: …renders the resource page->shell alias: …resolves in the zero-app branch and hops ONCE to the canonical pagesys-objects: …reaches this branch's metadata/:type in ONE hop->host alias: …(同句尾)systemRoutesStub的「thesys-objectsleg」-> 「thesystem/metadata/:typeleg」;app-shell 测试里的 MetadataRedirectStub 在 PR #3658 后不再是逐字转录,sys-objects 用例测的是生产中已不存在的链路(绿得没有意义) #3661 那段的「thesys-objectscase」-> 「thesystem/metadata/objectcase」(标题改名后原引用会悬空)。2.
packages/app-shell/src/console/__tests__/AppContent.pseudoRouteSegments.test.tsx:41-46生产端表格按实读重写(逐条读自
AppSidebar/UnifiedSidebar/QuickActions/HomePage/InboxPopover,顺带把QuickActions与HomePage/InboxPopover拆成两行 —— 它们发的不是同一组 URL),并补一段说明两条旧拼写并未消失,只是从navigation行移到了上面两行的到达面(shell 的component/metadata/{directory,resource/*}、宿主的system/metadata{,/:type})。metadata在两种拼写下都是完整路径段,所以本文件要证伪的论断不受这次搬家影响 —— 这一点在文中写明,免得下一个读者以为表格换了就得重跑结论。3.
packages/app-shell/src/console/AppContent.tsx:645-661(#3610 那段)收尾句从「#3660 re-pointed it anyway」补成 #3660(
sys-datasources)与 #3739(sys-objects+ 首页卡片)都已重指,并注明sys-objects的链路早在 #3658 就离开了这两条路由。该段前半的过去时叙述原样保留,两条Route声明与其余每一行代码未动。越出 issue 字面范围的两小处(同文件、同一缺陷,都已在上面列出)
按范围纪律说明,不是夹带:
:273-276「the zero-app fallback sidebar'ssys-datasourcesitem still points straight at this spelling」;:304-307「this case now measures what production actually does」)。只改标题、留着正文两行继续断言同一件已不成立的事,文件会自相矛盾 —— 改名后的标题反而变得更难读。isMetadataRoute的现在时「substring test (pathname.includes('/metadata'))」。console: isSystemRoute / isMetadataRoute 的子串判断把 /apps/未知app/system_log 认成伪路由,静默回退渲染另一个 app #3638 起它是pathSegments.includes('metadata')段测试(AppContent.tsx:198),同属「现在时叙述被后续 PR 证伪」,且就在被转成过去时的那一句里;不动它会在同一段落留下一个新的时态矛盾。Changeset:空 frontmatter(第二个 commit)
第一版漏了 changeset,CI 的 Changeset Declaration 门直接红,已修。记一笔为什么漏,因为这是个可复用的读错先例:
我照 #3666(
bd04651ee,同族 docblock 改写)与 #3785(f9d70a72e,docs-only)判断「注释-only 不带 changeset」。两条先例都不适用 —— #3666 早于这道门(#3387 引入),#3785 只动content/docs/**,根本不在守护面内。而本次三个文件全在packages/app-shell/src下,正是scripts/check-changeset-presence.mjs从.changeset/config.json的fixed组推导出来的守护面。门自己写明了正确出口,不是绕路:「If this change really should release nothing, say so — that is a pass, not a workaround」。故
.changeset/appcontent-route-test-headers-3749.md用空 frontmatter,写法照.changeset/registry-inputs-spec-parity-gate-3797.md先例。空而非patch:确无可发布的行为改动(见下)。验证
改动前后同一命令、同一结果 —— 断言与用例数零改动:
改名后的两个用例确实在跑(verbose,非空跑过):
全仓类型检查(CI 同命令):
Changeset 两道门(本地):
控制字符自查:四个改动文件
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]'零命中(CI Control Byte Scan 亦 green)。未触碰content/docs/releases/**。