From 252d5ac8d757435041fd2c4b81c6874dd1e3b2fe Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 23 Feb 2026 14:08:44 +0000
Subject: [PATCH 1/3] Initial plan
From 35d09f040edfdb6a65defa7d6b23ba55133bf39d Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 23 Feb 2026 14:14:37 +0000
Subject: [PATCH 2/3] Add missing filterableFields and rowHeight
short/extra_tall tests
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
.../src/__tests__/ListView.test.tsx | 53 +++++++++++++++++++
.../spec-bridge/__tests__/SpecBridge.test.ts | 6 +++
2 files changed, 59 insertions(+)
diff --git a/packages/plugin-list/src/__tests__/ListView.test.tsx b/packages/plugin-list/src/__tests__/ListView.test.tsx
index 85f481b60..c850b9005 100644
--- a/packages/plugin-list/src/__tests__/ListView.test.tsx
+++ b/packages/plugin-list/src/__tests__/ListView.test.tsx
@@ -1973,4 +1973,57 @@ describe('ListView', () => {
expect(shareButton).toHaveAttribute('title', 'Sharing: collaborative');
});
});
+
+ // ============================
+ // filterableFields whitelist
+ // ============================
+ describe('filterableFields', () => {
+ it('should restrict filter fields to the whitelist', () => {
+ const schema: ListViewSchema = {
+ type: 'list-view',
+ objectName: 'contacts',
+ viewType: 'grid',
+ fields: [
+ { name: 'name', label: 'Name', type: 'text' },
+ { name: 'email', label: 'Email', type: 'text' },
+ { name: 'phone', label: 'Phone', type: 'text' },
+ ] as any,
+ filterableFields: ['name', 'email'],
+ };
+
+ const { container } = renderWithProvider();
+ expect(container).toBeTruthy();
+ });
+
+ it('should allow all fields when filterableFields is not set', () => {
+ const schema: ListViewSchema = {
+ type: 'list-view',
+ objectName: 'contacts',
+ viewType: 'grid',
+ fields: [
+ { name: 'name', label: 'Name', type: 'text' },
+ { name: 'email', label: 'Email', type: 'text' },
+ ] as any,
+ };
+
+ const { container } = renderWithProvider();
+ expect(container).toBeTruthy();
+ });
+
+ it('should allow all fields when filterableFields is empty array', () => {
+ const schema: ListViewSchema = {
+ type: 'list-view',
+ objectName: 'contacts',
+ viewType: 'grid',
+ fields: [
+ { name: 'name', label: 'Name', type: 'text' },
+ { name: 'email', label: 'Email', type: 'text' },
+ ] as any,
+ filterableFields: [],
+ };
+
+ const { container } = renderWithProvider();
+ expect(container).toBeTruthy();
+ });
+ });
});
diff --git a/packages/react/src/spec-bridge/__tests__/SpecBridge.test.ts b/packages/react/src/spec-bridge/__tests__/SpecBridge.test.ts
index 004dc72d4..bc5a097f8 100644
--- a/packages/react/src/spec-bridge/__tests__/SpecBridge.test.ts
+++ b/packages/react/src/spec-bridge/__tests__/SpecBridge.test.ts
@@ -172,6 +172,12 @@ describe('SpecBridge', () => {
const small = bridgeListView({ rowHeight: 'small' }, {});
expect(small.density).toBe('compact');
+
+ const short = bridgeListView({ rowHeight: 'short' }, {});
+ expect(short.density).toBe('compact');
+
+ const extraTall = bridgeListView({ rowHeight: 'extra_tall' }, {});
+ expect(extraTall.density).toBe('spacious');
});
it('includes optional list properties', () => {
From 35b07df8de055693f3a803fe629d6d9885ae81e4 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 23 Feb 2026 14:15:57 +0000
Subject: [PATCH 3/3] Improve filterableFields tests with filter button
assertions
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
.../src/__tests__/ListView.test.tsx | 22 +++++++++++--------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/packages/plugin-list/src/__tests__/ListView.test.tsx b/packages/plugin-list/src/__tests__/ListView.test.tsx
index c850b9005..8dcdcc238 100644
--- a/packages/plugin-list/src/__tests__/ListView.test.tsx
+++ b/packages/plugin-list/src/__tests__/ListView.test.tsx
@@ -1978,7 +1978,7 @@ describe('ListView', () => {
// filterableFields whitelist
// ============================
describe('filterableFields', () => {
- it('should restrict filter fields to the whitelist', () => {
+ it('should render with filterableFields whitelist restricting available fields', () => {
const schema: ListViewSchema = {
type: 'list-view',
objectName: 'contacts',
@@ -1991,11 +1991,13 @@ describe('ListView', () => {
filterableFields: ['name', 'email'],
};
- const { container } = renderWithProvider();
- expect(container).toBeTruthy();
+ renderWithProvider();
+ // Filter button should still be visible
+ const filterButton = screen.getByRole('button', { name: /filter/i });
+ expect(filterButton).toBeInTheDocument();
});
- it('should allow all fields when filterableFields is not set', () => {
+ it('should render filter button when filterableFields is not set', () => {
const schema: ListViewSchema = {
type: 'list-view',
objectName: 'contacts',
@@ -2006,11 +2008,12 @@ describe('ListView', () => {
] as any,
};
- const { container } = renderWithProvider();
- expect(container).toBeTruthy();
+ renderWithProvider();
+ const filterButton = screen.getByRole('button', { name: /filter/i });
+ expect(filterButton).toBeInTheDocument();
});
- it('should allow all fields when filterableFields is empty array', () => {
+ it('should render filter button when filterableFields is empty array', () => {
const schema: ListViewSchema = {
type: 'list-view',
objectName: 'contacts',
@@ -2022,8 +2025,9 @@ describe('ListView', () => {
filterableFields: [],
};
- const { container } = renderWithProvider();
- expect(container).toBeTruthy();
+ renderWithProvider();
+ const filterButton = screen.getByRole('button', { name: /filter/i });
+ expect(filterButton).toBeInTheDocument();
});
});
});