String(t.id)).join(',')}
+ />
+ );
+ });
+
+ afterEach(cleanup);
+
+ const ROWS = [
+ { id: '1', subject: 'Alpha', status: 'open', visible_from: '2026-01-01', due_date: '2026-01-31' },
+ { id: '2', subject: 'Bravo', status: 'closed', visible_from: '2026-02-01', due_date: '2026-02-28' },
+ { id: '3', subject: 'Charlie', status: 'open', visible_from: '2026-03-01', due_date: '2026-03-31' },
+ { id: '4', subject: 'Delta', status: 'closed', visible_from: '2026-04-01', due_date: '2026-04-30' },
+ { id: '5', subject: 'Echo', status: 'open', visible_from: '2026-05-01', due_date: '2026-05-31' },
+ ];
+
+ /** The three rows a `status = open` filter declares, in every spelling. */
+ const OPEN_IDS = '1,3,5';
+ const RULE_ARRAY_FILTER = [{ field: 'status', operator: 'equals', value: 'open' }];
+ const RECORD_FORM_FILTER = { status: 'open' };
+ const AST_FILTER = [['status', '=', 'open']];
+
+ const base: any = {
+ type: 'object-gantt',
+ gantt: {
+ titleField: 'subject',
+ startDateField: 'visible_from',
+ endDateField: 'due_date',
+ },
+ };
+
+ function drawn() {
+ const el = screen.getByTestId('gantt-view');
+ return {
+ count: el.getAttribute('data-task-count'),
+ ids: el.getAttribute('data-task-ids'),
+ };
+ }
+
+ describe('objectui#10767 — the gantt charts the rows a rule-array `filter` selects on inline `value` data', () => {
+ it('ruleArrayFilter: the spec’s rule array charts the three declared rows', async () => {
+ render(
+
,
+ );
+ await waitFor(() => expect(screen.getByTestId('gantt-view')).toBeTruthy());
+ await waitFor(() => expect(drawn().count).toBe('3'));
+ expect(drawn().ids).toBe(OPEN_IDS);
+ });
+
+ it('ruleArrayFilterStaticData: the `staticData` rung reaches the same repair', async () => {
+ render(
);
+ await waitFor(() => expect(screen.getByTestId('gantt-view')).toBeTruthy());
+ await waitFor(() => expect(drawn().count).toBe('3'));
+ expect(drawn().ids).toBe(OPEN_IDS);
+ });
+
+ it('recordFormControl: the record form charts the same three (green on both trees)', async () => {
+ render(
+
,
+ );
+ await waitFor(() => expect(screen.getByTestId('gantt-view')).toBeTruthy());
+ await waitFor(() => expect(drawn().count).toBe('3'));
+ expect(drawn().ids).toBe(OPEN_IDS);
+ });
+
+ it('astControl: the AST form charts the same three (green on both trees)', async () => {
+ render(
+
,
+ );
+ await waitFor(() => expect(screen.getByTestId('gantt-view')).toBeTruthy());
+ await waitFor(() => expect(drawn().count).toBe('3'));
+ expect(drawn().ids).toBe(OPEN_IDS);
+ });
+ });
+});
diff --git a/ui/packages/plugin-gantt/src/ObjectGantt.hostDataProp-7210.test.tsx b/ui/packages/plugin-gantt/src/ObjectGantt.hostDataProp-7210.test.tsx
deleted file mode 100644
index c01b35621bf..00000000000
--- a/ui/packages/plugin-gantt/src/ObjectGantt.hostDataProp-7210.test.tsx
+++ /dev/null
@@ -1,166 +0,0 @@
-/**
- * ObjectUI
- * Copyright (c) 2024-present ObjectStack Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/**
- * objectui#7210 — the registered `object-gantt` renderer draws its OWN query,
- * not the host's rows.
- *
- * This is the measured basis for the paging-chrome correction one package over
- * (`plugin-list/src/ListView.tsx`, `surfaceDrawsFetchedRows`): a host that
- * fetches a page and hands it down as `data` — `ListView` does exactly that,
- * for every view type — does not thereby feed the chart. `ObjectGanttRenderer`
- * (`./index`) destructures `{ schema }` and renders
- * `< ObjectGantt schema={bound} dataSource={dataSource} / >`, forwarding no
- * other prop, so `ObjectGantt.reload`'s `rest.data` short-circuit is never
- * reached from the registry path and the component queries for itself. The
- * sibling wrappers (`object-grid`, `object-kanban`, `object-calendar`,
- * `object-map`, `object-tree`) all spread `{...props}`; this one is the outlier.
- *
- * Two facts are pinned, because the footer correction rests on both:
- *
- * 1. the rows drawn are the ADAPTER's, not the host `data` prop's;
- * 2. the query's `$top` is the PLATFORM CEILING — so its row count is not the
- * host's page size and cannot be made to be by authoring
- * `pagination.pageSize`.
- *
- * ⛔ Do not "fix" (1) by spreading `{...props}` in the renderer. That caps the
- * chart at the host's page — a complete schedule silently becomes a truncated
- * one that still looks like a schedule.
- *
- * ⚠️ Case (2) changed shape when objectui#7210's half 2 was RULED (a′,
- * 2026-09-02) and kept its point. When this file was written the answer was
- * open and the query carried no `$top` at all; the ruling settled it — a
- * non-grid view may fetch the whole filtered set up to a PLATFORM CEILING
- * expressed as a named constant in the renderer, and past it must say so
- * loudly. So the assertion moves from "no cap" to "the cap is the platform's",
- * which is what still separates it from the forbidden direction: `pageSize: 2`
- * is on this schema and the query is not 2 rows wide. The pin that the host's
- * page cannot bound the chart is unchanged; only the reason the number is not
- * the host's has been written down.
- *
- * REVERSE VERIFICATION — direction and counts predicted before running: add
- * `{...props}` to the `ObjectGanttRenderer` children callback and BOTH
- * assertions in the first case flip (5 rows → 2, host rows drawn), while the
- * `$top` case stays green because the component never gets as far as querying.
- */
-
-import React from 'react';
-import { render, screen, waitFor } from '@testing-library/react';
-import { describe, it, expect, vi, beforeEach } from 'vitest';
-import { SchemaRendererProvider, SchemaRenderer } from '@object-ui/react';
-import { nonGridRowCeilingQuery } from '@object-ui/core';
-import './index';
-
-vi.mock('sonner', () => ({ toast: { error: vi.fn() } }));
-
-vi.mock('./GanttView', () => ({
- GanttView: ({ tasks }: any) => (
-
- {tasks.map((t: any) => (
-
{t.title}
- ))}
-
- ),
-}));
-
-vi.mock('@object-ui/plugin-detail', async (importOriginal) => ({
- ...(await importOriginal
()),
- RecordDetailDrawer: () => null,
- deriveRecordPageHref: () => null,
-}));
-
-/** What the adapter answers with — the whole result set. */
-const ADAPTER_ROWS = Array.from({ length: 5 }, (_, i) => ({
- id: String(i + 1),
- subject: `Adapter task ${i + 1}`,
- visible_from: '2026-01-01',
- due_date: '2026-01-10',
-}));
-
-/** What a paging host hands down as `data` — one page of it. */
-const HOST_PAGE = ADAPTER_ROWS.slice(0, 2).map(r => ({ ...r, subject: `Host task ${r.id}` }));
-
-const schema: any = {
- type: 'object-gantt',
- objectName: 'duly_task',
- gantt: {
- titleField: 'subject',
- startDateField: 'visible_from',
- endDateField: 'due_date',
- },
-};
-
-let calls: Array> = [];
-
-function makeDataSource() {
- return {
- find: vi.fn(async (_resource: string, params: any) => {
- calls.push({ ...(params ?? {}) });
- return { data: ADAPTER_ROWS, total: ADAPTER_ROWS.length };
- }),
- findOne: vi.fn(),
- create: vi.fn(),
- update: vi.fn(),
- delete: vi.fn(),
- getObjectSchema: vi.fn(async () => ({
- name: 'duly_task',
- fields: {
- id: { name: 'id', type: 'text' },
- subject: { name: 'subject', type: 'text' },
- visible_from: { name: 'visible_from', type: 'date' },
- due_date: { name: 'due_date', type: 'date' },
- },
- })),
- } as any;
-}
-
-describe('objectui#7210 — object-gantt ignores a host `data` prop', () => {
- beforeEach(() => {
- calls = [];
- });
-
- it('draws the adapter rows, not the page the host handed down', async () => {
- const dataSource = makeDataSource();
-
- render(
-
-
- ,
- );
-
- await waitFor(() => expect(screen.getByTestId('gantt-view')).toBeTruthy());
- await waitFor(() =>
- expect(screen.getByTestId('gantt-view').getAttribute('data-task-count')).toBe('5'),
- );
-
- // The host's two rows are nowhere on screen; all five adapter rows are.
- expect(screen.queryByText('Host task 1')).toBeNull();
- expect(screen.getByText('Adapter task 5')).toBeTruthy();
- expect(calls.length).toBeGreaterThan(0);
- });
-
- it('issues its query at the PLATFORM ceiling — the host page size cannot bound it', async () => {
- const dataSource = makeDataSource();
-
- render(
-
-
- ,
- );
-
- await waitFor(() => expect(calls.length).toBeGreaterThan(0));
-
- for (const params of calls) {
- // Not `pagination.pageSize` (2), and not absent either: the platform
- // ceiling, one probe row wide so the cut is detectable.
- expect(params.$top).not.toBe(2);
- expect(params.$top).toBe(nonGridRowCeilingQuery().$top);
- expect(params.$skip).toBeUndefined();
- }
- });
-});
diff --git a/ui/packages/plugin-gantt/src/ObjectGantt.inlineQueryKeys-8769.test.tsx b/ui/packages/plugin-gantt/src/ObjectGantt.inlineQueryKeys-8769.test.tsx
deleted file mode 100644
index 5fb77cc1d47..00000000000
--- a/ui/packages/plugin-gantt/src/ObjectGantt.inlineQueryKeys-8769.test.tsx
+++ /dev/null
@@ -1,277 +0,0 @@
-/**
- * ObjectUI
- * Copyright (c) 2024-present ObjectStack Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/**
- * objectui#8769 — a `provider: 'value'` gantt honours the three query keys the
- * fetching path honours: `filter`, `sort`, and the objectui#7210 row ceiling.
- *
- * ## What was wrong
- *
- * `reload` short-circuited the inline provider (`setData(dataItems)`; return)
- * BEFORE `effectiveDataSource.find(...)`, which is the ONE site that lowers
- * `schema.filter` to `$filter`, `schema.sort` to `$orderby` and the ceiling to
- * `$top`. An authored `filter` therefore reached nothing and every inline row
- * was charted — the fail-OPEN direction: the key that was ignored is the key
- * that NARROWS, so the author saw MORE rows than declared, with no diagnostic.
- *
- * ⛔ Not a data-exposure boundary. The rows are already in the authored schema;
- * what is wrong is that the chart answers a question nobody asked.
- *
- * ## The two-sided reading is the finding
- *
- * A one-sided reproduction cannot tell "the filter was ignored" from "the
- * filter matched everything", so the first case renders the SAME rows and the
- * SAME filter twice — once inline, once through a context adapter — and reads
- * the DISAGREEMENT. The adapter is a `ValueDataSource` over the same rows, so
- * the matcher is literally the same object on both sides and the only variable
- * left is which branch of `reload` ran.
- *
- * ## ORDER: filter first, ceiling second (objectui#7210 ruling a′)
- *
- * The ceiling is applied to the FILTERED set, matching the fetching path
- * exactly — there `$filter` and `$top` travel in one query and every backend
- * filters before it limits. `ceilingOrder` pins it from the observable side: a
- * set that is over the ceiling BEFORE filtering and under it after draws every
- * matching row and shows NO footnote. A ceiling-then-filter implementation
- * would draw at most 2,000 rows there and would still footnote.
- *
- * ## The `never capped by us` case this file replaces
- *
- * `ObjectGantt.rowCeiling-7210.test.tsx` asserted that an inline set is never
- * capped and never footnoted. That case pinned the SHORT-CIRCUIT's behaviour,
- * not ruling a′: the ruling's own budget is measured in DOM ELEMENTS PER
- * RECORD (its table was measured over "real child views, inline `value`
- * provider"), and an inline row costs the browser exactly what a fetched row
- * costs. Nothing in the ruling text carves the provider out. So the exemption
- * moves here, inverted, with the triage ruling on objectui#8769 as its
- * authority — and `ceilingNote` below is what makes the cut loud rather than
- * silent, which is the half ruling a′ actually protects.
- *
- * ## Live adjacency, measured (objectui#9001 / PR objectui#9049)
- *
- * That card makes core's `convertFiltersToAST` THROW `FilterOperatorError` for
- * an `$icontains` comparand that is not a non-empty string. This repair does
- * NOT inherit it: the inline provider resolves to `ValueDataSource`, whose
- * matcher is local and refuses by EXCLUDING the row and logging once. Since
- * objectui#10767 that adapter does reach the converter — its array arm lowers
- * a spec `ViewFilterRule[]` through `toFilterNode` before matching — but a
- * refusal the lowering raises is re-seated as the same excluded-and-logged
- * refusal, never rethrown from `find`; an AST tuple like the one below is
- * passed through the sink untouched and judged by the matcher's own comparand
- * door. `refusedComparandDoesNotThrow` pins the consequence from the outside
- * either way: a render, not a throw.
- *
- * REVERSE VERIFICATION — direction predicted BEFORE running, from the committed
- * fix, by restoring the short-circuit: `twoSidedFilter`, `inlineSort`,
- * `staticDataSpelling`, `ceilingCap`, `ceilingNote` and `ceilingOrder` go RED;
- * `control` and `refusedComparandDoesNotThrow` stay GREEN (the control draws
- * the same rows in the same order either way, which is what makes it a
- * control).
- */
-
-import React from 'react';
-import { render, screen, waitFor } from '@testing-library/react';
-import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
-import { NON_GRID_ROW_CEILING, nonGridRowCeilingQuery, ValueDataSource } from '@object-ui/core';
-import { ObjectGantt } from './ObjectGantt';
-
-vi.mock('sonner', () => ({ toast: { error: vi.fn() } }));
-
-// The bar canvas is irrelevant here — every assertion is about WHICH rows
-// reached the chart and in WHAT ORDER. Same stub the sibling ObjectGantt pins
-// use, widened by the id list because `sort` is unreadable from a count.
-vi.mock('./GanttView', () => ({
- GanttView: ({ tasks }: any) => (
- String(t.id)).join(',')}
- />
- ),
-}));
-
-vi.mock('@object-ui/plugin-detail', async (importOriginal) => ({
- ...(await importOriginal
()),
- RecordDetailDrawer: () => null,
- deriveRecordPageHref: () => null,
-}));
-
-const ROWS = [
- { id: '1', subject: 'Alpha', status: 'open', rank: 30, visible_from: '2026-01-01', due_date: '2026-01-31' },
- { id: '2', subject: 'Bravo', status: 'closed', rank: 10, visible_from: '2026-02-01', due_date: '2026-02-28' },
- { id: '3', subject: 'Charlie', status: 'open', rank: 40, visible_from: '2026-03-01', due_date: '2026-03-31' },
- { id: '4', subject: 'Delta', status: 'closed', rank: 20, visible_from: '2026-04-01', due_date: '2026-04-30' },
- { id: '5', subject: 'Echo', status: 'open', rank: 50, visible_from: '2026-05-01', due_date: '2026-05-31' },
-];
-
-/** The three rows an authored `status = open` filter declares. */
-const OPEN_IDS = '1,3,5';
-const OPEN_FILTER = [['status', '=', 'open']];
-
-const base: any = {
- type: 'object-gantt',
- gantt: {
- titleField: 'subject',
- startDateField: 'visible_from',
- endDateField: 'due_date',
- },
-};
-
-function drawn() {
- const el = screen.getByTestId('gantt-view');
- return {
- count: el.getAttribute('data-task-count'),
- ids: el.getAttribute('data-task-ids'),
- };
-}
-
-function makeRows(n: number, status: (i: number) => string = () => 'open') {
- return Array.from({ length: n }, (_, i) => ({
- id: String(i + 1),
- subject: `Task ${i + 1}`,
- status: status(i),
- visible_from: '2026-01-01',
- due_date: '2026-12-31',
- }));
-}
-
-describe('objectui#8769 — the inline `value` provider honours filter / sort / the row ceiling', () => {
- let warn: ReturnType;
-
- beforeEach(() => {
- warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
- });
- afterEach(() => {
- warn.mockRestore();
- vi.unstubAllGlobals();
- });
-
- it('twoSidedFilter: the inline path and the fetching path agree on the SAME rows and the SAME filter', async () => {
- // One matcher, two branches of `reload`. Any disagreement here is the
- // short-circuit and nothing else.
- const dataSource = new ValueDataSource({ items: ROWS }) as any;
-
- const { unmount } = render(
- ,
- );
- await waitFor(() => expect(screen.getByTestId('gantt-view')).toBeTruthy());
- await waitFor(() => expect(drawn().count).toBe('3'));
- const inline = drawn();
- unmount();
-
- render(
- ,
- );
- await waitFor(() => expect(drawn().count).toBe('3'));
- const fetching = drawn();
-
- expect(inline.ids).toBe(OPEN_IDS);
- expect(fetching.ids).toBe(OPEN_IDS);
- // The finding, stated as the two paths agreeing.
- expect(inline.ids).toBe(fetching.ids);
- });
-
- it('inlineSort: an authored `sort` orders the inline rows', async () => {
- render(
- ,
- );
- await waitFor(() => expect(drawn().count).toBe('5'));
- // rank 50,40,30,20,10 → Echo, Charlie, Alpha, Delta, Bravo
- expect(drawn().ids).toBe('5,3,1,4,2');
- });
-
- it('staticDataSpelling: the `staticData` rung reaches the same repair', async () => {
- // The ruled three-rung ladder wraps `staticData` into
- // `{ provider: 'value', items }`, so it lands on exactly this path. It is
- // the second spelling an author can use and it needs its own row.
- render();
- await waitFor(() => expect(drawn().count).toBe('3'));
- expect(drawn().ids).toBe(OPEN_IDS);
- });
-
- it('ceilingCap: an inline set past the ceiling draws exactly the ceiling', async () => {
- render(
- ,
- );
- await waitFor(() => expect(drawn().count).toBe(String(NON_GRID_ROW_CEILING)));
- });
-
- it('ceilingNote: the cut is LOUD — the footnote names both numbers', async () => {
- const total = nonGridRowCeilingQuery().$top + 500;
- render(
- ,
- );
- await waitFor(() => expect(drawn().count).toBe(String(NON_GRID_ROW_CEILING)));
-
- const note = await screen.findByRole('note');
- expect(note.getAttribute('data-row-ceiling-note')).toBe('non-grid');
- expect(note.textContent).toContain(String(NON_GRID_ROW_CEILING));
- expect(note.textContent).toContain(String(total));
- });
-
- it('ceilingOrder: the ceiling is applied to the FILTERED set, not to the raw one', async () => {
- // Over the ceiling before filtering, under it after: 2,400 rows of which
- // only every third is `open` (800). Filter-then-ceiling draws all 800 and
- // stays quiet; ceiling-then-filter could not.
- const rows = makeRows(2400, (i) => (i % 3 === 0 ? 'open' : 'closed'));
- render(
- ,
- );
- await waitFor(() => expect(drawn().count).toBe('800'));
- expect(screen.queryByRole('note')).toBeNull();
- });
-
- it('control: an inline chart with NO filter, NO sort and under the ceiling is unchanged', async () => {
- // ⭐ Green on BOTH ablation legs by construction. Without it a reviewer
- // cannot tell this repair from "the inline path now drops rows".
- render();
- await waitFor(() => expect(drawn().count).toBe('5'));
- expect(drawn().ids).toBe('1,2,3,4,5');
- expect(screen.queryByRole('note')).toBeNull();
- });
-
- it('refusedComparandDoesNotThrow: a comparand core would refuse RENDERS, it does not throw', async () => {
- // objectui#9001 / PR objectui#9049 makes `convertFiltersToAST` throw for
- // this comparand. The inline path resolves to `ValueDataSource`, which
- // judges an AST tuple with its own comparand door — it excludes the row
- // and logs once — and re-seats a refusal its rule-array lowering raises
- // the same way (objectui#10767): `find` does not throw on a bad filter.
- render(
- ,
- );
- await waitFor(() => expect(screen.getByTestId('gantt-view')).toBeTruthy());
- await waitFor(() => expect(drawn().count).toBe('0'));
- expect(
- warn.mock.calls.some((c: unknown[]) => String(c[0]).includes('icontains')),
- ).toBe(true);
- });
-});
diff --git a/ui/packages/plugin-gantt/src/ObjectGantt.rowCeiling-7210.test.tsx b/ui/packages/plugin-gantt/src/ObjectGantt.rowCeiling-7210.test.tsx
deleted file mode 100644
index 455ccd42b84..00000000000
--- a/ui/packages/plugin-gantt/src/ObjectGantt.rowCeiling-7210.test.tsx
+++ /dev/null
@@ -1,215 +0,0 @@
-/**
- * ObjectUI
- * Copyright (c) 2024-present ObjectStack Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/**
- * objectui#7210, half 2 — maintainer ruling a′ (2026-09-02), on the gantt.
- *
- * The ruling, and the pin it names: a non-grid visualisation may fetch the
- * whole FILTERED result set, because a truthful range needs all of it, but the
- * fetch carries a platform-level hard ceiling expressed as a named constant in
- * the renderer, not an authorable view key. Past the ceiling the visualisation
- * draws the first N rows and shows a LOUD FOOTNOTE naming both N and M.
- * Below it: no footnote, and the full set draws.
- *
- * ⛔ The direction the ruling calls dangerous is SILENT truncation — "a cut-off
- * schedule still looks like a schedule". That is precisely what these cases
- * exist to make impossible to reintroduce: the first one would still pass if
- * the footnote were deleted and only the cap kept, so it asserts the note's
- * text and BOTH numbers, not merely the row count.
- *
- * ⛔ This is the CAP, not the gate. objectui#7225's half gates the gantt's
- * DUPLICATE schema-driven query; nothing here is about that, and the two are
- * separate commits on this branch for that reason.
- *
- * REVERSE VERIFICATION — MEASURED, and corrected from what this docblock used
- * to predict (objectui#7507). Removing `...nonGridRowCeilingQuery()` from
- * `ObjectGantt`'s reload turns the truncation case red at the **`$top`
- * assertion**; the below-ceiling case stays green. ⚠️ The pass/fail TALLY that
- * used to be quoted here is deliberately gone: objectui#8769 changed how many
- * cases this file has, and a stale count reads as a measurement.
- *
- * ⚠️ It does NOT go red at the footnote. The prediction that it would — "no
- * probe row ⇒ `truncated` false ⇒ no note" — reads the mechanism backwards,
- * and a wrong mechanism in a docblock is worse than none, because the next
- * reader trusts it while deciding what an edit is safe to break. What actually
- * happens: an adapter with no `$top` answers with the WHOLE filtered set, so
- * `applyNonGridRowCeiling` sees far more rows than the ceiling, slices to it,
- * and reports `truncated` from the rows in hand. The drawn count stays 2,000
- * and the note still names both numbers. The probe row bounds the RESPONSE; it
- * is not what makes truncation detectable once an unbounded one has arrived.
- * So in this file the `$top` is graded by the `$top` assertion and by nothing
- * else — which is the reason that assertion is not redundant with the note.
- */
-
-import React from 'react';
-import { render, screen, waitFor } from '@testing-library/react';
-import { describe, it, expect, vi, beforeEach } from 'vitest';
-import { NON_GRID_ROW_CEILING, nonGridRowCeilingQuery } from '@object-ui/core';
-import { ObjectGantt } from './ObjectGantt';
-
-vi.mock('sonner', () => ({ toast: { error: vi.fn() } }));
-
-// The bar canvas is irrelevant here — every assertion is about how many rows
-// reached the chart and what the component says about them. Same stub the
-// sibling ObjectGantt tests use, for the same reason.
-vi.mock('./GanttView', () => ({
- GanttView: ({ tasks }: any) => (
-
- ),
-}));
-
-vi.mock('@object-ui/plugin-detail', async (importOriginal) => ({
- ...(await importOriginal()),
- RecordDetailDrawer: () => null,
- deriveRecordPageHref: () => null,
-}));
-
-/** The whole filtered result set the store holds. */
-const TOTAL_ROWS = 4321;
-
-function makeRows(n: number) {
- return Array.from({ length: n }, (_, i) => ({
- id: String(i + 1),
- subject: `Task ${i + 1}`,
- visible_from: '2026-01-01',
- due_date: '2026-12-31',
- }));
-}
-
-let calls: Array> = [];
-
-/** An adapter that HONOURS `$top`, the way a real one does. */
-function makeDataSource(storeSize: number) {
- const store = makeRows(storeSize);
- return {
- find: vi.fn(async (_resource: string, params: any) => {
- calls.push({ ...(params ?? {}) });
- const top = typeof params?.$top === 'number' ? params.$top : store.length;
- return { data: store.slice(0, top), total: store.length };
- }),
- findOne: vi.fn(),
- create: vi.fn(),
- update: vi.fn(),
- delete: vi.fn(),
- getObjectSchema: vi.fn(async () => ({
- name: 'duly_task',
- fields: {
- id: { name: 'id', type: 'text' },
- subject: { name: 'subject', type: 'text' },
- visible_from: { name: 'visible_from', type: 'date' },
- due_date: { name: 'due_date', type: 'date' },
- },
- })),
- } as any;
-}
-
-const schema: any = {
- type: 'object-gantt',
- objectName: 'duly_task',
- gantt: {
- titleField: 'subject',
- startDateField: 'visible_from',
- endDateField: 'due_date',
- },
-};
-
-describe('objectui#7210 ruling a′ — the gantt draws at most the platform ceiling, loudly', () => {
- beforeEach(() => {
- calls = [];
- });
-
- it('above the ceiling: draws exactly N rows and names BOTH N and M', async () => {
- const dataSource = makeDataSource(TOTAL_ROWS);
-
- render();
-
- await waitFor(() => expect(screen.getByTestId('gantt-view')).toBeTruthy());
- await waitFor(() =>
- expect(screen.getByTestId('gantt-view').getAttribute('data-task-count')).toBe(
- String(NON_GRID_ROW_CEILING),
- ),
- );
-
- // The fetch asked for one probe row past the ceiling — that is what makes
- // the cut a fact about the rows in hand rather than a guess.
- expect(calls.length).toBeGreaterThan(0);
- for (const params of calls) {
- expect(params.$top).toBe(nonGridRowCeilingQuery().$top);
- }
-
- // ⭐ The half the ruling cares about: the truncation is NOT silent.
- const note = await screen.findByRole('note');
- expect(note.getAttribute('data-row-ceiling-note')).toBe('non-grid');
- expect(note.textContent).toContain(String(NON_GRID_ROW_CEILING));
- expect(note.textContent).toContain(String(TOTAL_ROWS));
- expect(note.textContent).toMatch(/narrow the filter/i);
- });
-
- it('below the ceiling: the full set draws and there is NO footnote', async () => {
- const dataSource = makeDataSource(7);
-
- render();
-
- await waitFor(() =>
- expect(screen.getByTestId('gantt-view').getAttribute('data-task-count')).toBe('7'),
- );
- expect(screen.queryByRole('note')).toBeNull();
- });
-
- /**
- * ⚠️ THIS CASE WAS INVERTED (objectui#8769). It used to read "an inline
- * `value` data set is never capped by us, and never footnoted", and it was
- * green because `reload` returned before the query — the same short-circuit
- * that dropped an authored `filter` on that provider. It pinned the
- * SHORT-CIRCUIT, not ruling a′: the ruling's budget is measured in DOM
- * ELEMENTS PER RECORD, its own measurement table was taken over "real child
- * views, inline `value` provider", and its text carves out no provider. An
- * inline row costs the browser exactly what a fetched row costs.
- *
- * The inline provider's own three-key pin lives in
- * `ObjectGantt.inlineQueryKeys-8769.test.tsx`; this one stays here so the
- * ceiling's own file states the exemption boundary in one place.
- */
- it('an inline `value` data set IS capped, and says so', async () => {
- const total = nonGridRowCeilingQuery().$top + 500;
- const inline: any = {
- ...schema,
- data: { provider: 'value', items: makeRows(total) },
- };
-
- render();
-
- await waitFor(() =>
- expect(screen.getByTestId('gantt-view').getAttribute('data-task-count')).toBe(
- String(NON_GRID_ROW_CEILING),
- ),
- );
- const note = await screen.findByRole('note');
- expect(note.textContent).toContain(String(NON_GRID_ROW_CEILING));
- expect(note.textContent).toContain(String(total));
- });
-
- /**
- * The exemption that REMAINS, and the reason the case above is not a
- * contradiction: rows a HOST component hands down through the `data` prop
- * are not ours to cap — we did not issue the query that produced them and
- * have no `total` to name in a footnote.
- */
- it('a host `data` prop is still never capped, and never footnoted', async () => {
- const rows = makeRows(nonGridRowCeilingQuery().$top + 500);
-
- render();
-
- await waitFor(() =>
- expect(screen.getByTestId('gantt-view').getAttribute('data-task-count')).toBe(
- String(rows.length),
- ),
- );
- expect(screen.queryByRole('note')).toBeNull();
- });
-});
diff --git a/ui/packages/plugin-gantt/src/ObjectGantt.ruleArrayFilter-10767.test.tsx b/ui/packages/plugin-gantt/src/ObjectGantt.ruleArrayFilter-10767.test.tsx
deleted file mode 100644
index 0558529149b..00000000000
--- a/ui/packages/plugin-gantt/src/ObjectGantt.ruleArrayFilter-10767.test.tsx
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * ObjectUI
- * Copyright (c) 2024-present ObjectStack Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/**
- * objectui#10767 — an `object-gantt` with inline rows charts the rows a spec
- * `ViewFilterRule[]` `filter` selects.
- *
- * ## What was wrong
- *
- * `resolveDataSource` (`@object-ui/core`) answers `provider: 'value'` with an
- * in-memory `ValueDataSource`, and `reload` hands `schema.filter` to whichever
- * adapter it resolved, unlowered — the same call for every provider
- * (objectui#8769). On the wire adapter the rule array is translated; on
- * `ValueDataSource` it was refused node by node, so the one filter form the
- * spec's converged `filter` doors accept (objectui#6206 B) charted NO rows on
- * an inline gantt, with one `console.warn` as the only signal. The record form
- * and the AST form charted the three; they are the controls here.
- *
- * The repair is in `@object-ui/core`'s `ValueDataSource` (the array arm lowers
- * through `toFilterNode`), so this file changes nothing in `ObjectGantt.tsx`;
- * it pins the consequence on THIS block, through both of its inline spellings.
- *
- * REVERSE VERIFICATION — direction predicted BEFORE running, from the committed
- * fix, by restoring the unlowered array arm in `ValueDataSource.find`:
- * `ruleArrayFilter` and `ruleArrayFilterStaticData` go RED; `recordFormControl`
- * and `astControl` stay GREEN — they chart the same three either way, which is
- * what makes them controls.
- */
-
-import React from 'react';
-import { render, screen, waitFor, cleanup } from '@testing-library/react';
-import { describe, it, expect, vi, afterEach } from 'vitest';
-import { ObjectGantt } from './ObjectGantt';
-
-vi.mock('sonner', () => ({ toast: { error: vi.fn() } }));
-
-// The bar canvas is irrelevant here — every assertion is about WHICH rows
-// reached the chart. Same stub the sibling ObjectGantt pins use.
-vi.mock('./GanttView', () => ({
- GanttView: ({ tasks }: any) => (
- String(t.id)).join(',')}
- />
- ),
-}));
-
-vi.mock('@object-ui/plugin-detail', async (importOriginal) => ({
- ...(await importOriginal
()),
- RecordDetailDrawer: () => null,
- deriveRecordPageHref: () => null,
-}));
-
-afterEach(cleanup);
-
-const ROWS = [
- { id: '1', subject: 'Alpha', status: 'open', visible_from: '2026-01-01', due_date: '2026-01-31' },
- { id: '2', subject: 'Bravo', status: 'closed', visible_from: '2026-02-01', due_date: '2026-02-28' },
- { id: '3', subject: 'Charlie', status: 'open', visible_from: '2026-03-01', due_date: '2026-03-31' },
- { id: '4', subject: 'Delta', status: 'closed', visible_from: '2026-04-01', due_date: '2026-04-30' },
- { id: '5', subject: 'Echo', status: 'open', visible_from: '2026-05-01', due_date: '2026-05-31' },
-];
-
-/** The three rows a `status = open` filter declares, in every spelling. */
-const OPEN_IDS = '1,3,5';
-const RULE_ARRAY_FILTER = [{ field: 'status', operator: 'equals', value: 'open' }];
-const RECORD_FORM_FILTER = { status: 'open' };
-const AST_FILTER = [['status', '=', 'open']];
-
-const base: any = {
- type: 'object-gantt',
- gantt: {
- titleField: 'subject',
- startDateField: 'visible_from',
- endDateField: 'due_date',
- },
-};
-
-function drawn() {
- const el = screen.getByTestId('gantt-view');
- return {
- count: el.getAttribute('data-task-count'),
- ids: el.getAttribute('data-task-ids'),
- };
-}
-
-describe('objectui#10767 — the gantt charts the rows a rule-array `filter` selects on inline `value` data', () => {
- it('ruleArrayFilter: the spec’s rule array charts the three declared rows', async () => {
- render(
- ,
- );
- await waitFor(() => expect(screen.getByTestId('gantt-view')).toBeTruthy());
- await waitFor(() => expect(drawn().count).toBe('3'));
- expect(drawn().ids).toBe(OPEN_IDS);
- });
-
- it('ruleArrayFilterStaticData: the `staticData` rung reaches the same repair', async () => {
- render();
- await waitFor(() => expect(screen.getByTestId('gantt-view')).toBeTruthy());
- await waitFor(() => expect(drawn().count).toBe('3'));
- expect(drawn().ids).toBe(OPEN_IDS);
- });
-
- it('recordFormControl: the record form charts the same three (green on both trees)', async () => {
- render(
- ,
- );
- await waitFor(() => expect(screen.getByTestId('gantt-view')).toBeTruthy());
- await waitFor(() => expect(drawn().count).toBe('3'));
- expect(drawn().ids).toBe(OPEN_IDS);
- });
-
- it('astControl: the AST form charts the same three (green on both trees)', async () => {
- render(
- ,
- );
- await waitFor(() => expect(screen.getByTestId('gantt-view')).toBeTruthy());
- await waitFor(() => expect(drawn().count).toBe('3'));
- expect(drawn().ids).toBe(OPEN_IDS);
- });
-});
diff --git a/ui/packages/plugin-gantt/src/ObjectGantt.searchTerm-10250.test.tsx b/ui/packages/plugin-gantt/src/ObjectGantt.searchTerm-10250.test.tsx
deleted file mode 100644
index 388b66c8abb..00000000000
--- a/ui/packages/plugin-gantt/src/ObjectGantt.searchTerm-10250.test.tsx
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * ObjectUI
- * Copyright (c) 2024-present ObjectStack Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/**
- * objectui#10250 — the gantt's record query carries the node's full-text
- * search: `search` as `$search`, and `searchableFields` as `$searchFields`
- * alongside it.
- *
- * ## What was wrong
- *
- * `ListView` offers its toolbar Search box on a gantt view, and its own fetch
- * sends `$search` (plus `$searchFields` when the view declares
- * `searchableFields`). The gantt chart does not draw those rows: the registered
- * `object-gantt` wrapper hands `ObjectGantt` the node's `schema` and nothing
- * else, and `reload` issues the chart's own query. That query had no search
- * channel at all, so the term changed the list's fetch and nothing drawn. The
- * node is the only door: `ListView` writes the term there, and this file pins
- * the half that reads it. The writing half is pinned in
- * `plugin-list/src/__tests__/ListView.selfQueryingViewsToolbarState-10250.test.tsx`.
- *
- * ## The shape is the list's own
- *
- * The pair travels together or not at all — a field list with no term is
- * inert, exactly as it is on `ListView`'s fetch and on `ObjectGrid`'s. Nothing
- * here decides WHICH fields a term matches: that is the server's answer from
- * the object's metadata (ADR-0061), narrowed only by an authored list.
- *
- * REVERSE VERIFICATION. Delete the `$search` spread from `reload`: TERM,
- * FIELDS, CHANGE and INLINE go red, and so does STABILITY, whose precondition
- * waits for the pair; CONTROL and INERT FIELDS stay green (they assert an
- * absence, which a query without the pair satisfies). Key the effect on
- * `schema.searchableFields` itself instead of its serialised value: STABILITY
- * alone goes red.
- */
-
-import React from 'react';
-import { render, screen, waitFor } from '@testing-library/react';
-import { describe, it, expect, vi, beforeEach } from 'vitest';
-import { ObjectGantt } from './ObjectGantt';
-
-vi.mock('sonner', () => ({ toast: { error: vi.fn() } }));
-
-// The bar canvas is irrelevant — every assertion is about the QUERY, plus one
-// about which inline rows reached the chart.
-vi.mock('./GanttView', () => ({
- GanttView: ({ tasks }: any) => (
- String(t.id)).join(',')} />
- ),
-}));
-
-vi.mock('@object-ui/plugin-detail', async (importOriginal) => ({
- ...(await importOriginal()),
- RecordDetailDrawer: () => null,
- deriveRecordPageHref: () => null,
-}));
-
-const ROWS = [
- { id: '1', subject: 'Alpha needle', visible_from: '2026-01-01', due_date: '2026-01-31' },
- { id: '2', subject: 'Bravo', visible_from: '2026-02-01', due_date: '2026-02-28' },
- { id: '3', subject: 'Charlie needle', visible_from: '2026-03-01', due_date: '2026-03-31' },
-];
-
-let calls: Array> = [];
-
-function makeDataSource() {
- return {
- find: vi.fn(async (_resource: string, params: any) => {
- calls.push({ ...(params ?? {}) });
- return { data: ROWS, total: ROWS.length };
- }),
- findOne: vi.fn(),
- create: vi.fn(),
- update: vi.fn(),
- delete: vi.fn(),
- getObjectSchema: vi.fn(async () => ({
- name: 'duly_task',
- fields: {
- id: { name: 'id', type: 'text' },
- subject: { name: 'subject', type: 'text' },
- visible_from: { name: 'visible_from', type: 'date' },
- due_date: { name: 'due_date', type: 'date' },
- },
- })),
- } as any;
-}
-
-const base: any = {
- type: 'object-gantt',
- objectName: 'duly_task',
- gantt: { titleField: 'subject', startDateField: 'visible_from', endDateField: 'due_date' },
-};
-
-const last = () => calls[calls.length - 1] ?? {};
-const settle = () => new Promise((r) => setTimeout(r, 50));
-
-beforeEach(() => {
- calls = [];
-});
-
-describe('ObjectGantt — the node\'s search reaches the record query (objectui#10250)', () => {
- it('CONTROL: a node with no `search` sends neither $search nor $searchFields', async () => {
- render();
- await waitFor(() => expect(calls.length).toBeGreaterThan(0));
- expect(last()).not.toHaveProperty('$search');
- expect(last()).not.toHaveProperty('$searchFields');
- });
-
- it('TERM: `search` is sent as $search', async () => {
- render();
- await waitFor(() => expect(last().$search).toBe('needle'));
- expect(last()).not.toHaveProperty('$searchFields');
- });
-
- it('FIELDS: `searchableFields` is sent as $searchFields alongside the term', async () => {
- render(
- ,
- );
- await waitFor(() => expect(last().$search).toBe('needle'));
- expect(last().$searchFields).toEqual(['subject']);
- });
-
- it('INERT FIELDS: `searchableFields` with no term sends neither key', async () => {
- render();
- await waitFor(() => expect(calls.length).toBeGreaterThan(0));
- await settle();
- expect(last()).not.toHaveProperty('$search');
- expect(last()).not.toHaveProperty('$searchFields');
- });
-
- it('CHANGE: a new term re-queries with it; clearing it re-queries without it', async () => {
- const dataSource = makeDataSource();
- const { rerender } = render();
- await waitFor(() => expect(last().$search).toBe('needle'));
- rerender();
- await waitFor(() => expect(last().$search).toBe('thread'));
- rerender();
- await waitFor(() => expect(last()).not.toHaveProperty('$search'));
- });
-
- it('STABILITY: a new but equal node — same term, a fresh equal field list — does not re-query', async () => {
- const dataSource = makeDataSource();
- const node = () => ({ ...base, search: 'needle', searchableFields: ['subject'] });
- const { rerender } = render();
- await waitFor(() => expect(last().$searchFields).toEqual(['subject']));
- await settle();
- const settled = calls.length;
- rerender();
- rerender();
- await settle();
- expect(calls.length).toBe(settled);
- });
-
- it('INLINE: the term narrows inline rows too, through the same in-memory adapter', async () => {
- // The provider does not change which query keys apply (objectui#8769):
- // `provider: 'value'` goes through `ValueDataSource`, which honours
- // `$search` the way it honours `$filter`.
- render();
- await waitFor(() => expect(screen.getByTestId('gantt-view').getAttribute('data-task-ids')).toBe('1,3'));
- });
-});
diff --git a/ui/packages/plugin-gantt/src/__tests__/recordSourceInputs-10394.test.tsx b/ui/packages/plugin-gantt/src/__tests__/recordSourceInputs-10394.test.tsx
index 3cf9bf5498d..2b75b621a0c 100644
--- a/ui/packages/plugin-gantt/src/__tests__/recordSourceInputs-10394.test.tsx
+++ b/ui/packages/plugin-gantt/src/__tests__/recordSourceInputs-10394.test.tsx
@@ -42,7 +42,7 @@
* is what is charted.
*
* `filter` / `sort` on the inline rungs are pinned by
- * `ObjectGantt.inlineQueryKeys-8769.test.tsx` (its `staticDataSpelling` row),
+ * the `ObjectGantt.inlineQueryKeys-8769` block of `ObjectGantt.harness.test.tsx` (its `staticDataSpelling` row),
* not repeated here.
*/