From e4a8007f1f2679d90b1a9c2a517732e216d8fab4 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 21:55:12 +0000 Subject: [PATCH 1/2] fix(studio): the list-view panel does not ask /layers for the fallback default view id Fixes the 404 every open of an object with no default list view logged: the buffer and the Customize served-override read skip the layered read for OBJECT.default when no view is held under it. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01JQwxbWBvGf6TP6P9XT1tuo --- .../36750-list-view-fallback-no-layers.md | 10 + ...wInspector.fallbackNoLayers-36750.test.tsx | 249 ++++++++++++++++++ ...ViewInspector.layersUnsaved-11799.test.tsx | 12 +- .../studio-design/ObjectListViewInspector.tsx | 45 +++- .../studio-design/StudioCustomizeControls.tsx | 14 +- .../studio-design/StudioDesignSurface.tsx | 5 +- 6 files changed, 321 insertions(+), 14 deletions(-) create mode 100644 .changeset/36750-list-view-fallback-no-layers.md create mode 100644 ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.fallbackNoLayers-36750.test.tsx diff --git a/.changeset/36750-list-view-fallback-no-layers.md b/.changeset/36750-list-view-fallback-no-layers.md new file mode 100644 index 00000000000..8cbd90cdf76 --- /dev/null +++ b/.changeset/36750-list-view-fallback-no-layers.md @@ -0,0 +1,10 @@ +--- +'@object-ui/app-shell': patch +--- + +fix(studio): opening an object with no default list view no longer asks the server for a view that does not exist + +Clause-②: no +Metadata-protocol: none + +With no view of an object flagged default, Studio's list-view panel edits `OBJECT.default`, the name its first edit creates the view under. Until then nothing is published under that name, but the panel still read its published layer (`GET /api/v1/meta/view/OBJECT.default/layers`) on every open, and the browser logged the server's 404. The panel now skips that read when the id is the fallback: no view of the object's merged `listViews`, and none of the package's drafted list views, is held under it, read only once the shell's objects and the package's view drafts have answered. The Customize door's served-override read on a read-only base skips the same read and answers as its 404 did. What the panel shows and saves is unchanged. No props or exports change outside `@object-ui/app-shell`'s internal Studio modules. diff --git a/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.fallbackNoLayers-36750.test.tsx b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.fallbackNoLayers-36750.test.tsx new file mode 100644 index 00000000000..9d07aa9bd55 --- /dev/null +++ b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.fallbackNoLayers-36750.test.tsx @@ -0,0 +1,249 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. + +/** + * objectstack#36750 — the list-view buffer does not ask `GET …/layers` for the + * fallback default view id. + * + * With no view of the object flagged default, the buffer edits + * `.default` (`listViewTargetOf`), the name the panel's first edit + * creates the view under. Nothing is published under it, so the server + * answers its `/layers` with a 404 (objectstack#22397) and the browser logs a + * failed request on every open of such an object. The guard that used to skip + * this read covered draft-only objects only (objectui#12508); since + * objectstack#36511 a new object is published at once, so it no longer + * applies. The buffer already knows the id is the fallback: no view of the + * object's merged `listViews` (which holds every view item the server serves, + * under its qualified name) nor of this package's drafted list views is held + * under it. + * + * The REAL hook over a REAL `MetadataClient`, whose transport is an in-memory + * server answering as the framework does (404 for `/layers` with no layer). + * + * Pinned: + * - the fallback id: no `/layers`, and the buffer reads "not created yet"; + * - CONTROL: a published default view the merged `listViews` holds (flagged) + * still reads its layer; + * - CONTROL: a view held under `default` unflagged (the target falls back to + * the id a view really has) still reads its layer; + * - CONTROL: while the shell's objects are still loading, absence from them + * says nothing, so the layer is read as before; once they answer, the + * fallback stops being read; a context that reports no load status (a + * hand-rolled one) is read as before too; + * - the Customize door's served-override read (`useServedOverride`) skips + * the layered read for an item flagged `unpublished`, answering as its 404 + * did, and still reads the pair's draft first. + */ + +import '@testing-library/jest-dom/vitest'; +import * as React from 'react'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { act, cleanup, render } from '@testing-library/react'; +import { MetadataCtx, type MetadataContextValue, type MetadataTypeStatus } from '@object-ui/react'; +import { MetadataClient } from '@object-ui/data-objectstack'; +import { useObjectListViewDraft, type ObjectListViewDraft } from './ObjectListViewInspector'; +import { useServedOverride, type ServedOverride } from './StudioCustomizeControls'; +import type { Surface } from './navSurface'; + +const PKG = 'com.acme.app'; +const OBJECT = 'acme_ticket'; +const FALLBACK = `${OBJECT}.default`; + +const server = { + active: new Map>(), + requests: [] as Array<{ method: string; path: string; status: number }>, +}; + +const json = (status: number, body: unknown) => + new Response(JSON.stringify(body), { status, headers: { 'Content-Type': 'application/json' } }); + +async function serve(input: RequestInfo | URL, init?: RequestInit): Promise { + const method = (init?.method ?? 'GET').toUpperCase(); + const url = new URL(String(input), 'http://studio.test'); + let status = 200; + let body: unknown = []; + const meta = url.pathname.match(/^\/api\/v1\/meta\/(.+)$/); + if (meta) { + const seg = meta[1].split('/').map(decodeURIComponent); + if (seg.length === 1 && seg[0] === '_drafts') { + body = []; + } else if (seg.length === 1) { + body = []; + } else if (seg.length === 3 && seg[2] === 'layers') { + const row = server.active.get(`${seg[0]}/${seg[1]}`); + if (row) body = { code: null, overlay: row, overlayScope: 'env', effective: row, draft: null }; + else [status, body] = [404, { error: { code: 'NOT_FOUND', message: 'absent' } }]; + } else if (seg.length === 2) { + [status, body] = [404, { error: { code: 'NO_DRAFT', message: 'absent' } }]; + } + } + server.requests.push({ method, path: url.pathname, status }); + return json(status, body); +} + +const client = new MetadataClient({ baseUrl: '', fetch: vi.fn(serve) as unknown as typeof fetch }); + +const listItem = (name: string, isDefault: boolean) => ({ + name, + object: OBJECT, + viewKind: 'list', + ...(isDefault ? { isDefault: true } : {}), + config: { type: 'grid', data: { provider: 'object', object: OBJECT }, columns: ['title'] }, +}); + +function metadataOf(listViews: Record | undefined, status: MetadataTypeStatus | null): MetadataContextValue { + return { + apps: [], + objects: [{ name: OBJECT, label: 'Ticket', fields: { title: { name: 'title', type: 'text' } }, ...(listViews ? { listViews } : {}) }], + dashboards: [], + reports: [], + pages: [], + loading: false, + error: null, + refresh: async () => {}, + invalidate: () => {}, + ensureType: async () => [], + getItem: async () => null, + getItemsByType: () => [], + ...(status ? { getTypeStatus: () => status } : {}), + }; +} + +let latest: ObjectListViewDraft | null = null; +function Probe() { + const leaf: Surface = { type: 'object', name: OBJECT, label: OBJECT }; + const d = useObjectListViewDraft({ client, packageId: PKG, leaf, publishNonce: 0 }); + React.useLayoutEffect(() => { + latest = d; + }); + return null; +} + +const settle = () => + act(async () => { + for (let i = 0; i < 20; i++) await new Promise((r) => setTimeout(r, 0)); + }); + +async function open(metadata: MetadataContextValue) { + const view = render( + + + , + ); + await settle(); + return { + d: () => latest!, + rerender: async (next: MetadataContextValue) => { + view.rerender( + + + , + ); + await settle(); + }, + }; +} + +const layersAsked = (name: string) => + server.requests.filter((r) => r.method === 'GET' && r.path === `/api/v1/meta/view/${name}/layers`).map((r) => r.status); + +beforeEach(() => { + server.active.clear(); + server.requests = []; + latest = null; +}); +afterEach(cleanup); + +describe('useObjectListViewDraft — the fallback default view is not asked for /layers (objectstack#36750)', () => { + it('no view flagged default and none held under the fallback id: no /layers, and the buffer reads "not created yet"', async () => { + const { d } = await open(metadataOf(undefined, 'ready')); + + expect(d().target).toEqual({ objectName: OBJECT, viewId: FALLBACK, isDefault: true }); + expect(d().targetIsFallback).toBe(true); + expect(layersAsked(FALLBACK)).toEqual([]); + expect(server.requests.filter((r) => r.status >= 400)).toEqual([]); + expect(d().loadedFor).toBe(`listView:${FALLBACK}`); + expect(d().row).toBeNull(); + expect(d().failure).toBeNull(); + }); + + it('CONTROL: a published default view the merged listViews holds still reads its layer', async () => { + const all = listItem(`${OBJECT}.all`, true); + server.active.set(`view/${all.name}`, all); + const { d } = await open(metadataOf({ [all.name]: { ...all.config, name: all.name, isDefault: true } }, 'ready')); + + expect(d().target?.viewId).toBe(`${OBJECT}.all`); + expect(d().targetIsFallback).toBe(false); + expect(layersAsked(`${OBJECT}.all`)).toEqual([200]); + expect(d().row).toEqual(all); + }); + + it('CONTROL: a view held under `default` unflagged is no fallback, and still reads its layer', async () => { + const held = listItem(FALLBACK, false); + server.active.set(`view/${FALLBACK}`, held); + // An object document's own `listViews` keys its entries bare. + const { d } = await open(metadataOf({ default: { ...held.config } }, 'ready')); + + expect(d().target).toEqual({ objectName: OBJECT, viewId: FALLBACK, isDefault: true }); + expect(d().targetIsFallback).toBe(false); + expect(layersAsked(FALLBACK)).toEqual([200]); + expect(d().row).toEqual(held); + }); + + it('CONTROL: while the shell\'s objects are loading the layer is read as before; once they answer, it is not read again', async () => { + const { d, rerender } = await open(metadataOf(undefined, 'loading')); + + expect(d().targetIsFallback).toBe(false); + expect(layersAsked(FALLBACK)).toEqual([404]); + expect(d().row).toBeNull(); + expect(d().failure).toBeNull(); + + await rerender(metadataOf(undefined, 'ready')); + expect(d().targetIsFallback).toBe(true); + expect(layersAsked(FALLBACK)).toEqual([404]); + expect(d().loadedFor).toBe(`listView:${FALLBACK}`); + expect(d().row).toBeNull(); + }); + + it('CONTROL: a context that reports no load status proves no absence, so the layer is read as before', async () => { + const { d } = await open(metadataOf(undefined, null)); + + expect(d().targetIsFallback).toBe(false); + expect(layersAsked(FALLBACK)).toEqual([404]); + expect(d().row).toBeNull(); + expect(d().failure).toBeNull(); + }); +}); + +describe('useServedOverride — an item flagged `unpublished` is not asked for its layers (objectstack#36750)', () => { + let served: ServedOverride | null = null; + function ServedProbe({ fake, unpublished, pair }: { fake: Parameters[0]; unpublished: boolean; pair: string | null }) { + const s = useServedOverride(fake, { type: 'view', name: FALLBACK, ...(unpublished ? { unpublished: true } : {}) }, 'com.acme.base', pair, 0); + React.useLayoutEffect(() => { + served = s; + }); + return null; + } + const fakeClient = () => ({ + getDraft: vi.fn(async () => null), + layered: vi.fn(async () => ({ code: null, overlay: null, overlayScope: null, effective: null })), + }); + + it('skips the layered read and answers as its 404 did, after reading the pair\'s draft', async () => { + const fake = fakeClient(); + render(); + await settle(); + + expect(fake.layered).not.toHaveBeenCalled(); + expect(fake.getDraft).toHaveBeenCalledTimes(1); + expect(served).toEqual({ declaration: null, state: null, shipped: 'none' }); + }); + + it('CONTROL: an item not flagged still reads its layers, with the same answer for nothing published', async () => { + const fake = fakeClient(); + render(); + await settle(); + + expect(fake.layered).toHaveBeenCalledTimes(1); + expect(served).toEqual({ declaration: null, state: null, shipped: 'none' }); + }); +}); diff --git a/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.layersUnsaved-11799.test.tsx b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.layersUnsaved-11799.test.tsx index 1d82196d818..5ff2e88de69 100644 --- a/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.layersUnsaved-11799.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.layersUnsaved-11799.test.tsx @@ -22,11 +22,13 @@ * the buffer holds its published layer, as before. * * A view that exists nowhere yet (no draft, no layer: the default list view of - * an object that has none) still asks `/layers` and gets its 404. Nothing the - * hook holds says the view was never saved: its draft read says only whether a - * draft is pending, and the object's `listViews` from the metadata cache is not - * read as that answer here (the 11823 pillar suite serves a default view its - * object definition does not list). The framework keeps that 404 by design + * an object that has none) still asks `/layers` HERE and gets its 404: this + * suite's metadata context reports no load status, so the object's `listViews` + * from it is no answer that the view was never saved (the 11823 pillar suite + * serves a default view its object definition does not list). Under a + * metadata cache that reports its objects loaded, the fallback id is not asked + * at all (objectstack#36750, ObjectListViewInspector.fallbackNoLayers-36750). + * The framework keeps that 404 by design * (objectstack-ai/objectstack#22397, answer (a)), and `MetadataClient.layered()` * resolves it as an envelope with every layer null, so the buffer reads it as * "not created yet": no row, no failure, and the canvas shows the view the first diff --git a/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx index 222e503bd32..904b40898b9 100644 --- a/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx +++ b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx @@ -187,6 +187,22 @@ export function listViewTargetOf( return { objectName, viewId: qualifiedViewId(objectName, flagged ?? 'default'), isDefault: true }; } +/** + * objectstack#36750 — whether `target` is the fallback default view: the + * object's default list view (`isDefault`) whose id no view of `views` is held + * under. {@link listViewTargetOf} names `.default` when no view is + * flagged default, and nothing is published under that name until the + * panel's first edit creates the view and a publish makes it live, so the + * server answers `GET …/layers` for it with a 404 (objectstack#22397). `views` + * is the map {@link listViewTargetOf} read: the object's merged `listViews`, + * which holds every view item the server serves for it under its qualified + * name (`mergeViewsIntoObjects`), with this package's drafted list views. + */ +export function isFallbackListView(target: ListViewTarget, views: Record): boolean { + if (!target.isDefault) return false; + return !Object.keys(views).some((key) => qualifiedViewId(target.objectName, key) === target.viewId); +} + /** * A view item that does not exist yet: the record shape, bound to its object, * listing `columns`. Flagged default only where it is the object's default @@ -352,6 +368,13 @@ export interface ObjectListViewDraft { views: ListViewChoice[]; /** The autosave's `target`: the buffer key of the view ({@link listViewBufferKey}), `''` with no target. */ targetKey: string; + /** + * objectstack#36750 — `target` is the fallback default view + * ({@link isFallbackListView}): no view of the object is flagged default, and + * no view is held under the id it falls back to. Nothing is published under + * it, so nothing asks its published layer. + */ + targetIsFallback: boolean; /** The autosave's `loadedFor`: the target the buffer was loaded for. */ loadedFor: string; /** The view item as the server holds it (draft, else published), with edits; `null` when it does not exist yet. */ @@ -549,9 +572,8 @@ export function useObjectListViewDraft({ const draftViewRows = viewDraftsRead ? viewDrafts.rows : []; // objectstack#30177 — the entry's view among the merged views and this // package's drafted list views (the module docblock's "Which view"). - const entryTarget = objectName - ? listViewTargetOf(objectName, landingViewName, { ...publishedViews, ...draftedListViewsOf(objectName, draftViewRows) }) - : null; + const knownViews = objectName ? { ...publishedViews, ...draftedListViewsOf(objectName, draftViewRows) } : {}; + const entryTarget = objectName ? listViewTargetOf(objectName, landingViewName, knownViews) : null; const entryUnsettled = !!entryTarget?.isDefault && !viewDraftsRead && @@ -572,6 +594,16 @@ export function useObjectListViewDraft({ objectName && !holding ? listViewChoicesOf(objectName, publishedViews, draftViewRows, entryTarget, target) : []; const viewId = target?.viewId ?? ''; const targetKey = viewId ? listViewBufferKey(viewId) : ''; + // objectstack#36750 — the target is the fallback default view, read only off + // an answer that can say so: this package's view drafts have answered, and + // the shell's objects are composed with the `/meta/view` list it served + // (`getTypeStatus('object')` is `ready` only then). While either is still + // loading, or refetching after a publish, the view may yet be listed, so its + // layer is read as before. A context that reports no status (a hand-rolled + // one) is no such answer either: absence from its objects proves nothing. + const metadataSettled = metadata.getTypeStatus?.('object') === 'ready'; + const targetIsFallback = + !!target && viewDraftsRead && metadataSettled && isFallbackListView(target, knownViews); // objectstack#30317 — a draft-only object is absent from the merged // metadata, so the columns a view created here starts with are read off // this package's drafted definition, read with the drafts overlaid (the @@ -714,7 +746,9 @@ export function useObjectListViewDraft({ // already carries that layer, so it is not asked again. const layeredAt = { packageId }; const draftLayers = readAt === packageId ? (authoredRead?.layers ?? null) : null; - const lay = objectDraftOnly + // objectstack#36750 — nor for the fallback default view: nothing is + // published under its id, so its layer would answer 404 too. + const lay = objectDraftOnly || (!draft && targetIsFallback) ? null : !draft ? await client.layered('view', viewId, layeredAt) @@ -753,7 +787,7 @@ export function useObjectListViewDraft({ return () => { cancelled = true; }; - }, [client, viewId, holding, objectName, packageId, publishNonce, reloadNonce, recordRead, customizing]); + }, [client, viewId, holding, objectName, packageId, publishNonce, reloadNonce, recordRead, customizing, targetIsFallback]); const edit = React.useCallback((row: Row) => { setBuffer((b) => ({ ...b, row, dirty: true })); @@ -865,6 +899,7 @@ export function useObjectListViewDraft({ entryTarget: pickedViewId ? entryTarget : null, views, targetKey, + targetIsFallback, loadedFor: buffer.for, row: current ? row : null, notList: current && notList, diff --git a/ui/packages/app-shell/src/views/studio-design/StudioCustomizeControls.tsx b/ui/packages/app-shell/src/views/studio-design/StudioCustomizeControls.tsx index 26442c523e5..9270b0716b5 100644 --- a/ui/packages/app-shell/src/views/studio-design/StudioCustomizeControls.tsx +++ b/ui/packages/app-shell/src/views/studio-design/StudioCustomizeControls.tsx @@ -178,10 +178,16 @@ const NO_OVERRIDE: ServedOverride = { declaration: null, state: null, shipped: n * A failed read is no declaration, as an absent one: no fact, no badge. * The same layered read says whether the base ships the item * ({@link ServedOverride.shipped}). + * + * objectstack#36750 — `item.unpublished`: the caller knows nothing is + * published under the item's name (a list view's fallback default id, which + * no view is held under). The layered read is not asked, and the answer is + * the one its 404 gave: no override, `shipped: 'none'`. The pair's draft is + * still read first: the item's first save into the pair creates it there. */ export function useServedOverride( client: Pick, - item: { type: string; name: string; member?: string } | null, + item: { type: string; name: string; member?: string; unpublished?: boolean } | null, base: string | null, pair: string | null, nonce: string | number, @@ -189,7 +195,8 @@ export function useServedOverride( const itemType = item?.type ?? ''; const itemName = item?.name ?? ''; const itemMember = item?.member ?? ''; - const key = itemType && itemName && base ? JSON.stringify([itemType, itemName, itemMember, base]) : ''; + const itemUnpublished = item?.unpublished === true; + const key = itemType && itemName && base ? JSON.stringify([itemType, itemName, itemMember, base, itemUnpublished]) : ''; const [answer, setAnswer] = React.useState<{ key: string; served: ServedOverride }>({ key: '', served: NO_OVERRIDE }); React.useEffect(() => { if (!key || !base) return; @@ -204,6 +211,7 @@ export function useServedOverride( const declared = declaredOverrideOf(extractDraftBody(draft), base); if (declared) return { declaration: declared, state: 'draft', shipped: null }; } + if (itemUnpublished) return { declaration: null, state: null, shipped: 'none' }; const layered = await client .layered(itemType, itemName, { packageId: base, ...memberScope }) .catch(() => null); @@ -217,7 +225,7 @@ export function useServedOverride( return () => { cancelled = true; }; - }, [client, key, itemType, itemName, itemMember, base, pair, nonce]); + }, [client, key, itemType, itemName, itemMember, itemUnpublished, base, pair, nonce]); // A re-read of the same item keeps the last answer until it lands, so the // badge does not blink off and on after a save. return key && answer.key === key ? answer.served : NO_OVERRIDE; diff --git a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx index 9a0c91440ce..654540570c4 100644 --- a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx +++ b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx @@ -3575,7 +3575,10 @@ export function InterfacesPillar({ const listViewAsked = customizing && listViewTargetId !== null; const listViewServed = useServedOverride( client, - listViewAsked && listViewTargetId ? { type: 'view', name: listViewTargetId } : null, + // objectstack#36750 — the fallback default view has no published layer to ask. + listViewAsked && listViewTargetId + ? { type: 'view', name: listViewTargetId, ...(listView.targetIsFallback ? { unpublished: true } : {}) } + : null, customizeBase, customizePair, `${servedKey}:${listViewRestoreNonce}`, From 31dfa88742e1018a8c97274700580547eeee5338 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 22:23:49 +0000 Subject: [PATCH 2/2] test(studio): pay the lazy lint load at collection in the two list-view layer suites Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01JQwxbWBvGf6TP6P9XT1tuo --- .../ObjectListViewInspector.fallbackNoLayers-36750.test.tsx | 3 +++ .../ObjectListViewInspector.layersUnsaved-11799.test.tsx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.fallbackNoLayers-36750.test.tsx b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.fallbackNoLayers-36750.test.tsx index 9d07aa9bd55..e0950a1815d 100644 --- a/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.fallbackNoLayers-36750.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.fallbackNoLayers-36750.test.tsx @@ -35,6 +35,9 @@ */ import '@testing-library/jest-dom/vitest'; +// Paid at collection, not inside a clocked case (check:test-source-alias): +// the source under test loads `@objectstack/lint` lazily. +import '@objectstack/lint'; import * as React from 'react'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { act, cleanup, render } from '@testing-library/react'; diff --git a/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.layersUnsaved-11799.test.tsx b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.layersUnsaved-11799.test.tsx index 5ff2e88de69..d744e6648cb 100644 --- a/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.layersUnsaved-11799.test.tsx +++ b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.layersUnsaved-11799.test.tsx @@ -37,6 +37,9 @@ */ import '@testing-library/jest-dom/vitest'; +// Paid at collection, not inside a clocked case (check:test-source-alias): +// the source under test loads `@objectstack/lint` lazily. +import '@objectstack/lint'; import * as React from 'react'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { act, cleanup, render, screen } from '@testing-library/react';