Skip to content

refactor: improve type safety and organize imports in form and styles modules - #670

Merged
surajair merged 2 commits into
devfrom
package-build-error
Feb 4, 2026
Merged

surajair merged 2 commits into
devfrom
package-build-error

Conversation

@surajair

@surajair surajair commented Feb 4, 2026

Copy link
Copy Markdown
Collaborator
  • Add explicit ChaiBlockConfig type annotation to FormConfig
  • Reorder imports to follow consistent grouping (SDK types, external libs, internal)
  • Fix font-helpers import path to use SDK runtime instead of relative path
  • Add type assertion for tailwindcss to resolve type compatibility

… modules

- Add explicit ChaiBlockConfig type annotation to FormConfig
- Reorder imports to follow consistent grouping (SDK types, external libs, internal)
- Fix font-helpers import path to use SDK runtime instead of relative path
- Add type assertion for tailwindcss to resolve type compatibility
Copilot AI review requested due to automatic review settings February 4, 2026 09:57
@vercel

vercel Bot commented Feb 4, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sdk Ready Ready Preview, Comment Feb 4, 2026 10:05am

Request Review

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Feb 4, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
sdk ddadc6f Feb 04 2026, 10:04 AM

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refactors code to improve type safety and establish consistent import organization across the Next.js framework package. The changes are purely structural with no functional modifications.

Changes:

  • Fixed import path from relative @/runtime to SDK package @chaibuilder/sdk/runtime
  • Added explicit ChaiBlockConfig type annotation to improve type safety in form block configuration
  • Reorganized imports to follow consistent grouping: SDK types/runtime first, external libraries second, internal modules last

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
frameworks/nextjs/package/lib/get-blocks-styles.ts Reorganized imports into logical groups and added type assertion for tailwindcss to handle v3/v4 compatibility
frameworks/nextjs/package/lib/font-helpers.ts Fixed import path from relative @/runtime to absolute SDK path @chaibuilder/sdk/runtime
frameworks/nextjs/package/blocks/form-block.tsx Added explicit ChaiBlockConfig type annotation and reorganized imports for consistency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@surajair
surajair merged commit 0cc2364 into dev Feb 4, 2026
1 of 2 checks passed
@surajair
surajair deleted the package-build-error branch February 4, 2026 10:03
surajair added a commit that referenced this pull request Feb 5, 2026

This branch was successfully deployed

1 active deployment
Preview — ddadc6fc Deployed Feb 4, 2026 by vercel[bot]
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.

2 participants