Skip to content

Conversation

@kingston
Copy link
Collaborator

@kingston kingston commented Mar 20, 2025

Summary by CodeRabbit

  • Chores

    • Upgraded various third-party libraries to the latest patch releases, enhancing performance, stability, and bug fixes.
  • Refactor

    • Improved type safety and flexibility for multiple UI components, ensuring more reliable behavior and integration across the project.
    • Streamlined data access patterns in the ModelFieldForm and ModelFieldBadges components for clearer logic and reduced complexity.
  • Bug Fixes

    • Removed the type-checking step from the end-to-end testing workflow, streamlining the testing process.
    • Added a type-checking step to the CI pipeline to catch type errors before running tests.

@linear
Copy link

linear bot commented Mar 20, 2025

ENG-587 Upgrade Radix UI

@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2025

🦋 Changeset detected

Latest commit: e33e96b

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

This PR includes changesets to release 9 packages
Name Type
@halfdomelabs/project-builder-web Patch
@halfdomelabs/react-generators Patch
@halfdomelabs/ui-components Patch
@halfdomelabs/project-builder-cli Patch
@halfdomelabs/project-builder-test Patch
@halfdomelabs/project-builder-server Patch
@halfdomelabs/baseplate-plugin-storage Patch
@halfdomelabs/project-builder-lib Patch
@halfdomelabs/project-builder-common 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

@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2025

Walkthrough

The changes introduce a new markdown file documenting dependency patch upgrades and update several package dependency versions. The react-icons package version is updated in multiple files. The @halfdomelabs/ui-components package experiences several dependency version bumps, including various @radix-ui components and other libraries. Additionally, modifications to exported interfaces and function signatures in UI component stories enhance type safety by replacing type assertions with explicit type annotations. A type-checking step is added to the CI workflow while another is removed from the end-to-end testing workflow.

Changes

File(s) Change Summary
.changeset/dirty-wombats-think.md Added a markdown file documenting dependency patch upgrades (including upgrades for @halfdomelabs/project-builder-web, @halfdomelabs/react-generators, @halfdomelabs/ui-components, react-icon, and radix).
packages/project-builder-web/package.json
packages/react-generators/src/constants/react-packages.ts
Updated react-icons version from 5.0.1 to 5.5.0.
packages/ui-components/package.json Upgraded multiple dependencies: several @radix-ui components (e.g., @radix-ui/react-checkbox, @radix-ui/react-dialog, @radix-ui/react-dropdown-menu, etc.), class-variance-authority (0.7.00.7.1), cmdk (1.0.41.1.1), react-icons (5.0.15.5.0), and sonner (1.7.42.0.1).
packages/ui-components/src/components/Badge/Badge.tsx Changed BadgeWithIconProps to an exported interface and updated the icon property type from React.JSX.Element to React.ReactNode.
packages/ui-components/src/components/{ComboboxField/ComboboxField.stories.tsx, MultiCheckboxField/MultiCheckboxField.stories.tsx, MultiComboboxField/MultiComboboxField.stories.tsx, SelectField/SelectField.stories.tsx} Updated the getOptionLabel and getOptionValue function signatures in both Default and Labelled stories to use explicit type annotations instead of type assertions.
.github/workflows/test-e2e.yml Removed the "Typecheck" step from the end-to-end testing workflow.
.github/workflows/test.yml Added a new "Typecheck" step to the CI workflow, executing pnpm typecheck after the pnpm build:affected step.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between ea05c7b and e33e96b.

📒 Files selected for processing (2)
  • packages/project-builder-web/src/pages/data/models/edit/[id]/_components/fields/ModelFieldForm.tsx (3 hunks)
  • packages/project-builder-web/src/pages/data/models/edit/[id]/_components/fields/badges/ModelFieldBadges.tsx (1 hunks)
🔇 Additional comments (4)
packages/project-builder-web/src/pages/data/models/edit/[id]/_components/fields/badges/ModelFieldBadges.tsx (1)

25-35: Code refactoring improves hook usage pattern.

The separation of isPrimary and uniqueConstraints into distinct useEditedModelConfig calls is a good practice. This refactoring allows for more granular memoization and clearer code organization with each selector having a single responsibility.

packages/project-builder-web/src/pages/data/models/edit/[id]/_components/fields/ModelFieldForm.tsx (3)

52-58: Code refactoring simplifies model data access.

This change improves code clarity by directly accessing the model object instead of using nested destructuring. The model properties are now accessed in a more straightforward manner, which makes the code easier to understand and maintain.


67-87: Good refactoring to IIFE pattern for removeError.

Converting the removeError logic to an immediately invoked function expression (IIFE) improves code organization and makes the intention clearer. This is a cleaner approach for computing a derived value that requires multiple conditional checks.


80-80: Consistent direct access to model properties.

This change aligns with the overall refactoring pattern, accessing model.uniqueConstraints directly which is consistent with how other model properties are now accessed.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@kingston kingston merged commit c4213ff into main Mar 20, 2025
6 of 7 checks passed
@kingston kingston deleted the kingston/eng-587-upgrade-radix-ui branch March 20, 2025 14:44
@github-actions github-actions bot mentioned this pull request Mar 20, 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.

2 participants