Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

Fixes lint errors blocking CI, primarily React Compiler purity rule violations.

Changes

sidebar.tsx - Math.random() purity violation

// Before: useMemo with impure function
const width = React.useMemo(() => {
  return `${Math.floor(Math.random() * 40) + 50}%`
}, [])

// After: useState with lazy initializer
const [width] = React.useState(() => `${Math.floor(Math.random() * 40) + 50}%`)

SchemaRenderer.tsx & statistic.tsx - Dynamic component resolution

  • Suppressed "cannot create components during render" for intentional dynamic component patterns
  • Component references are resolved from registry/icon library, not created inline

Minor fixes

  • @ts-ignore@ts-expect-error in statistic.tsx (ESLint requirement)
  • Empty interface warning suppression in native-select.tsx (valid type re-export pattern)
Original prompt

引用: https://github.com/objectstack-ai/objectui/actions/runs/21476284581/job/61861016274#step:8:1


💡 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

vercel bot commented Jan 29, 2026

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

Project Deployment Review Updated (UTC)
objectui Ready Ready Preview, Comment Jan 29, 2026 11:44am
objectui-components Ready Ready Preview, Comment Jan 29, 2026 11:44am
objectui-crm-app Error Error Jan 29, 2026 11:44am

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue in action run process Fix React purity violations in component rendering Jan 29, 2026
Copilot AI requested a review from hotlong January 29, 2026 11:40
@xuyushun441-sys xuyushun441-sys marked this pull request as ready for review January 29, 2026 12:11
@xuyushun441-sys xuyushun441-sys merged commit 2266164 into copilot/update-crm-app-to-msw-mode Jan 29, 2026
5 of 6 checks passed
@github-actions
Copy link

✅ All checks passed!

  • ✅ Type check passed
  • ✅ Tests passed
  • ✅ Lint check completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants