Skip to content

Commit ee11fce

Browse files
docs(qa): first-screen LCP item for core feature ux 6, with its baseline (#37398)
<!-- claude-projects-attribution: {"github_login":"huangyiirene"} --> _Requested by **Irene** · [project thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67x8Be2AAcUBhodBsvnWLd3Xs)_ Fixes #35212 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户无感:平台测试清单里新增一条测试项,检查首页、对象列表页和记录页的首屏加载时间是否在 2.5 秒以内。 - 为什么做:北极星核心功能与测试清单对齐专题的最后一项,即页面首屏加载时间,按已定的阈值写成可执行的测试项。 - 出错会怎样:只改测试清单,不碰产品代码;测试项写错可以直接改或撤回,不影响任何用户。 - 要你做什么:基线读数显示三个页面都超过 2.5 秒,需要你决定是否另开提速工作。 ## What changes One item appended to `docs/qa/platform-checklist/areas/ux-conventions.json`, authored through `checklist-author` against the README's item anatomy: `ux-conventions.first-screen-lcp`, `active`, P1, browser. No other file changes. It closes the ux 6 row of PR #37165's mapping ("gap, out of scope here: not a checklist capability until a threshold exists"), now that ruling 7178954860 sets the threshold. The item encodes the ruling as written, no stricter and no looser: - **Threshold:** LCP at most 2.5 s, as a per-page clause (median of 5 at or below 2500 ms). - **Conditions:** signed in, cold cache, Lighthouse's desktop preset as shipped (about 10 Mbps, 40 ms RTT, no CPU throttle, a desktop viewport). Lighthouse's default storage reset before each run clears the HTTP cache, cache storage and service workers, and keeps cookies and localStorage. So every run is on a cold cache and signed in. - **Reading:** the median of 5 runs on each of home (`/_console/home`), an object list (`/_console/apps/showcase_app/showcase_task`) and a record page (`.../showcase_task/record/:id`). - **Before it gates:** the baseline reading is taken in this PR and recorded in the item's `history` (revision 1). Two more clauses keep a run honest. Each scored run must measure the page itself, signed in, with nothing served from cache. And the `configSettings` block must show the desktop profile. Traps: `stale-console-bundle`, `first-boot-cold-start`. One new anchor, `ui/apps/console/src/App.tsx#App`, which resolves. ## Baseline reading | | | |:--|:--| | Commit measured | `db77cc493a` (main; the item commit `93707e6ed9` changes only the ledger) | | App | showcase, `OS_PORT=38517 pnpm dev -- --fresh -p 38517`; workspace built from that tree and the Console rebuilt from it (`pnpm console:build`) | | Signed in as | the dev admin the fresh boot seeds, through the Console login form; the session held for every run (final URL never `/login`) | | Tool | Lighthouse 13.6.0, node API, `core/config/desktop-config.js`, performance category only | | Profile | formFactor desktop, throttlingMethod simulate, rttMs 40, throughputKbps 10240, cpuSlowdownMultiplier 1, 1350x940, disableStorageReset false | | Browser | Chrome for Testing 158.0.8127.36, `--headless=new --no-sandbox`, 4-core container | | Page (final URL) | LCP per run, ms | Median | At most 2500 ms? | |:--|:--|--:|:--| | home, lands on `/_console/apps/com.example.showcase/page/showcase_capability_map` | 3516, 3557, 3513, 3602, 3624 | **3557** | no | | object list, `/_console/apps/com.example.showcase/showcase_task` | 4625, 4585, 4554, 4661, 4663 | **4625** | no | | record page, `/_console/apps/com.example.showcase/showcase_task/record/-2h3N6M1Mg033IU4` | 4264, 4175, 4111, 4221, 4132 | **4175** | no | The LCP element was real page content on every run: the capability map's intro text box, a cell of the task grid, and the record's title heading. FCP was about 330 ms on every page. **This is a headless container reading, not desktop Chrome on real hardware.** Lighthouse simulates the network leg. The CPU leg is this container's, and nothing else held the verify lock while it ran. For context only (not the item's reading), Lighthouse's observed, unthrottled localhost LCP medians were 2043 / 2706 / 2582 ms. The pages transfer about 2.0 to 2.5 MB of brotli-compressed script across 150 to 239 script requests, which by itself takes about 2 s at 10 Mbps. ## Tests No ablation: the diff changes no tested behaviour (ledger content only). <details><summary>check:platform-checklist, before (main db77cc4) and after (93707e6)</summary> Both runs exit 1 with the same single problem, which is inherited from main and outside this diff: ```text check-platform-checklist: 1 problem(s) ✗ areas/automation.json: ABSENT SYMBOL — `ui/packages/app-shell/src/views/studio-design/FlowItemMoreMenu.tsx#FlowItemMoreMenu`: `FlowItemMoreMenu` is not declared in ... ``` All four self-tests pass on both runs (checklist-select 45 cases, qa-rollup 82, retest-owed 57, check-platform-checklist 265). The new item adds no problem. `--anchor-census` reads 1800/1811 resolved on main and 1801/1812 after this change, so the one new anchor resolves. `checklist-select ux-conventions.first-screen-lcp` resolves 1 runnable item. </details> <details><summary>Derived gate families (dispatch-gates --commands, 17), run locally at 93707e6</summary> 16 exit 0: check-adr-links (and --self-test), check-closing-keyword-parity (and --self-test), check-comment-mask-corpus, plan-test-core-shards --self-test, lint check:doc-formula-expressions, check:adr-anchors, check:ci-filter-parity, check:cross-package-test-inputs, check:doc-authoring, check:driver-memory-census, check:gitlink-declared, check:nul-bytes, check:refd-timer-probe, check:watch-hint-literal. check:platform-checklist exits 1 only on the inherited problem above. `dispatch-gates --ran`: 17 of 17 accounted for. `overlap-check`: clean, exit 0. </details> ## Acceptance notes - The baseline fails all three page clauses: medians 3557 / 4625 / 4175 ms against 2500 ms. The item is `active` with steps, like the eight active items of #37165. Its first run will score those clauses FAIL until the pages get faster. No speed-up card is filed from this PR. That call belongs to the seat. - "home" on the showcase redirects to the app's home page (the capability map), not a console Home page. The item asks the run to record the URL it lands on. - The persona is the seeded dev admin, a platform admin. The ruling says only "logged in", and the stock boot provisions no member persona. ## Verification Read first: the new item at the end of `areas/ux-conventions.json`, especially its `negative` and `knownGaps` (what a run must not score, and the headless caveat). Two-minute check: `node scripts/checklist-select.mjs ux-conventions.first-screen-lcp` in the branch. Expect `1 runnable item(s)`, `P1 browser ux-conventions.first-screen-lcp`. --- _Generated by [Claude Code](https://claude.ai/code/session_01J8VVAjMMU8pcMXmiLEMMG4)_ Claim for this branch: card comment 7180384719 (re-posted, so check:closing-target-claim reads it; the earlier claim 7140622994 named the first branch, merged as #37165). 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- signed: repo:objectstack#2 · huangyiirene · session_01J8VVAjMMU8pcMXmiLEMMG4 --> Co-authored-by: Claude <noreply@anthropic.com>
1 parent da7c559 commit ee11fce

1 file changed

Lines changed: 84 additions & 0 deletions

File tree

‎docs/qa/platform-checklist/areas/ux-conventions.json‎

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,90 @@
556556
"ref": "#35212"
557557
}
558558
]
559+
},
560+
{
561+
"id": "ux-conventions.first-screen-lcp",
562+
"title": "Common pages paint their first screen within 2.5 s: signed in, on a cold cache, in desktop Chrome under Lighthouse's desktop profile, the median Largest Contentful Paint of 5 runs is at most 2.5 s on each of home, an object list and a record page",
563+
"since": "v18",
564+
"status": "active",
565+
"revision": 1,
566+
"priority": "P1",
567+
"surface": "browser",
568+
"personas": [
569+
"a signed-in user on desktop Chrome (on a stock showcase boot, the dev admin the boot seeds)"
570+
],
571+
"fixtures": {
572+
"app": "showcase",
573+
"requires": [
574+
"a showcase boot of the tree under test, with the Console rebuilt from it (`pnpm build`, then `pnpm console:build`): /_console/ serves the copy in packages/console/dist, so an older Console build measures an older Console",
575+
"Lighthouse run with its desktop preset (`lighthouse --preset=desktop`, or its node API with `lighthouse/core/config/desktop-config.js`) against a Chrome whose session signed in before the measured navigation (attach with `--port`)",
576+
"one showcase_task record id, read over REST (`GET /api/v1/data/showcase_task?limit=1`)"
577+
],
578+
"knownGaps": [
579+
"a container run measures headless Chrome for Testing on the container's CPU, not desktop Chrome on real hardware. The preset simulates the network leg (simulated throttling), but the CPU leg is the host's own. The run records which kind of reading it took (browser build, headless or not, host)"
580+
]
581+
},
582+
"steps": [
583+
"boot the showcase and wait for the server's ready line before the first probe (trap first-boot-cold-start)",
584+
"in the Chrome that Lighthouse attaches to, sign in through the Console login form at /_console/login; confirm the session holds (the Console's localStorage auth token and the better-auth.session_token cookie)",
585+
"name the three pages: home, /_console/home (record the URL it lands on: on the showcase it redirects to the app's home page); an object list, /_console/apps/showcase_app/showcase_task; a record page, /_console/apps/showcase_app/showcase_task/record/:id with the id read over REST",
586+
"for each page run Lighthouse 5 times with the desktop preset as shipped (performance category; storage reset left on, its default). Before each run the reset clears the HTTP cache, cache storage and service workers and keeps cookies and localStorage, so each run is on a cold cache and signed in",
587+
"from each run read audits['largest-contentful-paint'].numericValue, finalDisplayedUrl, the LCP element (the node in audits['lcp-breakdown-insight']) and configSettings; take the median of the 5 values for each page"
588+
],
589+
"acceptance": [
590+
{
591+
"clause": "every scored run measured the page itself, signed in, on a cold cache",
592+
"oracle": "screenshot",
593+
"verify": "the run's final screenshot and finalDisplayedUrl show the requested page, not /login or a loading screen; the LCP element is page content; the page's script requests have transferSize above 0 (fetched over the network, not from cache)",
594+
"evidence": "per run: finalDisplayedUrl and the LCP element; one Lighthouse JSON report per page"
595+
},
596+
{
597+
"clause": "the run profile is Lighthouse's desktop profile: about 10 Mbps, 40 ms RTT, no CPU throttle, a desktop viewport",
598+
"oracle": "test",
599+
"verify": "configSettings reads formFactor desktop, throttling.rttMs 40, throttling.throughputKbps 10240, throttling.cpuSlowdownMultiplier 1, screenEmulation.mobile false, disableStorageReset false",
600+
"evidence": "the configSettings block, the Lighthouse version and the Chrome version"
601+
},
602+
{
603+
"clause": "home: the median LCP of 5 runs is at most 2.5 s",
604+
"oracle": "test",
605+
"verify": "the median of the 5 largest-contentful-paint values is 2500 ms or less",
606+
"evidence": "the five values and their median"
607+
},
608+
{
609+
"clause": "an object list: the median LCP of 5 runs is at most 2.5 s",
610+
"oracle": "test",
611+
"verify": "the median of the 5 largest-contentful-paint values is 2500 ms or less",
612+
"evidence": "the five values and their median"
613+
},
614+
{
615+
"clause": "a record page: the median LCP of 5 runs is at most 2.5 s",
616+
"oracle": "test",
617+
"verify": "the median of the 5 largest-contentful-paint values is 2500 ms or less",
618+
"evidence": "the five values and their median"
619+
}
620+
],
621+
"negative": [
622+
"a median above 2500 ms on a page is a FAIL for that page's clause. One run above 2500 ms is not a FAIL when the median of the 5 runs is at or below it",
623+
"a run whose final URL is the login page, or whose LCP element is the sign-in form or a loading screen, measured something else: discard it and run again, never score it",
624+
"a reading under the default mobile preset, with a CPU slowdown added, or on a warm cache is not this item's reading. The threshold holds only under the conditions above"
625+
],
626+
"traps": [
627+
"stale-console-bundle",
628+
"first-boot-cold-start"
629+
],
630+
"source": [
631+
"docs/NORTH-STAR.md, Product areas, area:ux core feature 6: common pages paint their first screen within an acceptable time",
632+
"#35212, maintainer ruling 7178954860: LCP ≤ 2.5 s; cold cache, logged in, desktop Chrome, Lighthouse desktop profile (about 10 Mbps / 40 ms RTT, no CPU throttle); the median of 5 runs on each of home, an object list and a record page; a baseline reading before it gates",
633+
"ui/apps/console/src/App.tsx#App (the /home and /apps/:appName/* routes the three pages load through)"
634+
],
635+
"history": [
636+
{
637+
"revision": 1,
638+
"date": "2026-11-26",
639+
"change": "initial — maps North Star core feature ux 6 to an item under ruling 7178954860. Baseline reading, the ruling's precondition before the item gates, taken at db77cc493a: a fresh showcase boot (`pnpm dev -- --fresh`, Console built from the same tree), dev admin signed in, Lighthouse 13.6.0 node API, desktop preset (simulated throttling, rttMs 40, throughputKbps 10240, cpuSlowdownMultiplier 1, 1350x940), 5 runs per page. LCP ms: home 3516, 3557, 3513, 3602, 3624 (median 3557); object list 4625, 4585, 4554, 4661, 4663 (median 4625); record page 4264, 4175, 4111, 4221, 4132 (median 4175). All three medians are above 2500 ms. Headless Chrome for Testing 158 in a 4-core container, not desktop Chrome on real hardware",
640+
"ref": "#35212"
641+
}
642+
]
559643
}
560644
]
561645
}

0 commit comments

Comments
 (0)