Skip to content

fix: [build] ship the alert dialog, context menu and tooltip types - #1032

Merged
ravisuhag merged 1 commit into
mainfrom
fix/missing-type-files
Dec 2, 2026
Merged

ravisuhag merged 1 commit into
mainfrom
fix/missing-type-files

Conversation

@rohanchkrabrty

Copy link
Copy Markdown
Contributor

Summary

  • Since chore: describe component props in their source #1014, the build leaves out alert-dialog.d.ts, context-menu.d.ts and tooltip.d.ts, so apps type AlertDialog, ContextMenu and Tooltip as any (report). TypeScript 5.4 writes the full signature of an arrow function part into the compound's declaration, and it could not name the props interfaces of those parts.
  • Export AlertDialogHeaderProps, AlertDialogBodyProps, AlertDialogFooterProps, TooltipProviderProps and ContextMenuSubContentProps from their components and the package. The docs tables now use these names and show the same rows.
  • pnpm build fails on a type error, except in watch mode. The font plugin checks for style.css in generateBundle, and the alias plugin skips closeBundle after a failed build, so the TypeScript error is the one that shows.
  • In dist, only .d.ts files change. The JS, CJS and CSS files are the same as on main.
  • chore: [build] build the library with vite 8 and typescript 7 #1026 deletes rollup.config.mjs. Its build already fails on tsc errors, and TypeScript 7 writes these parts as typeof AlertDialogFooter.

The AlertDialog Header, Body and Footer parts, Tooltip.Provider and
ContextMenu.SubmenuContent are arrow functions with props interfaces that
were not exported. TypeScript 5.4 writes the full signature of an arrow
function part into the compound component's declaration, so it could not
name these interfaces (TS4023) and left out alert-dialog.d.ts,
context-menu.d.ts and tooltip.d.ts. Apps then typed the three components
as any.

Export the props types from each component and from the package. The
build now fails on a type error, except in watch mode. The font plugin
checks for style.css in generateBundle, and the alias plugin skips its
closeBundle work after a failed build, so the TypeScript error is the one
that shows.
@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
apsara Ready Ready Preview Nov 30, 2026 6:51pm UTC

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The React package now exports additional alert dialog, context menu, and tooltip prop types. The related API tables no longer specify explicit type overrides. The Rollup configuration changes stylesheet asset checks, declaration alias processing after build errors, and TypeScript emission settings in watch mode.

Merge Risk: Minimal · up to 4c313

This change exports additional prop types so declaration files are generated for AlertDialog, ContextMenu, and Tooltip, and adjusts build error handling. No concrete merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: shipping the alert dialog, context menu and tooltip type declarations. The changeset exports the matching props types (AlertDialogHeaderProps, AlertDialogBodyProps, Al…
Description check Passed The description explains the problem: since #1014 the build omits alert-dialog.d.ts, context-menu.d.ts and tooltip.d.ts, so those components type as any. It lists the newly exported props types, the r…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: shipping the alert dialog, context menu and tooltip type declarations. The changeset exports the matching props types (AlertDialogHeaderProps, AlertDialogBodyProps, AlertDialogFooterProps, TooltipProviderProps, ContextMenuSubContentProps) and adjusts the build config, which fits the 'fix: [build]' scope. The title is specific and matches the objectives.

Full details: Description check

Explanation

The description explains the problem: since #1014 the build omits alert-dialog.d.ts, context-menu.d.ts and tooltip.d.ts, so those components type as any. It lists the newly exported props types, the rollup build-failure handling, and the dist output. It matches the changeset, so the check passes.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Biome (2.6.5)

packages/react/components/alert-dialog/alert-dialog-misc.tsx

Biome could not lint this file: configuration resulted in errors. Check the repository's Biome configuration and plugins.

packages/react/components/alert-dialog/index.ts

Biome could not lint this file: configuration resulted in errors. Check the repository's Biome configuration and plugins.

packages/react/components/context-menu/context-menu-content.tsx

Biome could not lint this file: configuration resulted in errors. Check the repository's Biome configuration and plugins.

  • 5 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 70e836d4-9f86-4e9e-a2d8-37697489f1d7
Commits

Reviewing files that changed from the base of the PR and between 4281d5d and 4c3131d.

Files selected for processing: 11

  • apps/www/src/content/docs/components/alert-dialog/index.mdx
  • apps/www/src/content/docs/components/context-menu/index.mdx
  • apps/www/src/content/docs/components/tooltip/index.mdx
  • packages/react/components/alert-dialog/alert-dialog-misc.tsx
  • packages/react/components/alert-dialog/index.ts
  • packages/react/components/context-menu/context-menu-content.tsx
  • packages/react/components/context-menu/index.ts
  • packages/react/components/tooltip/index.tsx
  • packages/react/components/tooltip/tooltip-misc.tsx
  • packages/react/index.tsx
  • packages/react/rollup.config.mjs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@pkg-pr-new

pkg-pr-new Bot commented Nov 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@raystack/apsara@1032

commit: 4c3131d

@ravisuhag
ravisuhag merged commit 198f790 into main Dec 2, 2026
8 checks passed
@ravisuhag
ravisuhag deleted the fix/missing-type-files branch December 2, 2026 19:18

This branch was successfully deployed

1 active deployment
Preview — 4c3131d1 Deployed Nov 30, 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.

3 participants