Skip to content

[No Changes] Investigate duplicate ComponentRegistry import issue#323

Merged
hotlong merged 1 commit intomainfrom
copilot/fix-duplicate-component-registry-import
Feb 2, 2026
Merged

[No Changes] Investigate duplicate ComponentRegistry import issue#323
hotlong merged 1 commit intomainfrom
copilot/fix-duplicate-component-registry-import

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 2, 2026

Investigation Summary

This PR was created to address a reported Storybook build failure due to a duplicate ComponentRegistry import in packages/components/src/renderers/data-display/list.tsx.

Findings

After thorough investigation, no duplicate import exists in the repository:

  • The file packages/components/src/renderers/data-display/list.tsx has only a single correct import: import { ComponentRegistry } from '@object-ui/core';
  • This is true in the base commit (fa3c73c), main branch, and current branch
  • No code changes were needed or made

Analysis

The error message from the original problem statement:

  9 | import { ComponentRegistry } from '@object-ui/core';
 10 | import compact from 'lodash/compact';
> 11 | import { ComponentRegistry } from '@object-ui/core';  // duplicate

...appears to have been from a transient build state or cache issue that doesn't exist in the git repository history.

Current State

The file has always had the correct structure:

import { ComponentRegistry } from '@object-ui/core';
import type { ListSchema } from '@object-ui/types';
import { useDataScope } from '@object-ui/react';
import { renderChildren, cn } from '../../lib/utils';

Recommendation: This PR can be closed as there is no issue to fix.

Original prompt

08:34:41.145 �[31m✗�[39m Build failed in 17.24s
08:34:41.145 �[38;2;241;97;97m=> Failed to build the preview�[39m
08:34:41.145 �[31m[storybook:react-docgen-plugin] ./packages/components/src/renderers/data-display/list.tsx: Identifier 'ComponentRegistry' has already been declared. (11:9)
08:34:41.145
08:34:41.145 �[0m �[90m 9 |�[31m �[36mimport�[31m { �[33mComponentRegistry�[31m } �[36mfrom�[31m �[32m'@object-ui/core'�[31m�[33m;�[31m
08:34:41.145 �[90m 10 |�[31m �[36mimport�[31m compact �[36mfrom�[31m �[32m'lodash/compact'�[31m�[33m;�[31m
08:34:41.145 �[31m�[1m>�[22m�[31m�[90m 11 |�[31m �[36mimport�[31m { �[33mComponentRegistry�[31m } �[36mfrom�[31m �[32m'@object-ui/core'�[31m�[33m;�[31m
08:34:41.145 �[90m |�[31m �[31m�[1m^�[22m�[31m
08:34:41.145 �[90m 12 |�[31m �[36mimport�[31m type { �[33mListSchema�[31m } �[36mfrom�[31m �[32m'@object-ui/types'�[31m�[33m;�[31m
08:34:41.146 �[90m 13 |�[31m �[36mimport�[31m { useDataScope } �[36mfrom�[31m �[32m'@object-ui/react'�[31m�[33m;�[31m
08:34:41.146 �[90m 14 |�[31m �[36mimport�[31m { renderChildren } �[36mfrom�[31m �[32m'../../lib/utils'�[31m�[33m;�[31m�[0m�[39m
08:34:41.146 file: �[36m./packages/components/src/renderers/data-display/list.tsx:11:9�[39m
08:34:41.146 at toParseError (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parse-error.ts:95:45)
08:34:41.146 at TypeScriptParserMixin.raise (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/tokenizer/index.ts:1504:19)
08:34:41.146 at TypeScriptScopeHandler.declareName (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/plugins/typescript/scope.ts:72:21)
08:34:41.146 at TypeScriptParserMixin.declareNameFromIdentifier (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/lval.ts:876:16)
08:34:41.146 at TypeScriptParserMixin.checkIdentifier (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/lval.ts:871:12)
08:34:41.146 at TypeScriptParserMixin.checkLVal (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/lval.ts:763:12)
08:34:41.146 at TypeScriptParserMixin.finishImportSpecifier (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/statement.ts:3229:10)
08:34:41.146 at TypeScriptParserMixin.parseImportSpecifier (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/statement.ts:3490:17)
08:34:41.146 at TypeScriptParserMixin.parseImportSpecifier (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/plugins/typescript/index.ts:4383:20)
08:34:41.146 at TypeScriptParserMixin.parseNamedImportSpecifiers (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/statement.ts:3451:36)
08:34:41.146 at TypeScriptParserMixin.parseImportSpecifiersAndAfter (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/statement.ts:3179:37)
08:34:41.146 at TypeScriptParserMixin.parseImport (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/statement.ts:3148:17)
08:34:41.147 at TypeScriptParserMixin.parseImport (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/plugins/typescript/index.ts:2969:28)
08:34:41.147 at TypeScriptParserMixin.parseStatementContent (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/statement.ts:647:25)
08:34:41.147 at TypeScriptParserMixin.parseStatementContent (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/plugins/typescript/index.ts:3219:20)
08:34:41.147 at TypeScriptParserMixin.parseStatementLike (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/statement.ts:482:17)
08:34:41.147 at TypeScriptParserMixin.parseModuleItem (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/statement.ts:419:17)
08:34:41.147 at TypeScriptParserMixin.parseBlockOrModuleBlockBody (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/statement.ts:1443:16)
08:34:41.147 at TypeScriptParserMixin.parseBlockBody (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/statement.ts:1417:10)
08:34:41.147 at TypeScriptParserMixin.parseProgram (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/statement.ts:229:10)
08:34:41.147 at TypeScriptParserMixin.parseTopLevel (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/statement.ts:203:25)
08:34:41.147 at TypeScriptParserMixin.parse (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/parser/index.ts:83:25)
08:34:41.147 at TypeScriptParserMixin.parse (./node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/src/plugins/typescript/index.ts:4333:20)
08:34:41.147 at parse (./node_modules/.pnpm/@babel+parser...


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Feb 2, 2026 1:25am
objectui-components Ready Ready Preview, Comment Feb 2, 2026 1:25am
objectui-crm-app Error Error Feb 2, 2026 1:25am

Request Review

Copilot AI changed the title [WIP] Fix duplicate declaration of ComponentRegistry in list.tsx Fix duplicate ComponentRegistry import in list.tsx Feb 2, 2026
Copilot AI requested a review from hotlong February 2, 2026 01:13
@hotlong
Copy link
Copy Markdown
Collaborator

hotlong commented Feb 2, 2026

@copilot 你没有修改任何代码呀

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 2, 2026

@copilot 你没有修改任何代码呀

You're absolutely right. I checked the git history and confirmed that the file packages/components/src/renderers/data-display/list.tsx doesn't have a duplicate import in either the base commit (fa3c73c) or the main branch. The file was already correct with only a single ComponentRegistry import.

The error shown in the original problem statement appears to be from a transient build state that doesn't exist in the git repository. Since there's no actual code change needed, this PR can be closed.

Copilot AI changed the title Fix duplicate ComponentRegistry import in list.tsx [No Changes] Investigate duplicate ComponentRegistry import issue Feb 2, 2026
@hotlong hotlong marked this pull request as ready for review February 2, 2026 01:54
Copilot AI review requested due to automatic review settings February 2, 2026 01:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@hotlong hotlong merged commit 3fe18e6 into main Feb 2, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants