Repository navigation
perf(console): start an object list's saved-view read with the route, not after its lazy modules - #35579
Conversation
… after its lazy modules Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ Co-authored-by: Claude <noreply@anthropic.com>
…w-reader mocks Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ Final head for review · area ux-2 · 2026-11-19T16:27Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对L1-a: ACCEPT · head Readings, my own.
Code.
Pins (names grepped).
Nit, non-blocking. The changeset says the read is "not started under a draft preview ( Premise. It is partly refuted, and measured: first list data is asked at list mount, so it does not move. "Part of", not "Fixes", is right, and the area's close-out of the record half as a different mechanism is recorded. Declaration: agreed.
Routing. Not governed and no contract face: ux-2 lands it. |
|
repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ Landing · area ux-2 · 2026-11-19T16:29Z
Nit noted, not done here: a CONTROL pin for "no early read under a draft preview" (the code gates on it; no cell pins it). |
Part of #35535
This PR delivers the card's ask for the object LIST page. It leaves open the record page and the card's expected first-data gain; see Acceptance notes.
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
AppContent(app-shell console) starts an object list's saved-view read in the commit where the route can render: the route is:objectNameor:objectName/view/:viewId, the app's object scope has settled (its views are in hand from the app bundle, or from the/meta/viewlist it waited for), and the route's object is in the objectsObjectViewis handed. Before this, the read left only whenObjectViewitself committed. That waits for the list subtree's nested lazy modules (plugin-form, the icon chunks and others), because the subtree's effects run only once nothing in it is suspended.dataSource.listViewOverrides(objectName), not a new request. Outside a draft preview the adapter answersObjectView'slistViewsandlistViewOverridesfrom one stored, shared one-object read (readObjectViewRows:GET /meta/view?object=OBJECT, or the stored whole list narrowed). So the list joins the early read when it is in flight, or reads what it stored once it has landed. The two helpers (objectViewRouteObject,prefetchObjectViewRows) live inconsole/appObjectScope.ts, which is not exported from the package.listViewsreads another request there); on a route whose object the app does not serve; on a pseudo-route with no app named by the URL; with an adapter that lacks either reader. The record page is unchanged.ObjectView.tsx,MetadataProvider.tsx, spec, server andui/apps/consoleare untouched.Read first, by risk:
ui/packages/app-shell/src/console/AppContent.tsx: the new effect besiderouteReadsSettled. The risk is its gate, because an early read on a routeObjectViewnever mounts on would be an extra request.ui/packages/app-shell/src/console/appObjectScope.ts,prefetchObjectViewRows: the claim that this is the same request as the reader's.ui/packages/app-shell/src/views/ObjectView.refreshRereadsViews-13057.test.tsx: the join pin against a realObjectStackAdapter.Two-minute check:
pnpm --dir ui exec vitest run packages/app-shell/src/console/__tests__/AppContent.routeChunkPreload-12980.test.tsx packages/app-shell/src/views/ObjectView.refreshRereadsViews-13057.test.tsx. Expected output:Test Files 2 passed,Tests 10 passed.Tests
AppContent.routeChunkPreload-12980.test.tsx, a new top-level describe in the existing chunk-gate harness:ObjectViewchunk import is still pending, and is not repeated after the chunk lands.ObjectView.refreshRereadsViews-13057.test.tsx, a new top-level describe with the real page and a real adapter: an early read still on the wire is joined, and one that has landed is read back. In both cases there is one/meta/viewrequest per open.import '@objectstack/lint', becausecheck:test-source-aliasflags the dynamic import their source reaches.scripts/ablation-replace.mjsreplaced the effect'sprefetchObjectViewRows(dataSource, viewReadObject);withvoid 0;. The anchor went from 1 to 0 hits, blob 93b63bc8325c to ae3386c4d2cd. (c) and (e) failed (2 failed, 4 passed). Restored blob 93b63bc8325c equalsHEAD:andgit diff HEADis empty.Test and gate readings (head 335afc2; the last commit before it changed only the changeset prose)
Test Files 2 passed (2),Tests 10 passed (10), os-verify-lock exit 0 (at b1ab94e, which has the same test and source bytes as head).pnpm --filter @object-ui/app-shell run type-check: exit 0, both programs (b1ab94e).dispatch-gates --commands: 38 derived families, all run, all exit 0 except the two below.--ranreconciliation: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN.check:test-source-aliaswas red on the first run, because the two edited test files reach a dynamic@objectstack/lintimport. Both files were fixed with the module-top import, and the gate then exited 0.vi.fnmock. The mock was typed, and the check then exited 0.pnpm check:new-line-citations(ui): 0 new citations.Acceptance notes
ObjectView's, and this PR does not change it. On/apps/APP/OBJECT/record/IDthe request is the WHOLE/meta/viewlist, not?object=.ObjectViewdoes not mount there. The record's own data read leaves 200-290 ms before it. No early read can be "the same requestObjectViewsends" on that route, so per the ruling zone it is left alone (readings below: 1meta/viewper load, gap unchanged).meta/view?object=for 1.5 s did not delay the firstdata/showcase_taskread (2562 ms, while the view answered at 3608 ms). A second, identical data read followed the view's answer (3664 ms).data/sys_personal_viewfor 1.5 s did not delay first data either.listViewswarning fires once, as before). If the early read is still on the wire, the list joins it and sees the same failure.content/docs/frontend. This adds no prop, export, metadata key or author-visible behaviour, and the claim's file surface excludes both.Layer readings: built console, showcase app, headless Chromium, 3 loads per cell (method of #34211 / #35455)
Tree: objectstack-ai/objectstack. Before = origin/main eed422e; after = this branch at b1b970b, which has the same app-shell source as head. Built console served by
objectstack dev --fresh(example-showcase) on a private port. cold = cookie only; warm = cookie plus stored Bearer. gap = from the app bundle answering tometa/viewleaving. Times are shared-box ms.ObjectViewchunk itself had loaded before the bundle answered (route chunk preload). What filled the gap was plugin-view, plugins-views, objectViewOptions and plugin-form, plus 25-62 lazy icon and helper chunks.Generated by Claude Code