Skip to content

perf(app-shell): the form list's words load with the Studio list, not at boot - #38682

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-37444-form-list-i18n-off-first-load
Nov 30, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-37444-form-list-i18n-off-first-load

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread
Part of #37444
Clause-②: no
Metadata-protocol: none

维护者速读

What changes

  • ui/packages/app-shell/src/views/studio-design/publicForm/formListColumns.tsx no longer imports ../../metadata-admin/i18n.js statically. The form list's On cell loads the designer string table with React.lazy on first draw; the Studio list has already loaded that module by then, so it resolves at once.
  • services/builtinComponents.tsx still registers FORM_LIST_COLUMNS at boot, but the boot closure no longer reaches the metadata-admin i18n module, so the built Console's index.html no longer preloads i18n-ns-studio-en (70.8 KiB) or the metadata-admin i18n chunk (10.3 KiB): 134 modulepreloads, list 229 → 225 scripts before LCP.
  • Pin: ui/packages/app-shell/src/services/__tests__/builtinComponents.formListWordsOffBoot-37444.test.tsx — (1) the walk sees the edge it guards (ResourceListPage reaches the designer table); (2) builtinComponents.tsx reaches no designer table through static imports; (3) the On cell renders "On"/"Off" after the lazy load.
  • Changeset: patch, @object-ui/app-shell.

Tests

Head e1bbe0b8 (reworded to 394a0455 for the commit-trailer check; identical tree):

  • Under the lock: the new pin plus studio-design/publicForm and firstScreenStudioCatalogue-37444: 4 files, 54/54 passed; ui scripts/__tests__/check-i18n-call-site-keys.test.ts: 152/152 passed.
  • Ablation (scripts/ablation-replace.mjs): a static import { t } from '../../metadata-admin/i18n.js' put back into formListColumns.tsx turns case 2 red (1 failed, 2 passed); restored, blob == HEAD.
  • pnpm --filter @object-ui/app-shell type-check: exit 0. pnpm console:build: exit 0; index.html has no i18n-ns-studio or metadata-admin i18n chunk.
  • Browser, branch production build: /_console/studio/~all/metadata/form shows "On" for showcase_inquiry.contact and showcase_inquiry.feedback.

Measurement (production build, HTTP/2, Lighthouse desktop, ruling conditions)

One session, arms branch / base f5da514b / control 1afd9c13, 20 runs per arm per page; control list 2535.1 ms, inside the pre-set band, so scored; no block discarded.

page branch base branch − base
object list 2568.4 2583.4 −15.0 ms (p 0.54, 95% CI −60…+71)
record 2446.9 2434.3 +12.7 ms (p 0.81)

The cut restores the bytes but has no measurable LCP effect; the done-when stays unmet on the list. Readings and instrument: project folder card-37444/a-measure/recut/; report comment 7266607998 on #37444.

Verification

  • dispatch-gates --commands: 38 derived, 38 run, all exit 0 (ui scripts/ vitest re-run with --maxWorkers=2 after an OOM kill while measurement servers were up: 172 passed, 2 skipped). --ran: 0 NOT-MEASURED.
  • overlap-check.mjs: clean against origin/main; git merge-tree against origin/main at push: clean.
  • CI check-runs: read on this PR.

Files to read first: formListColumns.tsx (the lazy On cell). Two-minute check: open Studio → Forms list; the On column reads "On"/"Off".

🤖 Generated with Claude Code

https://claude.ai/code/session_01JQwxbamiNxp7695qyaEYsH

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 30, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxba2oTCUuCosPm6pkRu
2026-11-30T04:32Z · zone o2-U · L1 ACCEPT

速读

席位核对 — ACCEPT · Head-sha: 394a045

  • 形态: open · draft · base main · +135/−3 · 3 文件;首行 Part of #37444,无关闭词;Clause-②: no · Metadata-protocol: none;l1-face CLEAN(app-shell 判为未发布包,changeset 另给 @objectstack/console 记 patch,仓内有 5 个同写法先例);check-governed-merges:NOT governed,138 行。mergeable_state 暂为 unknown(main 前移);本地 merge-tree 对 4895661 干净。4 个提交改写前后树哈希逐一相同(e1bbe0b8 与 394a045 同为 43b7c664fa7a),说明只差 co-author 行。
  • 前提实测: 基线 f5da514 上 formListColumns.tsx 静态引入 metadata-admin/i18n.js;基线报告 M4-list-5 在首屏前抓取 i18n-ns-studio-en-z6eW3zLH.js(72,549 B)与 i18n-vLdoOp5h.js(10,592 B)。
  • 门禁 check-runs @394a0455: 38 success / 13 预期 skip / 0 failed;Lint & Repo Gates、TypeScript Type Check、Test UI、Check Changeset 均 success。
  • 抽查读数: formListColumns.tsx:45-54、:61-63:“开/关”单元格改为 React.lazy + Suspense。席位本地 4 文件 200/200,check:i18n-keys exit 0;还原到 f5da514 后 pin 第 2 例变红,已恢复。席位复建 console:build exit 0:index.html 134 个预加载,不含上述两个 chunk,两者仍在 dist/assets。由 rows.jsonl 重算中位数与正文、score.txt 一致:列表 −15.0 ms(p 0.5376,CI −60…+71),记录页 +12.7 ms;对照 2535.1 ms 在带内。正文写“无可测 LCP 效果”,changeset 只主张字节、不主张提速。
  • 接受的偏差: 测量跑在 ae46e3f6,最终 head 只改延迟单元格的调用方式(预加载结构席位复建确认相同);最终 head 的 ui scripts/ vitest 首次被 OOM 杀掉、以 --maxWorkers=2 重跑通过;首页未复测(修订 1 只要求列表);dev 速读“只快 15 ms”措辞偏松,本记录改写为“无可测变化”。
  • 范围外去向: 列表剩下的差距不在首屏字节,归 Console first screen: 1.1–1.8 s of main-thread script evaluation before LCP, mostly render work; cut first-render CPU #37575,以本次读数为基线。Skills-docs: none。
  • 落地条款: 发布冻结:保持 draft,不翻 ready、不入队。解冻后在当时 head 重核 check-runs 全绿 → ready → 入队(Tier S)。Part of 不关卡:合并后须手工摘 Console first screen: home, object list and record page miss the 2.5 s LCP threshold (baseline 3.6 / 4.6 / 4.2 s); re-measure on a production build first #37444 的 pm:dispatched 并落一态(落地细则 B)。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbamiNxp7695qyaEYsH
2026-11-30T07:34Z · zone o2-U · landing #37444 (Part of)

probe reading
check-runs @ 8460c0d87f 38 success · 13 expected skip · 0 failed · 0 pending
mergeable_state clean (origin/main merged in at this head, no conflict; same patch as the ACCEPT head, record 7268876093)

State: pr_ready + auto-merge (merge queue). Release freeze: exempt as in-development work (Warren 2026-11-30 07:08Z 「目前已经开发中的不用冻结」). check-governed-merges: NOT governed.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 30, 2026 07:34
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 46374852490 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (3/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/package-move-in.dogfood.test.ts > dogfood: POST /packages/:id/move-in, the move door (#38150) > A3 (#37468) and the set rule: flow, dataset and report
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: expected 404 to be 200 // Object.is equality
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 10 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

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

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants