Skip to content

fix: resolve CI build TypeScript errors (TS2347, TS6133)#777

Merged
hotlong merged 2 commits intomainfrom
copilot/fix-ci-errors-ffbce74e-2c32-4a0c-bf79-dc04d43b32d8
Feb 23, 2026
Merged

fix: resolve CI build TypeScript errors (TS2347, TS6133)#777
hotlong merged 2 commits intomainfrom
copilot/fix-ci-errors-ffbce74e-2c32-4a0c-bf79-dc04d43b32d8

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 23, 2026

Console build failing due to 10 TypeScript strict-mode errors — unused imports, unused parameters, and a type argument on an untyped require('react') call inside a vitest mock.

Unused imports removed

  • Loader2 from AppManagementPage.tsx
  • Card, CardContent from PermissionManagementPage.tsx
  • SectionHeader from view-config-schema.tsx

Unused parameters prefixed with _

  • fieldOptions, fieldSelectWithNone, draft in view-config-schema.tsx builder functions
  • specProp in view-config-schema.test.tsx
  • loading in RecordActivityTimeline.tsx

Untyped function call fix

- const [collapsed, setCollapsed] = React.useState<Record<string, boolean>>({});
+ const [collapsed, setCollapsed] = React.useState({});

React is obtained via require('react') inside vi.mock, returning any — TS2347 prohibits type arguments on untyped calls.

Original prompt

引用: https://github.com/objectstack-ai/objectui/actions/runs/22297857564/job/64498288860#step:7:1

fix all ci errors build


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 23, 2026

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

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Feb 23, 2026 9:25am
objectui-demo Ready Ready Preview, Comment Feb 23, 2026 9:25am
objectui-storybook Error Error Feb 23, 2026 9:25am

Request Review

- ViewConfigPanel.test.tsx: remove type arg from untyped React.useState
- view-config-schema.test.tsx: prefix unused specProp with underscore
- AppManagementPage.tsx: remove unused Loader2 import
- PermissionManagementPage.tsx: remove unused Card, CardContent imports
- view-config-schema.tsx: remove unused SectionHeader import, prefix
  unused params (fieldOptions, fieldSelectWithNone, draft) with underscore
- RecordActivityTimeline.tsx: prefix unused loading param with underscore
- ROADMAP.md: update build count 42/42 → 43/43

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix all CI errors in build process fix: resolve CI build TypeScript errors (TS2347, TS6133) Feb 23, 2026
Copilot AI requested a review from hotlong February 23, 2026 08:37
@hotlong hotlong marked this pull request as ready for review February 23, 2026 08:47
Copilot AI review requested due to automatic review settings February 23, 2026 08:47
@hotlong hotlong merged commit 4da92a7 into main Feb 23, 2026
3 of 5 checks passed
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.

Pull request overview

This PR resolves 10 TypeScript strict-mode compilation errors (TS2347, TS6133) that were causing CI build failures. The fixes follow TypeScript best practices: removing genuinely unused imports, prefixing unused parameters with underscore, and removing type arguments from untyped function calls in vitest mocks.

Changes:

  • Removed 4 unused imports (Loader2, Card, CardContent, SectionHeader) that were triggering TS6133 errors
  • Prefixed 6 unused function parameters with underscore (_) to suppress TS6133 warnings while preserving function signatures
  • Fixed TS2347 error by removing type argument from React.useState in vitest mock where React is obtained via untyped require() call
  • Updated ROADMAP.md build count from 42/42 to 43/43 to reflect CI status

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/console/src/pages/system/AppManagementPage.tsx Removed unused Loader2 import
apps/console/src/pages/system/PermissionManagementPage.tsx Removed unused Card and CardContent imports
apps/console/src/utils/view-config-schema.tsx Removed unused SectionHeader import; prefixed 3 unused parameters (_fieldOptions, _fieldSelectWithNone, _draft)
apps/console/src/tests/view-config-schema.test.tsx Prefixed unused _specProp parameter in test loop
packages/plugin-detail/src/RecordActivityTimeline.tsx Prefixed unused loading parameter (_loading) that's shadowed by internal isLoadingMore state
apps/console/src/tests/ViewConfigPanel.test.tsx Removed type argument from React.useState<Record<string, boolean>>({}) to fix TS2347 in mock context
ROADMAP.md Updated build status from 42/42 to 43/43 passing builds

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