Skip to content

fix(ui): Run type-check on build#8076

Open
dstaley wants to merge 8 commits intomainfrom
ds.fix/typecheck-ui
Open

fix(ui): Run type-check on build#8076
dstaley wants to merge 8 commits intomainfrom
ds.fix/typecheck-ui

Conversation

@dstaley
Copy link
Member

@dstaley dstaley commented Mar 13, 2026

Description

This PR enables type checking for the ui package during build, which previously wasn't being run. It also makes several TypeScript fixes to resolve errors.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • Bug Fixes

    • Fixed minor TypeScript type issues to improve code reliability
  • Chores

    • Enhanced build process with integrated type-checking validation
    • Improved type safety for payment and modal handling components
    • Optimized TypeScript configuration for testing

@dstaley dstaley requested a review from LauraBeatris March 13, 2026 19:04
@vercel
Copy link

vercel bot commented Mar 13, 2026

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Mar 13, 2026 7:04pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Mar 13, 2026

🦋 Changeset detected

Latest commit: e99e1ef

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

This PR includes changesets to release 2 packages
Name Type
@clerk/ui Patch
@clerk/chrome-extension 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

@dstaley dstaley changed the title fix(ui): fix(ui): Run type-check on build Mar 13, 2026
@github-actions github-actions bot added the ui label Mar 13, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 13, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@8076

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8076

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8076

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8076

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8076

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8076

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8076

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8076

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8076

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8076

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8076

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8076

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8076

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8076

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8076

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8076

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8076

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8076

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8076

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8076

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8076

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8076

commit: e99e1ef

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4fea62b5-64e9-4d8e-aa41-2bf75b9f7f35

📥 Commits

Reviewing files that changed from the base of the PR and between 154eec9 and e99e1ef.

📒 Files selected for processing (13)
  • .changeset/clean-views-admire.md
  • packages/ui/package.json
  • packages/ui/src/Components.tsx
  • packages/ui/src/components/Checkout/CheckoutForm.tsx
  • packages/ui/src/components/PaymentAttempts/PaymentAttemptPage.tsx
  • packages/ui/src/components/PricingTable/PricingTableMatrix.tsx
  • packages/ui/src/components/SessionTasks/tasks/TaskChooseOrganization/CreateOrganizationScreen.tsx
  • packages/ui/src/components/SessionTasks/tasks/TaskChooseOrganization/OrganizationCreationDefaultsAlert.tsx
  • packages/ui/src/components/SessionTasks/tasks/TaskSetupMfa/SetupMfaStartScreen.tsx
  • packages/ui/src/components/SubscriptionDetails/index.tsx
  • packages/ui/src/components/Subscriptions/SubscriptionsList.tsx
  • packages/ui/src/internal/index.ts
  • packages/ui/tsconfig.json
💤 Files with no reviewable changes (1)
  • packages/ui/src/internal/index.ts

📝 Walkthrough

Walkthrough

This pull request applies TypeScript type refinements and build configuration updates across the @clerk/ui package. Changes include renaming modal prop types for consistency (CreateOrganizationProps → CreateOrganizationModalProps, etc.), adding non-null assertions for fee-related calculations in checkout and subscription components, updating prop types to accept nullable values where appropriate, and implementing safer defaults for getContainer in modal renderers. The build script now includes a type-check step. Type safety improvements address potential undefined value access patterns, test exclusions are added to tsconfig, and unused imports are removed.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and concisely describes the main change: enabling type-checking during the build process for the ui package, which aligns with the primary objective and code modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants