Skip to content

perf(console): a full-page record open asks its page list and object scope beside the permission read, and the app bar package list after the page - #35987

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-joopl5
Nov 21, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-joopl5

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #35416

Clause-②: no
Metadata-protocol: none
Skills-docs: none — no authorable metadata changes (Metadata-protocol: none)

repo:objectstack#1 · os-sales · session_01L6bhgUVVocvc9dVySV9DVf

维护者速读

  • 用链接或刷新整页打开记录页时,记录页需要的页面清单和对象定义不再等权限接口返回之后才发,而是和权限接口同一批发出;托管环境上权限接口服务端要 3 秒多,这一段等待不再叠加在后面。
  • 管理员打开任何应用页时,3MB 的包清单(/api/v1/packages)不再和记录数据抢同一条连接:页面自己的请求安静 0.75 秒后才去取(最多等 8 秒)。代价是应用栏的「在 Studio 中编辑」铅笔/眼睛图标晚出现约 1 秒(取到之前本来就不显示)。
  • 出错时最坏情况是记录页打开速度回到改动前,或铅笔图标晚出现;不改任何接口和返回格式,可直接撤回。
  • 卡上第 3 项「先出页面外壳」另立 Opening a record page full-page: draw the app shell as soon as the session is confirmed, not after all metadata arrives #35981(等本 PR 合并);包清单瘦身或 ETag 要改接口,本 PR 已把它移出启动链,暂不立卡。

What changes

  • @object-ui/app-shell useAppObjectScopePrefetch (console/appObjectScope.ts), the console root's prefetch that mounts beside /auth/me/permissions: on a record route it now asks the page list (ensureType('page')) and hands readAppObjectScope the same page-list and bundle readers AppContent hands it. So the record route's /meta/page read and, under AppContent's own rule (objectstack#35455: not when the bundle answers a miss), the package object list (/meta/object?package=) leave as soon as the app list names the app. Before, the root passed no page-list reader, so on a record route both waited for AppContent, which mounts only after the permission read answers. AppContent reads the same entries and asks nothing twice. The page reader reads the provider's pages only when the record route asks (that getter starts the page list), so a list route asks no page list.
  • fetchSessionPackages (views/studio-design/packages-io.ts), the session-held read behind the app bar's and the sidebar's Studio entries (useStudioEntryGate, and fix(ui): a view a read-only package ships offers no footer calculation menu and no Rename #35975's menus when it lands): a read it starts now waits for whenQuiet(750, 8000), the page's counted requests (the data layer's settle signal) at zero for 750 ms, at most 8 s. A read already on the wire is joined at once, and a held list answers with no wait. Studio's own reads (fetchPackages, fetchListedPackageIds) are unchanged. The entries were already absent while the list was unread, and fix(ui): a view a read-only package ships offers no footer calculation menu and no Rename #35975 already fails open while unread, so nothing is drawn wrongly during the wait.
  • observability/settleSignal.ts: new whenQuiet(quietMs, maxMs). It resolves at once where no request was ever counted (no data layer wraps its fetch there, as in a host or a unit test without one). Not exported from the package entry.
  • /me/apps is not changed: it starts after the permission read, but nothing on a named app's record route waits for it (AppContent reads it only to pick a default app), as the waterfalls below show.

Read first (risk order):

  1. ui/packages/app-shell/src/console/appObjectScope.ts, useAppObjectScopePrefetch: the recordRoute effect and the readers passed to readAppObjectScope.
  2. ui/packages/app-shell/src/views/studio-design/packages-io.ts, fetchSessionPackages: the wait and the hold re-check after it.
  3. ui/packages/app-shell/src/observability/settleSignal.ts, whenQuiet.

Why

The card measured 5 serial segments on an older hosted build. On main the full-page record open is 4 waves: get-session → /auth/me/permissions (+ /meta/app, bundle) → /meta/page + /meta/object?package + /me/apps → POST /data/{object}/{id}/page. The third wave existed only because the root prefetch could not read a record route's page list. And /api/v1/packages (1.3 MB unpacked on the showcase, 3.2 MB on the hosted CRM) started about 80 ms before the record's own read, on the same HTTP/2 connection; the card measured it downloading for 6.3 s while the record's 3 KB answer arrived 4.5 s after the server finished it.

Verification

Before/after, the same record page (local, see the gap below)

examples/app-showcase (objectstack dev, seeded admin), behind a local HTTP/2 TLS proxy so the browser multiplexes like the hosted edge (a plain local dev server is HTTP/1.1 and its 6-connection cap adds a fake wave). Chromium 1280×800, zh-CN, JS cached, DevTools network throttling, 3 runs per row, full-page open of /_console/apps/com.example.showcase/showcase_project/record/<id>. Times in seconds from navigation start.

Profile page data POST sent /meta/page sent /api/v1/packages sent
600 ms RTT, 3 Mbps before 2.06 / 2.07 / 2.09 1.31 / 1.32 / 1.35 (after permissions) 1.98 / 2.00 / 2.02 (before page data)
after 1.75 / 1.79 / 1.85 0.70 / 0.73 / 0.78 (beside permissions) 3.45 / 3.45 / 3.47 (after the page)
300 ms RTT, 6 Mbps before 1.17 / 1.29 / 1.46 0.71 / 0.82 / 0.97 1.08 / 1.19 / 1.38
after 1.11 / 1.22 / 1.42 0.39 / 0.49 / 0.69 2.35 / 2.39 / 2.70
300 ms RTT, 1.5 Mbps before 1.21 / 1.29 / 1.36 0.75 / 0.85 / 0.87 1.13 / 1.22 / 1.26
after 0.92 / 1.12 / 1.37 0.41 / 0.49 / 0.62 2.44 / 2.52 / 2.63
  • /meta/page and the package object list now leave in the permission read's wave in every run, and /api/v1/packages leaves after the page's requests in every run, so it is no longer among the record page's boot requests (the card's acceptance).
  • The page data request leaves 0.2–0.3 s earlier at 600 ms RTT. It does not move a whole round trip locally: after the permission read answers, AppContent and the record page still render before the record's read can leave (0.4 s of client time in this container), and that render is what Opening a record page full-page: draw the app shell as soon as the session is confirmed, not after all metadata arrives #35981 is for. On the hosted environment the saved wave was 1.4 s (card segment 4).
  • ⚠ Gap: the hosted environment cannot be reached from this container, so these are local numbers, and DevTools throttling shapes each request alone: it does not reproduce two responses sharing one link's bandwidth, so the /api/v1/packages contention the card measured shows here only as the read moving after the page. A hosted before/after on the same record is owed once this is deployed.

