Skip to content

Commit 40be9b5

Browse files
perf(console): opening a record re-reads no list, asks its field access once, and the bell polls once a minute (#27907)
<!-- claude-projects-attribution: {"github_login":"os-bill"} --> _Requested by **Bill** · [project thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgDFH4S5pR1C8YvYCWWsZfXx)_ ## 维护者速读 - 改了什么:打开/关闭记录不再重取列表(冷:抽屉在 scope 旁读全量注册表、不再用骨架屏顶掉列表;热:列表页按值持有 `columns`/`searchableFields`);同一记录的 field-access 并发 4 次合为 1 次;铃铛与审批角标前台轮询改为 60 s,并留好"推送通道打开即停轮询"的接缝。 - 为什么改:#27626 实测每次打开、关闭记录都多一次列表查询,冷打开还多一次计数探测;field-access 同一毫秒 4 次;铃铛 10 s 一次。 - 风险与回滚:仅 ui 两个包,无协议/元数据变更;冷打开时抽屉的关联列表在全量注册表落地前只看到 scope 内对象(落地后补齐);新消息最多晚约 60 s 出现。回滚即 revert 本 PR。 - 先看:`ui/packages/app-shell/src/console/AppContent.tsx`(抽屉读注册表的位置)与 `appObjectScope.ts`,再看 `ui/packages/data-objectstack/src/index.ts` 的 `getRecordFieldAccess`。 - 两分钟验证:app-crm 列表页打开一条记录再关闭,Network 里没有 `top=50` 的列表请求、`field-access` 只有 1 次;页面静置 2 分钟,`sys_inbox_message` 只有 2 次。 - 需要你做的:无(draft,席位审核通过后再请你审;#27626 的 Acceptance 3 由 epic 席位在 console 预览复测)。 Fixes #27626 Clause-②: no Metadata-protocol: none ## What changes **1. Opening or closing a record re-reads no list** (Target 1) - `console/appObjectScope.ts` — the record drawer (`?recordId=`) no longer turns the route's object scope off. Only the record form overlay (`?form=`, `?formObject=`) still does, as before. - `console/AppContent.tsx` — under a drawer, the whole registry is read beside the route's scope (`useLazyMetadataSettled('object', …)`), the route slot never waits on it, and once it has landed it joins the scope (`joinRegistryToScope`): the scope's documents first, by identity, then the registry objects the scope does not hold. The drawer's related lists still see every object, as the seat ruled. `ObjectView.tsx` is untouched. - `views/objectViewListRenderer.tsx` — `columns` and `searchableFields` go through the page's existing `holdBlock` (objectui#10046's value hold), because `ListView` names both by identity in its fetch effect (objectui#4567 put the stabilisation at the producer). This covers any host that hands the page new documents of equal content. **2. One field-access request per record** (Target 2) - `data-objectstack/src/index.ts` — `getRecordFieldAccess` shares one in-flight request per `object::id` (the adapter's existing `shareInFlight`), remembers a 404 as "no answer" for that record until a write to its object, and stops asking a server that answers 501. A settled projection is not cached: the next ask after a save reaches the server. A write to the object (`emitMutation` → `dropInflightReads`) drops both the shared ask and the remembered 404. **3. The bell polls once a minute, and not at all while a push channel is open** (Target 4, seat ruling B) - `hooks/sharedUserFeeds.ts` — `INBOX_POLL_MS` 10 s → 60 s, `APPROVALS_POLL_MS` 30 s → 60 s. The hidden-tab stop and the retire/probe logic are unchanged. A package-internal seam, `setUserFeedPushChannelOpen(open)` / `notifyUserFeedPushed(feed)`: while a channel is open the two feeds arm no poll and read only on a push; when it closes they read once and resume the 60 s fallback. Nothing reports a channel today (see Acceptance notes), so the fallback is what runs. **Not changed** - `security/explain` ×2 on a record open are `update` and `delete`: two different questions, each already shared in flight and cached per (record, operation, principal) by `useRecordEditable` (objectui#11699, `useRecordEditable.inflightShare-11699.test.tsx`). - Child metadata (Target 3): each related object's `meta/object/<name>` is read once, on the first open (0 on the warm open, below). The repeat the card measured on the cold path came from the remount in 1. - No metadata key, nothing under `packages/spec/**` (Target 5). ## Why Two root causes for the list re-read, measured with request logging and render tracing in the console: - **Cold (the first open of a session):** `?recordId=` made `readAppObjectScope` treat the route as a non-scope route, so `AppContent` switched from the app's object scope to the whole registry. The registry had not been read yet, so `routeReadsSettled` went false and `RouteMetadataSkeleton` replaced `<Routes>`: the list unmounted, mounted again when the registry landed, and its mount fetch re-read the rows (`top=50`) and the count (`top=0`). - **Warm (every later open, and every close):** no skeleton, but opening switched `allObjects` from the scope's documents to the registry's, and closing switched back. The documents have equal content but different identity, so the page rebuilt `schema.columns`, and `ListView`'s fetch effect re-ran into an identical `find`. field-access ×4: `record:details` and `record:highlights` each mount a `RecordFieldAccessScope`, and the drawer's form and the page host ask too; all four reach `getRecordFieldAccess` in the same tick, which had no in-flight sharing (unlike `findOne`). ## Tests - `views/ObjectView.objectDocSwapNoRefetch-27626.test.tsx` (new, real `ObjectView` / `plugin-view` / `ListView`): opening and closing records while the documents swap each time → 1 list query in total; a content-equal swap → 0; CONTROL: a real column change still refetches. - `console/__tests__/AppContent.recordDrawerKeepsScope-27626.test.tsx` (new, real `MetadataProvider` + `AppContent`, whole-registry read held open): cold open keeps the list on its scope with no skeleton and no remount, the registry is read and joins once it lands, one document for the list's object before/during/after; warm open asks the registry no more; a deep link to a drawer draws the list before the registry lands; CONTROL: `?form=` still reads the whole registry and no scope. - `data-objectstack/src/getRecordFieldAccess.inflightShare-27626.test.ts` (new, real adapter and client over a held transport): 4 concurrent asks → 1 request; other records are other questions; a settled answer is not remembered; a 404 is remembered per record; a 501 stops all asks; a write drops both. - `hooks/__tests__/sharedUserFeeds.pushChannel-27626.test.tsx` (new): no channel → read at mount then once per 60 s, never sooner; channel open → 0 polls over 10 minutes and a push reads only its feed; channel open at mount; channel closing → one read then 60 s; returning to the tab with the channel open reads nothing; a push with no consumer reads nothing. - Updated, each restating the changed behaviour: `appObjectScope-12811` (the drawer now prefetches the list's scope; the form-overlay CONTROL keeps "asks nothing"), `AppContent.objectScope-12811` (the overlay CONTROL waits for the registry to join rather than for the first paint), `sharedInboxFeed.cadence-7249`, `sharedUserFeeds.hiddenStop-12439` and `sharedInboxFeed.transient404` (restated cadence: 60 s; the revival case now tells a live feed from one on probes by the probe budget, since both cadences are 60 s). - Reverse runs: with the `holdBlock` lines reverted the doc-swap cases read 5 and 3 list queries (asserted 1 and 1), CONTROL green; with the `AppContent` / `appObjectScope` change reverted the three drawer cases and the prefetch case fail (skeleton up, route element mounted twice, no scope asked), CONTROLs green. ## Acceptance notes - **Measured on `examples/app-crm`, not HotCRM** (deviation, accepted by the seat): HotCRM is not in this repo's tree; app-crm is the in-repo CRM with the same list → record drawer path. Local dev server (`objectstack dev` + console Vite), so absolute times are dev-mode times; the counts are what this card fixes. - **Push channel:** there is none to subscribe to. `page.on('websocket')` over every measured page saw only the Vite dev server's HMR socket (`ws://localhost:<vite-port>/?token=…`, 1–2 per page load), and discovery reports `capabilities.websockets.enabled = false` and `services.realtime = false`; `service-realtime`'s in-memory adapter serves no channel route. Realtime stays out of the open core per the 2026-09-04 ruling (A), so per the seat's ruling B this PR keeps polling as the fallback at 60 s with the hidden-tab stop, and ships the "socket open → no polling" seam pinned by tests for a host that has a channel. Consequence: **a new inbox message or approval can show up to about 60 s later than before (10 s / 30 s).** - **Cold-open drawer:** before the registry lands, the drawer's related lists are derived from the scope's objects (the app's package plus lookup targets); objects outside it join when the registry lands. On app-crm the related objects measured here are all in the app's package, so nothing visibly changes; the related reads start at about the same time as before (≈1.0–1.2 s after the click, below). - Acceptance 3 (re-measure in the console preview) is the epic seat's, after this PR is green. ## Verification Same script for both columns (Playwright, signed in as the seeded admin): open the first record's primary link from the list, wait 7 s (`cold`), Escape and wait 4 s (`close1`), open the second record (`warm`), Escape (`close2`). Every `/api/` request logged. `before` = the sources at the merge base `9ae6384e`, `after` = this branch. | phase | contact before | contact after | account before | account after | |---|---|---|---|---| | cold open — total requests | 17 | 11 | 26 | 20 | | ↳ list `top=50` / count `top=0` | 1 / 1 | 0 / 0 | 1 / 1 | 0 / 0 | | ↳ `field-access` | 4 | 1 | 4 | 1 | | ↳ `security/explain` (update + delete) | 2 | 2 | 2 | 2 | | ↳ `meta/object/<child>` | 1 | 1 | 4 | 4 | | close — total (all list) | 1 | 0 | 1 | 0 | | warm open — total | 12 | 7 | 15 | 10 | | ↳ list `top=50` / `field-access` | 1 / 4 | 0 / 1 | 1 / 4 | 0 / 1 | | ↳ `meta/object/<child>` | 0 | 0 | 0 | 0 | | close — total (all list) | 1 | 0 | 1 | 0 | | URLs sent twice in one phase | field-access ×4 | none | field-access ×4 | none | Bell, page left alone on the list: before, `sys_inbox_message` 6 and `approvals/requests` 2 in 58 s; after, 2 and 2 in 125 s (at ≈33 s and ≈93 s). <details><summary>crm_contact — before (9ae6384)</summary> ``` == cold: 17 requests, last at 5835 ms 1 54ms GET /api/v1/meta/object 1 662ms GET /api/v1/approvals/requests 1 663ms POST /api/v1/security/explain {"object":"crm_contact","operation":"update",…} 1 664ms POST /api/v1/security/explain {"object":"crm_contact","operation":"delete",…} 2 669ms GET /api/v1/data/crm_contact (top=0 count; top=1 record) 1 784ms GET /api/v1/data/crm_contact [LIST] (top=50) 1 784ms GET /api/v1/meta/object/crm_activity 4 785ms GET /api/v1/data/crm_contact/RMS_jNMhqn0Rd_Nj/field-access 1 803ms GET /api/v1/approvals/records/crm_contact/RMS_jNMhqn0Rd_Nj/lock 2 1018ms GET /api/v1/data/crm_activity 1 1433ms PATCH /api/v1/data/sys_user_preference/… 1 5835ms GET /api/v1/data/sys_inbox_message == close1: 1 requests 1 562ms GET /api/v1/data/crm_contact [LIST] == warm: 12 requests, last at 4505 ms 1 484ms GET /api/v1/approvals/requests 1 484ms POST /api/v1/security/explain {…"operation":"update"…} 1 485ms POST /api/v1/security/explain {…"operation":"delete"…} 1 497ms GET /api/v1/data/crm_contact [LIST] 1 497ms GET /api/v1/data/crm_contact (top=1 record) 4 553ms GET /api/v1/data/crm_contact/sC9tNijBazanHlLI/field-access 1 780ms GET /api/v1/data/crm_activity 1 1194ms PATCH /api/v1/data/sys_user_preference/… 1 4505ms GET /api/v1/data/sys_inbox_message == close2: 1 requests 1 619ms GET /api/v1/data/crm_contact [LIST] ``` </details> <details><summary>crm_contact — after (this branch)</summary> ``` == cold: 11 requests, last at 1470 ms 1 577ms GET /api/v1/meta/object 1 600ms GET /api/v1/approvals/requests 1 609ms POST /api/v1/security/explain {"object":"crm_contact","operation":"update",…} 1 609ms POST /api/v1/security/explain {"object":"crm_contact","operation":"delete",…} 1 610ms GET /api/v1/data/crm_contact (top=1 record) 1 696ms GET /api/v1/meta/object/crm_activity 1 698ms GET /api/v1/data/crm_contact/RMS_jNMhqn0Rd_Nj/field-access 1 737ms GET /api/v1/approvals/records/crm_contact/RMS_jNMhqn0Rd_Nj/lock 2 1074ms GET /api/v1/data/crm_activity 1 1470ms PATCH /api/v1/data/sys_user_preference/… == close1: 0 requests == warm: 7 requests, last at 1168 ms 1 478ms GET /api/v1/approvals/requests 1 478ms POST /api/v1/security/explain {…"operation":"update"…} 1 479ms POST /api/v1/security/explain {…"operation":"delete"…} 1 490ms GET /api/v1/data/crm_contact (top=1 record) 1 589ms GET /api/v1/data/crm_contact/sC9tNijBazanHlLI/field-access 1 777ms GET /api/v1/data/crm_activity 1 1168ms PATCH /api/v1/data/sys_user_preference/… == close2: 0 requests ``` </details> <details><summary>crm_account — before (9ae6384)</summary> ``` == cold: 26 requests, last at 6108 ms 1 52ms GET /api/v1/meta/object 1 593ms GET /api/v1/approvals/requests 1 595ms POST /api/v1/security/explain {…"operation":"update"…} 1 595ms POST /api/v1/security/explain {…"operation":"delete"…} 2 617ms GET /api/v1/data/crm_account (top=0 count; top=1 record) 1 773ms GET /api/v1/data/crm_account [LIST] 4 774ms GET /api/v1/meta/object/{crm_activity,crm_contact,crm_lead,crm_opportunity} 4 777ms GET /api/v1/data/crm_account/94WoprwapOuiBt6q/field-access 1 794ms GET /api/v1/approvals/records/crm_account/94WoprwapOuiBt6q/lock 8 1009ms GET /api/v1/data/{crm_activity,crm_contact,crm_lead,crm_opportunity} ×2 1 1486ms PATCH /api/v1/data/sys_user_preference/… 1 6108ms GET /api/v1/data/sys_inbox_message == close1: 1 requests 1 606ms GET /api/v1/data/crm_account [LIST] == warm: 15 requests, last at 4854 ms 3 480ms approvals/requests, explain update, explain delete 1 495ms GET /api/v1/data/crm_account [LIST] 1 495ms GET /api/v1/data/crm_account (top=1 record) 4 560ms GET /api/v1/data/crm_account/Nzuqe9nNMQzwpEMt/field-access 4 776ms GET /api/v1/data/{crm_activity,crm_contact,crm_lead,crm_opportunity} 1 1177ms PATCH /api/v1/data/sys_user_preference/… 1 4854ms GET /api/v1/data/sys_inbox_message == close2: 1 requests 1 564ms GET /api/v1/data/crm_account [LIST] ``` </details> <details><summary>crm_account — after (this branch)</summary> ``` == cold: 20 requests, last at 1749 ms 1 584ms GET /api/v1/meta/object 1 632ms GET /api/v1/approvals/requests 1 632ms POST /api/v1/security/explain {…"operation":"update"…} 1 632ms POST /api/v1/security/explain {…"operation":"delete"…} 1 643ms GET /api/v1/data/crm_account (top=1 record) 4 739ms GET /api/v1/meta/object/{crm_activity,crm_contact,crm_lead,crm_opportunity} 1 739ms GET /api/v1/data/crm_account/94WoprwapOuiBt6q/field-access 1 792ms GET /api/v1/approvals/records/crm_account/94WoprwapOuiBt6q/lock 8 1229ms GET /api/v1/data/{crm_activity,crm_contact,crm_lead,crm_opportunity} ×2 1 1749ms PATCH /api/v1/data/sys_user_preference/… == close1: 0 requests == warm: 10 requests, last at 1180 ms 3 506ms approvals/requests, explain update, explain delete 1 517ms GET /api/v1/data/crm_account (top=1 record) 1 606ms GET /api/v1/data/crm_account/Nzuqe9nNMQzwpEMt/field-access 4 681ms GET /api/v1/data/{crm_activity,crm_contact,crm_lead,crm_opportunity} 1 1180ms PATCH /api/v1/data/sys_user_preference/… == close2: 0 requests ``` </details> The two `data/<child>` reads per related object on the account's cold open are different queries (the related list's `top=1` for the opened record, and a `select=id` probe for another row of the list), present before and after; no URL is sent twice in any phase after this change. Local checks: the 35 gates `dispatch-gates --commands` derives for this diff, each exit 0, reconciled with `--ran` (35 run, 0 not measured); `check-sdui-manifest` exit 0; 415 test files (app-shell console, views, feeds; all of data-objectstack): 414 passed on the full run, and the one failure, `sharedInboxFeed.transient404` restating the 10 s cadence, is updated above and re-run green; `@object-ui/data-objectstack` type-check exit 0; eslint on the 14 changed TS files exit 0 (warnings only, pre-existing kinds). ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (`packages/spec` not touched.) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. (eslint on the 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, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (Not touched.) - [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. (Except the 维护者速读 block, which the maintainer asks for in Chinese.) - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Utp6CXJLrFrzeHHa8StCja --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8a1f467 commit 40be9b5

15 files changed

Lines changed: 1183 additions & 46 deletions
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@object-ui/data-objectstack': patch
3+
'@object-ui/app-shell': patch
4+
---
5+
6+
perf(console): opening a record no longer re-reads the list under it, asks its field access once, and the bell polls once a minute
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
Measured in the console on app-crm, opening one record from a list and closing it again:
12+
13+
- **The list under the drawer is not read again.** The first record opened replaced the list with the route skeleton (the drawer made the route read the whole object registry instead of the app's object scope, and the route waited for it), so the list mounted again and re-read its rows; every later open and close handed the list a different document for its object, which rebuilt its columns and re-ran the list query. The drawer now reads the whole registry beside the route's scope, without holding the route, and the registry joins the scope once it lands with the scope's own documents kept as they are. The list page also holds `columns` and `searchableFields` by value, as it holds the view-type blocks. The record form overlay (`?form=`) still reads the whole registry.
14+
- **One field-access request per record.** The record's sections, highlights, form and page each asked `GET /data/:object/:id/field-access` at once; `ObjectStackAdapter.getRecordFieldAccess` now shares one request between concurrent asks for the same record, remembers a 404 for that record until a write to its object, and stops asking a server that answers 501. A settled answer is not cached: the next ask after a save reaches the server.
15+
- **The bell polls once a minute.** The inbox and approvals feeds polled every 10 s and 30 s on every console page. With no realtime channel in the platform, they now poll every 60 s in the foreground, still stop in a hidden tab, and stop polling altogether while a host reports an open push channel (a pushed change reads the feed it names). A new inbox message can show up to about a minute later.

‎ui/packages/app-shell/src/console/AppContent.tsx‎

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import { useLauncherApps } from '../hooks/useLauncherApps.js';
3838
import { useSignedInUserLocale } from '../hooks/useUserLocale.js';
3939
import { resolveRecordFormTarget, resolveRecordFormModalLayout, resolveFormViewChrome, selectRecordFormView, resolveNavigateCreateUrl, resolveNavigateEditUrl, resolvePostCreateTarget, recordFormCreateValues, readRecordFormCreateValues, RECORD_FORM_CREATE_VALUES_STATE } from '../utils/recordFormNavigation.js';
4040
import { deriveRecordSurface, deriveRecordFlowSurface } from '@object-ui/plugin-view';
41-
import { RECORD_FORM_PARAM, RECORD_FORM_OBJECT_PARAM, RECORD_FORM_LINK_PARAM } from '../urlParams.js';
41+
import { RECORD_DRAWER_PARAM, RECORD_FORM_PARAM, RECORD_FORM_OBJECT_PARAM, RECORD_FORM_LINK_PARAM } from '../urlParams.js';
4242
import { appAddressSegment, appRouteSegment, canonicalAppPathname, matchAppBySegment } from '../utils/appRoute.js';
4343
import { resolveHref, type NavTemplateContext } from '@object-ui/layout';
4444
import type { NavigationItem } from '@object-ui/types';
@@ -462,8 +462,23 @@ export function AppContent({ extraRoutes, extraRoutesNoApp }: AppContentProps =
462462
// Until the app list has loaded, a scope candidate does not know its package
463463
// yet, and reads nothing (the splash is up).
464464
const readsWholeRegistry = !scopeCandidate || (!metadataLoading && !objectScope);
465+
// objectstack#27626 — a record drawer (`?recordId=`) over a scoped route
466+
// reads the whole registry for its related lists, BESIDE the route's scope:
467+
// the route slot never waits on it, and once it has landed it joins the
468+
// scope, whose own documents keep their identity. The list under the drawer
469+
// reads the same object definition before, during and after it, so opening
470+
// or closing a record re-reads none of its rows (the skeleton this used to
471+
// show remounted the list on every first open).
472+
const drawerReadsRegistry = !!objectScope && searchParamsHasRecordDrawer(location.search);
473+
const drawerRegistrySettled = useLazyMetadataSettled(drawerReadsRegistry ? 'object' : '', ensureType, getTypeStatus);
474+
const scopeObjects: any[] | undefined = objectScope?.objects;
475+
const registryObjects: any[] | undefined = drawerReadsRegistry && drawerRegistrySettled ? metadata.objects : undefined;
476+
const scopeWithRegistry = useMemo(
477+
() => (scopeObjects && registryObjects ? joinRegistryToScope(scopeObjects, registryObjects) : undefined),
478+
[scopeObjects, registryObjects],
479+
);
465480
const allObjects: any[] = objectScope
466-
? objectScope.objects
481+
? scopeWithRegistry ?? objectScope.objects
467482
: readsWholeRegistry ? metadata.objects : NO_OBJECTS;
468483
const routeReadsKey = [
469484
...routeReads.filter((type) => type !== 'object' || readsWholeRegistry),
@@ -1941,6 +1956,25 @@ function searchParamsHasRecordForm(search: string): boolean {
19411956
return sp.has(RECORD_FORM_PARAM) || sp.has(RECORD_FORM_OBJECT_PARAM);
19421957
}
19431958

1959+
/**
1960+
* objectstack#27626 — whether the record drawer is open in the URL. Over a
1961+
* scoped route it reads the whole registry beside the scope.
1962+
*/
1963+
function searchParamsHasRecordDrawer(search: string): boolean {
1964+
return new URLSearchParams(search).has(RECORD_DRAWER_PARAM);
1965+
}
1966+
1967+
/**
1968+
* objectstack#27626 — the scope's objects, each the same document, then the
1969+
* registry's objects the scope does not hold. The scope itself while the
1970+
* registry adds nothing.
1971+
*/
1972+
function joinRegistryToScope(scope: any[], registry: any[]): any[] {
1973+
const held = new Set(scope.map((o: any) => o?.name));
1974+
const extra = registry.filter((o: any) => !held.has(o?.name));
1975+
return extra.length > 0 ? [...scope, ...extra] : scope;
1976+
}
1977+
19441978
const NO_OBJECTS: any[] = [];
19451979

19461980
/**

‎ui/packages/app-shell/src/console/__tests__/AppContent.objectScope-12811.test.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
* and so does the root of an app whose package holds no objects of its own (a
2323
* platform app such as Setup; its object routes read by name, objectui#13046);
2424
* a record overlay (`?recordId=`) reads the whole registry, because a record's
25-
* related lists come from every object that points at it.
25+
* related lists come from every object that points at it (since
26+
* objectstack#27626 the drawer reads it beside the list's scope, and the list
27+
* does not wait for it: `AppContent.recordDrawerKeepsScope-27626.test.tsx`).
2628
*/
2729

2830
import '@testing-library/jest-dom/vitest';
@@ -253,10 +255,9 @@ describe('one console open asks for the app\'s objects, not the whole registry (
253255

254256
it('CONTROL: a record overlay reads the whole registry (a record\'s related lists come from every object)', async () => {
255257
boot('/apps/crm/crm_account?recordId=r1');
256-
await waitFor(() => expect(screen.getByTestId('object-view')).toBeInTheDocument());
258+
await waitFor(() => expect(screen.getByTestId('object-view')).toHaveTextContent('crm_case'));
257259

258260
expect(objectCalls()).toContain('object');
259-
expect(screen.getByTestId('object-view')).toHaveTextContent('crm_case');
260261
});
261262
});
262263

0 commit comments

Comments
 (0)