From d5e67105bd6499d549d9b0741530b40651d7dcaf Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sat, 21 Feb 2026 04:02:00 +0000
Subject: [PATCH 1/4] Initial plan
From 98253b8a87f40648a35a3270ba1b47ffd098d4d9 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sat, 21 Feb 2026 04:10:00 +0000
Subject: [PATCH 2/4] feat: add updateViewConfig to DataSource interface and
persist view config on save
- Add optional updateViewConfig method to DataSource interface in @object-ui/types
- Update ObjectView.handleViewConfigSave to call dataSource.updateViewConfig when available
- Log warning when updateViewConfig is not available (backward compatible)
- Log error when updateViewConfig call fails
- Add 3 new tests covering persistence, fallback warning, and error handling
- Fix Button/Input/Switch mocks in ObjectView tests to pass through data-testid
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
---
.../console/src/__tests__/ObjectView.test.tsx | 98 ++++++++++++++++++-
apps/console/src/components/ObjectView.tsx | 11 ++-
packages/types/src/data.ts | 13 +++
3 files changed, 119 insertions(+), 3 deletions(-)
diff --git a/apps/console/src/__tests__/ObjectView.test.tsx b/apps/console/src/__tests__/ObjectView.test.tsx
index 15d93ce074..48bd71eb8f 100644
--- a/apps/console/src/__tests__/ObjectView.test.tsx
+++ b/apps/console/src/__tests__/ObjectView.test.tsx
@@ -24,8 +24,16 @@ vi.mock('@object-ui/components', async (importOriginal) => {
return {
...actual,
cn: (...inputs: any[]) => inputs.filter(Boolean).join(' '),
- Button: ({ children, onClick, title }: any) => ,
- Input: (props: any) => ,
+ Button: ({ children, onClick, title, ...rest }: any) => ,
+ Input: ({ ...props }: any) => ,
+ Switch: ({ checked, onCheckedChange, ...props }: any) => (
+