Raw waterfalls (every request, start → end, bytes), the measurement script and the proxy: /mnt/project-files/build-seat1/35416/ in the project files (h2-{before,after}-{300,600,slow}.txt, summary.txt).

Tests

  • ui/packages/app-shell/src/console/__tests__/appObjectScope.rootRecordRoute-35416.test.tsx (new, 3 cases, real MetadataProvider, only the root prefetch mounted, every read held per wave): a record route asks the app list, then the page list and the package list together; CONTROL a bundle that is a miss starts the page list alone; CONTROL a list route asks no page list.
  • ui/packages/app-shell/src/views/studio-design/sessionPackagesAfterPageQuiet-35416.test.ts (new, 7 cases, fake timers, fresh modules per case): waits while a page request is in flight and then for the quiet window; a request inside the window restarts it; the 8 s cap; readers in one commit share one read; CONTROLs: nothing counted reads at once, a read on the wire is joined at once, a held list answers with no read.
  • Existing suites run locally and passing: console/__tests__/appObjectScope-12811.test.tsx (23), hooks/__tests__/navGateUnionScope-12980.test.tsx, observability/settleSignal.test.ts, hooks/useStudioDesignGate.sessionHold-29119.test.tsx. The whole @object-ui/app-shell package is left to CI's Test UI shards.
  • pnpm --filter @object-ui/app-shell type-check exit 0 (includes tsconfig.test.json). ESLint on the five files: 0 errors.
