Skip to content

Conversation

@saenyakorn
Copy link
Member

Why did you create this PR

  • Type inference is too complex.
  • Add "use client" to useCollectionForm

What did you do

Screenshots / Recordings

Checklist

  • Self-reviewed your code
  • Wrote coverage tests
  • Added screenshots or recordings if applicable

@saenyakorn saenyakorn requested a review from Copilot September 4, 2025 07:32
@changeset-bot
Copy link

changeset-bot bot commented Sep 4, 2025

🦋 Changeset detected

Latest commit: 775fc6c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@genseki/react Patch
@example/erp Patch
@example/ui-playground Patch
@genseki/next Patch
@genseki/plugins Patch
@genseki/prisma-generator Patch
@genseki/react-query Patch
@genseki/rest Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
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 simplifies type complexity by removing the overuse of the Simplify type utility and adds "use client" directive to the collection form hook for React client-side compatibility.

  • Removes excessive Simplify type wrapping to reduce TypeScript compilation complexity
  • Adds "use client" directive to useCollectionForm hook for Next.js client-side usage
  • Removes unused type definitions and imports to clean up the codebase

Reviewed Changes

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

Show a summary per file
File Description
use-collection-form.ts Adds "use client" directive for React client compatibility
utils.ts Removes Simplify wrapper from return type
field.ts Removes Simplify import and wrapper from return type
collection/index.tsx Removes multiple Simplify wrappers and cleans up type definitions
builder.utils.ts Removes unused CollectionDefaultAdminApiRouter type definition
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@saenyakorn saenyakorn requested a review from miello September 4, 2025 07:39
Copy link
Contributor

@miello miello left a comment

Choose a reason for hiding this comment

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

LGTM 🥳

@saenyakorn saenyakorn merged commit 183313f into main Sep 4, 2025
1 check passed
@saenyakorn saenyakorn deleted the yu/fix/type-and-use-collection-form branch September 4, 2025 07:44
@github-actions github-actions bot mentioned this pull request Sep 4, 2025
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