Skip to content

Commit ae22901

Browse files
authored
Merge pull request #90 from objectstack-ai/copilot/fix-action-run-issue-another-one
2 parents 3e3942c + 6a17e8a commit ae22901

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

packages/cli/src/commands/dev.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export async function dev(schemaPath: string, options: DevOptions) {
1717
const cwd = process.cwd();
1818

1919
// Resolve the actual project root and schema file
20-
let projectRoot = cwd;
21-
let targetSchemaPath = schemaPath;
20+
let _projectRoot = cwd;
21+
const targetSchemaPath = schemaPath;
2222
let hasPagesDir = false;
2323
let pagesDir = '';
2424
let appConfig: unknown = null;
@@ -33,15 +33,15 @@ export async function dev(schemaPath: string, options: DevOptions) {
3333

3434
if (existsSync(potentialPagesDir)) {
3535
console.log(chalk.blue(`📂 Detected project structure at ${fileDir}`));
36-
projectRoot = fileDir;
36+
_projectRoot = fileDir;
3737
hasPagesDir = true;
3838
pagesDir = potentialPagesDir;
3939

4040
// Try to load app.json as config
4141
try {
4242
appConfig = parseSchemaFile(absoluteSchemaPath);
4343
console.log(chalk.blue('⚙️ Loaded App Config from app.json'));
44-
} catch (e) {
44+
} catch (_e) {
4545
console.warn('Failed to parse app config');
4646
}
4747
}
@@ -170,7 +170,7 @@ export async function dev(schemaPath: string, options: DevOptions) {
170170
// We might get the cjs entry, but for aliasing usually fine.
171171
// Better yet, if we can find the package root, but require.resolve gives file.
172172
// Let's just use what require.resolve gives.
173-
// @ts-ignore
173+
// @ts-expect-error - lucidePath is dynamically resolved
174174
viteConfig.resolve.alias['lucide-react'] = lucidePath;
175175
} catch (e) {
176176
console.warn('⚠️ Could not resolve lucide-react automatically:', e);
@@ -192,7 +192,7 @@ export async function dev(schemaPath: string, options: DevOptions) {
192192
],
193193
},
194194
};
195-
} catch (e) {
195+
} catch (_e) {
196196
console.warn(chalk.yellow('⚠️ Failed to load PostCSS plugins from root node_modules. Styles might not work correctly.'));
197197
}
198198
}

packages/plugin-kanban/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const KanbanRenderer: React.FC<KanbanRendererProps> = ({ schema }) => {
5252

5353
// Default: Return columns as-is (assuming they have 'cards' inside)
5454
return columns;
55-
}, [schema.columns, schema.data, schema.groupBy]);
55+
}, [schema]);
5656

5757
return (
5858
<Suspense fallback={<Skeleton className="w-full h-[600px]" />}>

packages/react/src/SchemaRenderer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import React, { forwardRef } from 'react';
22
import { SchemaNode, ComponentRegistry } from '@object-ui/core';
33

4-
export const SchemaRenderer = forwardRef<any, { schema: SchemaNode } & Record<string, any>>(({ schema, ...props }, ref) => {
4+
export const SchemaRenderer = forwardRef<any, { schema: SchemaNode } & Record<string, any>>(({ schema, ...props }, _ref) => {
55
if (!schema) return null;
66
// If schema is just a string, render it as text
77
if (typeof schema === 'string') return <>{schema}</>;
88

9-
// eslint-disable-next-line
109
const Component = ComponentRegistry.get(schema.type);
1110

1211
if (!Component) {
@@ -18,13 +17,14 @@ export const SchemaRenderer = forwardRef<any, { schema: SchemaNode } & Record<st
1817
);
1918
}
2019

20+
// Note: We don't forward the ref to the Component because components in the registry
21+
// may not support refs. The SchemaRenderer itself can still receive refs for its own use.
2122
return React.createElement(Component, {
2223
schema,
2324
...(schema.props || {}),
2425
className: schema.className,
2526
'data-obj-id': schema.id,
2627
'data-obj-type': schema.type,
27-
ref,
2828
...props
2929
});
3030
});

0 commit comments

Comments
 (0)