Ablations: each change reverted, its pin goes red
  1. appObjectScope.ts restored to main: the record-route case and the miss CONTROL fail (the root asks no page list); the list-route CONTROL passes. Restored, 3 pass.
  2. The await whenQuiet(…) line in fetchSessionPackages replaced by a no-op: the three waiting cases fail (the list is read at once); the four CONTROLs pass. Restored, 7 pass.

L1-b S2 (head 1e33395d): __resetSettleSignal now also clears the new counted flag, so a test that resets the signal gets whenQuiet's nothing-counted arm again. settleSignal.test.ts, the new 35416 test and RecordDetailView.namedRecordPage-12715.test.tsx (the reset's other caller) pass, 23/23.

Follow-ups

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (No packages/spec change.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; lint on the changed files passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset (.changeset/35416-record-open-boot-waves.md, patch), and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: not touched.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English (the 维护者速读 section is the maintainer's summary, as on the fleet's other PRs).

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgUVVocvc9dVySV9DVf

…scope beside the permission read, and the app bar's package list after the page

The console root's prefetch now starts a record route's /meta/page read and
the package object list (under AppContent's own rule) as soon as the app list
names the app, instead of when AppContent mounts after /auth/me/permissions.
fetchSessionPackages waits until the page's counted requests stay quiet for
750 ms (at most 8 s) before reading GET /api/v1/packages, so that response no
longer downloads beside the record.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUVVocvc9dVySV9DVf
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 21, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

席位核对 — ACCEPT (L1-b)

Head-sha: ac36606 · read 2026-11-21T04:53Z

维护者速读

  • 可以合:用链接或刷新整页打开记录页时,记录页要的页面清单和对象定义提前一批发出,不再排在权限接口后面;3MB 的包清单改成页面自己的请求都结束后再取,不再和记录数据抢带宽。
  • 代价有两处,都是「晚出现」,不会显示错东西。一是应用栏的「在 Studio 中编辑」图标大约晚 1 秒出现。二是只读包视图上,底部「计算」菜单和「重命名」会先出现约 1 秒再消失(fix(ui): a view a read-only package ships offers no footer calculation menu and no Rename #35975 的设计是包清单没取到时先放行)。这 1 秒内如果点了,服务器照旧拒绝并回滚。
  • 托管环境上的前后对比还没测:容器连不到托管环境,PR 里的数字是本地模拟的。卡的验收写的是「同一环境」,所以部署后要补测一次(见 S1)。

Must-fix

None.

Should-fix

Checked

  • l1-face on ac366063: clean (39 success, 13 expected skip, 0 failed, mergeable clean; @object-ui/app-shell is private and its changeset is present).
  • useAppObjectScopePrefetch: every hook (useMetadata, useBundledReads, useAdapter, useLocation, both effects) runs before the early return, so hook order is stable. The positional arguments to readAppObjectScope match its signature: no host paths (as before), no readPage, the same readPages closure AppContent passes, no readDashboard, and readObjectsReferencing from the bundle (falls back to BUNDLE_MISS with no bundle provider). The page-list getter runs only when the record route asks, so a list route asks no page list (pinned by the list-route CONTROL). ensureType('page') sits behind the same record-route test.
  • fetchSessionPackages: a held answer returns with no wait. A read already on the wire is joined with no wait (pendingPackageReads). After the wait the hold is checked again, so two callers that waited together still share one read through readPackagesPayload's own join (pinned: "readers in one commit share one read"). Studio's own fetchPackages / fetchListedPackageIds are not routed through the wait.
  • whenQuiet: the listener is removed and both timers are cleared on finish. A request starting inside the window restarts it; the 8 s cap holds on a page that never goes quiet. I looked for long-lived requests that would hold the count above zero: the counted fetches are the console's API fetch and i18n fetch, and no SSE or stream reader in app-shell, react or data-objectstack goes through them.
    • Note (not a defect): withSettleSignal ends the count when fetch resolves (headers), not when the body finishes. "Quiet" means no request is waiting for headers, so a large body can still be streaming at that moment. The 750 ms window covers the record's few-KB answer; the body's "no longer downloads beside the record" holds for that answer.
  • Overlap with fix(ui): a view a read-only package ships offers no footer calculation menu and no Rename #35975 (useStudioDesignGate.ts, not touched here): its menus fail open while the list is unread, so this PR lengthens that window rather than drawing anything wrong. The business cost is stated in the 速读 above.
  • Ablations named in the body: each change reverted turns its pin red, and the CONTROLs stay green.
  • Changeset: patch; its sentences match the diff.

Owed

  • Hosted before/after on the same record (S1).
  • L1 does not replace an L2.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

席位核对 — delta ACCEPT (L1-b)

Head-sha: 1e33395 · read 2026-11-21T04:57Z · delta from ac366063 (ACCEPT 7057554237)

维护者速读

Delta

Must-fix / Should-fix

None.

Owed

  • CI was running when I read this head (5 success, 20 pending, 0 failed). This L1 is final once CI is green on 1e33395d; no further read is needed for a green-only change.
  • L1 does not replace an L2.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Seat landing · 2026-11-21T05:16Z · Area b1-CX's PR for #35416 (items 1, 2 and 4; item 3 and the hosted re-measure are #35981, seat note 7057574117): opening a record page full-page starts the page's own reads earlier and takes /api/v1/packages off its boot path. The before/after numbers in the body are local and throttled. Clause-②: no, so no contract L2 is owed. L1-b ACCEPT 7057554237 on ac366063, and a delta ACCEPT 7057595334 on 1e33395d (this head). check-governed-merges --pr 35987 reads NOT governed (+361/−6). landing-k could not answer (no Test Core shard ran in the last green run), so the seat read K by hand: K = 8, and the PR touches neither translations/ nor skills/. On this head, 41 check-runs are success, 15 are skipped and none failed; mergeable clean. The seat readies this PR and arms auto-merge in the same step. The PR carries Fixes #35416.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 21, 2026 05:17
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 540022f Nov 21, 2026
57 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-joopl5 branch November 21, 2026 05:36
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
… session read, and the chrome no longer waits for the route's reads (objectstack-ai#36014)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuXu8529KKMpkikFhpmiBwMt)_

Part of objectstack-ai#35981

Clause-②: no
Metadata-protocol: none
Skills-docs: none — no authorable metadata changes (Metadata-protocol:
none)

repo:objectstack#1 · os-sales · session_01L6bhgWwKdjqiYQSujUXhn7

## 维护者速读

-
用链接或刷新整页打开任何应用页(记录页、列表页等)时,登录状态一确认,整屏的「正在打开你的控制台…」就换成控制台的空框架:顶栏、侧栏(宽度和用户上次留下的一样)、和页面形状一样的灰色骨架。本地测量:整屏启动画面从约
1.1 秒提前到约 0.4 秒消失;把权限接口模拟成托管环境的 3 秒时,从约 3.8 秒提前到约 0.4 秒。
-
骨架里不出现应用名称、图标、任何菜单项或按钮:这些要等应用列表、权限和管理员判定回来才知道,所以「闪一下别的应用」「闪一下没权限的菜单」「误跳转」都不会发生,判定的输入和时机与改动前完全相同。
- 记录内容出现的时间不变(本地约 1.5 秒,模拟 3 秒权限时约 4.2 秒),没有变慢;本 PR
只改「等待时看到什么」。数据本身更早发出要动权限前置读取,另议。
- 出错时最坏情况是骨架和真实框架之间有一次位置跳动,可直接撤回;不改任何接口和返回格式。托管环境前后对比要等部署后才能测,卡片保持打开(本
PR 写 Part of),由座位安排。

## What changes

- New `ui/packages/app-shell/src/console/ConsoleBootShell.tsx`:
- `ConsoleBootShell`: the console chrome's frame with nothing in it. The
real `AppShell` from `@object-ui/layout` (same sidebar primitive and
route-slot classes as `ConsoleLayout`; since objectstack-ai#36187, no top bar from 768
px up and grey blocks where the sidebar's head puts the app menu, the
search and the bell and its foot the account; the 48 px top bar on a
phone and on a docs page), `primeConsoleSidebarOpen` run before the
sidebar provider reads its cookie (as `ConsoleLayout` does), grey blocks
in the bar and the sidebar, and in the slot the skeleton of the route
the URL names (`metadataReadsForAppRoute`). No text, no link, no button.
It draws the shape the chrome will have on the route and width, from the
same predicates `ConsoleLayout` reads (`showHeader={(phone || docsPage)
&& !recordPageOwnsTopBar}`) (moved to `layout/consoleRoutePaths.ts`,
re-exported from `ConsoleLayout`): no sidebar on an app's docs pages
(`isAppDocsPath`, objectstack-ai#36000) and no top bar on a phone record page
(`isRecordPagePath`, objectstack#28483). It carries `data-boot-splash`
(it is still the boot wait) and `data-boot-shell`.
- `ConsoleBootFallback`: the frame on an `/apps/:app/*` route once
`useAuth()` has answered with a user; `LoadingScreen` while the session
read is out, with no user, on every other route (`/home`, auth surfaces,
`/forms/…`), and outside a router.
- `RouteMetadataSkeleton` moved here from `AppContent.tsx`, with a
`boot` flag that adds `data-boot-splash`.
- `ConsoleShell.tsx` `LoadingFallback` renders `ConsoleBootFallback`.
That covers the gates between the session read and `AppContent`:
`ConnectedShellInner` (adapter), `RequireOrganization` (organization
list) and the console host's `ConsolePermissionsScope`
(`ui/apps/console/src/AppContent.tsx`, now
`loadingFallback={<LoadingFallback />}`; its error fallback is
unchanged).
- `AppContent.tsx`:
- The readiness gate draws `ConsoleBootShell` instead of
`LoadingScreen`, and holds only on the adapter, the app list, the admin
verdict (objectui#5619) and the deployment flags (`/auth/config`). The
flags are new to the gate: the chrome's navigation gates read them, and
a navigation predicate naming a flag (`features.cloudManaged != true`)
faults and withholds its entry while none are bound (objectui#12700).
Before, the route's own reads made the chrome mount after that answer by
timing only; with them off the gate, Live E2E UI caught the fault
(`list-row-action-cel`), reproduced locally by holding `/auth/config` 2
s. The first-paint wait on the route's own buckets (`!firstPaintDone &&
!routeReadsSettled`, objectui#12809) is gone: the chrome mounts, and the
route slot shows `RouteMetadataSkeleton` until `routeReadsSettled`, the
path a later navigation already took.
- The two access-verdict waits before the chrome
(`appSurfaceAwaitsVerdict`, `requestedAppMissing`) draw the frame too.
- The route slot's `Suspense` fallback is `RouteMetadataSkeleton … boot`
instead of the full-screen `LoadingScreen` inside the chrome (measured
locally: 0.2 s of logo splash inside the chrome while the record page's
chunk resolved).
- `firstRouteDrawn` (replaces `firstPaintDone`) keeps the first route
skeleton's `data-boot-splash` until the route's reads have landed once.
- `RedirectWithSplash` paints `ConsoleBootFallback` instead of
`LoadingScreen`, so a boot redirect out of a gate that was drawing the
frame (`RequireOrganization` → `/organizations`, `AppContent` → home)
still changes no pixels during its hand-off (objectui#6378).

Read first (risk order):
1. `AppContent.tsx`, the readiness gate and the route slot
(`RouteMetadataSkeleton`, the `Suspense` fallback).
2. `ConsoleBootShell.tsx`, `RoutedBootFallback`'s conditions.
3. `ConsoleShell.tsx` `LoadingFallback`, `RedirectWithSplash.tsx`.

## Why

An `/apps/:app/*` open passed five gates in a row, each drawing the
full-screen splash: `AuthGuard` (`get-session`), `ConnectedShellInner`
(adapter), `RequireOrganization` (`organization/list`),
`ConsolePermissionsScope` (`/auth/me/permissions`, more than 3 s
server-side on the hosted environment, objectstack-ai#35987), then `AppContent`'s gate
(app list, admin verdict, the route's own reads until the first paint).
Only the first decides whether there is a session. The others decide
which app this is, which navigation exists and where to redirect, and
the frame shows none of those.

What each guarantee rests on, unchanged:
- **No wrong-app flash**: the frame names no app. The chrome still
mounts only once the app list is in and the URL's app is matched;
`requestedAppMissing` and the access-verdict screens are unchanged.
- **No unauthorised-menu flash**: navigation entries come only from the
real chrome (`UnifiedSidebar`, `AppHeader`), which still mounts after
the permission answer and the admin verdict.
- **No redirect loop or wrong redirect**: the frame never navigates; the
no-active-app redirect still waits for the admin verdict, and the
organization redirects for their own inputs.
- **Boot-paint semantics** (objectui#12980, readiness waits): the frame
and the first route skeleton carry `data-boot-splash`, so the chrome's
deferred feeds (`sharedUserFeeds`), the locale list (`loadLocales`) and
the e2e/smoke waits keyed on that marker wait for exactly what they
waited for before.

What the chrome reads before the route's buckets land:
`ConsoleLayout`/`AppHeader`/`CommandPalette` get the object list the
route has so far (the scope's or none). The header's object crumb is
absent until the object lands, as on any later navigation today. Nothing
in the chrome decides from it.

## Verification

### Before/after, the same record page (local and throttled, not hosted)

`examples/app-showcase` (`pnpm dev -- --fresh`, seeded admin), behind a
local HTTP/2 TLS proxy (objectstack-ai#35987's recipe), Chromium 1280×800, zh-CN, JS
cached, DevTools throttling 300 ms RTT / 6 Mbps, 3 runs per row,
full-page open of
`/_console/apps/com.example.showcase/showcase_project/record/<id>`.
Seconds from navigation start. Paint milestones from a MutationObserver:
full-screen splash gone (no `LoadingScreen` left and the pre-JS splash
gone), frame drawn (`data-boot-shell`), chrome drawn (`console-route`),
record shown (its name in the route slot). The second profile holds
`/auth/me/permissions` 3 s in the proxy, a stand-in for the hosted
server time (simulated, not measured hosted).

| Profile | | `get-session` answered | full-screen splash gone | chrome
drawn | record shown |
|---|---|---|---|---|---|
| 300 ms / 6 Mbps | before | 0.38 / 0.40 / 0.35 | 1.69 / 1.15 / 1.09 |
1.51 / 0.96 / 0.87 | 2.10 / 1.52 / 1.46 |
| | after | 0.44 / 0.35 / 0.36 | **0.69 / 0.37 / 0.37** (frame) | 1.19 /
0.81 / 0.82 | 1.89 / 1.50 / 1.52 |
| + permissions held 3 s | before | 0.47 / 0.45 / 0.35 | 4.03 / 3.87 /
3.78 | 3.79 / 3.62 / 3.57 | 4.40 / 4.25 / 4.16 |
| | after | 0.42 / 0.41 / 0.35 | **0.74 / 0.44 / 0.37** (frame) | 3.89 /
3.63 / 3.52 | 4.53 / 4.26 / 4.15 |

- The frame replaces the splash within about 20 ms of the session answer
in runs 2 and 3 (run 1 of each row is the first open after the warm-up
and starts its reads late), before `/meta/page` answers (0.73–1.10) and
well before the permission answer.
- "Before" splash gone comes after "chrome drawn" because the chrome
mounted with the full-screen `LoadingScreen` inside it while the record
page's chunk resolved; after, that slot shows the record skeleton.
- Chrome drawn and record shown do not move beyond run noise: the
record's data read still leaves after the permission answer and the
record page's mount (`POST …/page` sent at the same times before and
after). Moving that read earlier is a different change (a data read
before the permission answer), not taken here.
- ⚠ Gap: the hosted environment is not reachable from this container,
and an "after" there exists only once this is deployed. The hosted
before/after (objectstack-ai#35981's scope addition: segment timings before objectstack-ai#35987 and
after this PR, and `/api/v1/packages` off the boot path) is owed after
deploy; the card stays open for it.

Screenshots after objectstack-ai#36187 (`after2-1440-*`, `after2-375-*`: frame, then
loaded) and, from the first round, (frame → chrome → record) at 1280×800
(sidebar folded by the window width, as the chrome folds it), 1600×900
(sidebar open, same width in frame and chrome) and iPhone 13, the raw
runs (`*.json`, `summary.txt`), the measurement script and the proxy:
`/mnt/project-files/build-seat1/35981/` in the project files.

### Tests

-
`ui/packages/app-shell/src/console/__tests__/ConsoleBootShell-35981.test.tsx`
(new, 7 cases): the frame on an app route with a user, carrying
`data-boot-splash`, the top bar and the route skeleton;
`LoadingFallback` draws it; a boot redirect paints it at its first
commit and then lands; the frame has no text and nothing to press; no
sidebar on a docs page and no top bar on a phone record page, with the
sidebar and the bar kept everywhere else; the splash while the session
read is out, with no user, on `/home`, `/login`, `/forms/…`, bare
`/apps`, and outside a router.
- `AppContent.splashCriticalPath-12809.test.tsx` (amended): before the
member row answers, the frame and no chrome; after it, the chrome with
the route skeleton carrying `data-boot-splash`; the splash marker leaves
when the route draws, as before. The two CONTROL cases are unchanged and
pass (a later skeleton is not the boot wait).
- Amended where the old splash was the expected frame:
`AppContent.routeChunkPreload-12980` (case (a): the chrome is up under
the route skeleton while the page's reads are out; the inside-the-chrome
watcher counts the full-screen splash only, and case (b) now sees the
route skeleton, not a splash, while the chunk loads),
`bootRedirectCoverage` (the boot frame counts as full-viewport cover),
and the `LoadingFallback` mock in `App.homePermissions-12700` and
`FormPage.routePermissions-29187` (the permission scope's fallback). All
four pass.
- Local run of `packages/app-shell/` and `apps/console/`: the first full
run hit its 50-minute limit in this 4-core container after reaching
those four reds and nothing else. The scoped rerun after the fixes
(app-shell `console/`, `chrome/`, `layout/`, `hooks/`, and
`apps/console/`): 892 files, 7992 tests, all pass. CI's Test UI shards
carry the whole suite and are green on the head.
- `AppContent.splashCriticalPath-12809`: a new case holds `/auth/config`
and pins frame-not-chrome until it answers (red with the gate line
reverted). `AppContent.unresolvedAdmin-5619` (three cases, including the
MUST NOT CHANGE one) now awaits the chrome, since the flags' answer is a
promise even when the mock gives it at once; the admin verdict still
adds no wait. `AppContent.emptyNavigationLanding-12079` gets a stable
`getAuthConfig`, as `AuthProvider`'s `useCallback` gives, since a fresh
one per render re-asks on every render.
- After merging `main` and the L1-b should-fixes: app-shell `console/`,
`layout/`, `chrome/`: 465 files, 3659 tests, all pass; `pnpm
console:build` green.
- `pnpm check:test-source-alias`: the amended boot-path test now mounts
the chrome, which reaches `@objectstack/lint` lazily; it loads it at
module top, as the gate asks. Green.
- `pnpm console:build` (runs `tsc` for app-shell and the console):
green.
- ESLint on the changed files: no errors.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No spec change.)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes (changed files).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset
(`.changeset/35981-app-route-boot-frame.md`, patch), and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: n/a.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English (the maintainer summary
is in Chinese by the maintainer's standing rule).
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

Follow-up (not in this PR): the record's own data read waits for the
permission answer and the record page's mount; starting it earlier would
need its own card (it reads data before the permission answer arrives).

---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgWwKdjqiYQSujUXhn7)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgWwKdjqiYQSujUXhn7

<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgWwKdjqiYQSujUXhn7 -->

---------

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

documentation Improvements or additions to documentation size/m tests 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.

托管环境整页打开记录页约 16 秒:启动请求分 5 段串行,/api/v1/packages 每次整页都下载 472KB

2 participants