Skip to content

Conversation

FleetAdmiralJakob
Copy link
Owner

@FleetAdmiralJakob FleetAdmiralJakob commented May 12, 2025

Summary by CodeRabbit

  • Refactor

    • Updated multiple UI components to use direct ref props instead of React's forwardRef, simplifying ref handling across dialogs, forms, buttons, avatars, popovers, selects, tooltips, and more.
    • Reordered and standardized CSS class names throughout many components for improved consistency and maintainability.
    • Adjusted focus and outline styles in several UI elements for better accessibility and visual clarity.
    • Updated Tailwind CSS configuration and global styles for improved variable handling and plugin usage.
  • Style

    • Changed border radius utility from rounded-sm to rounded-xs in various components for a more consistent look.
    • Made minor formatting and class order adjustments in numerous components and pages.
  • Chores

    • Upgraded and replaced several dependencies, including Tailwind CSS and related plugins, for improved performance and compatibility.
    • Added new project configuration files for GitToolBox plugin and project environment setup.
    • Updated project PostCSS configuration for simplified plugin usage.
  • Bug Fixes

    • No user-facing bug fixes were included in this release.

No changes to application logic or user workflows.

tailwind to v4
removed forward ref via codemod
Copy link

vercel bot commented May 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
chat-io ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2025 9:13pm

Copy link
Contributor

coderabbitai bot commented May 12, 2025

Walkthrough

This update consists of widespread stylistic changes, primarily reordering CSS class names in JSX elements across many components and pages. Several React components are refactored to remove the use of React.forwardRef, instead accepting ref as a direct prop. Tailwind CSS and related dependencies are updated, with configuration and PostCSS plugin adjustments. New project configuration XML files for GitToolBox and IDE settings are added. The CI workflow is enhanced with a new type checking job and formatting check. No functional logic or control flow is altered.

Changes

File(s) Change Summary
.idea/git_toolbox_blame.xml, .idea/git_toolbox_prj.xml, .idea/misc.xml, .idea/jsLibraryMappings.xml, .idea/chat-io.iml Added new project and IDE configuration XML files for GitToolBox settings, project JDK, JavaScript library mappings, and module build output settings.
.github/workflows/ci.yml Modified format job to run formatting check only; added new typecheck job running pnpm typecheck.
convex/messages.ts Minor comment wording improvements for clarity; no logic changes.
package.json Updated multiple dependencies, replaced tailwindcss-animate with tw-animate-css, added @tailwindcss/postcss, updated devDependencies, and adjusted pnpm.onlyBuiltDependencies.
postcss.config.cjs Replaced separate tailwindcss and autoprefixer plugins with consolidated @tailwindcss/postcss plugin.
src/styles/globals.css Switched to @import for Tailwind and animation CSS, updated color custom properties syntax with explicit hsl() notation, moved CSS variables outside @layer base, and added .dark mode variables.
tailwind.config.ts Changed dark mode config from array to string, updated color references to use CSS variables directly, refined plugin typings, and removed tailwindcss-animate plugin.
src/app/(auth)/sign-in/signin-form.tsx, src/app/(auth)/sign-up/signup-form.tsx, src/app/(auth)/sign-up/page.tsx, src/app/page.tsx Reordered CSS class names in className attributes; minor formatting adjustments.
src/app/(internal-sites)/chats/[chatId]/page.tsx, src/app/(internal-sites)/profile/page.tsx, src/app/(internal-sites)/profile/settings/page.tsx, src/app/contributors/page.tsx, src/app/layout.tsx Reordered CSS class names for consistency; no logic changes.
src/components/add-user-dialog.tsx, src/components/chat-overview.tsx, src/components/dev-mode-info.tsx, src/components/forward-message-dialog.tsx, src/components/message.tsx, src/components/navbar.tsx, src/components/reactions.tsx, src/components/footer.tsx Reordered CSS class names in JSX elements for stylistic consistency.
src/components/ui/aurora-background.tsx Explicitly set CSS custom properties inline via React style object; reordered class names and reformatted JSX.
src/components/ui/badge.tsx, src/components/ui/skeleton.tsx, src/components/ui/resize.tsx Reordered class names and/or updated border radius class from rounded-sm to rounded-xs.
src/components/ui/avatar.tsx, src/components/ui/button.tsx, src/components/ui/checkbox.tsx, src/components/ui/dialog.tsx, src/components/ui/form.tsx, src/components/ui/input.tsx, src/components/ui/label.tsx, src/components/ui/popover.tsx, src/components/ui/progress.tsx, src/components/ui/select.tsx, src/components/ui/tooltip.tsx, src/components/login-dialog.tsx Refactored to remove React.forwardRef, now accept ref as a direct prop; reordered class names; minor className adjustments.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant UIComponent
  participant DOMElement

  User->>UIComponent: Render with optional ref prop
  UIComponent->>DOMElement: Pass ref directly (no forwardRef)
  Note right of UIComponent: CSS classes reordered for styling
  DOMElement-->>User: Rendered element with applied styles
Loading

Poem

In the meadow of code, where styles align,
The rabbits have gathered, their class names in line.
Ref forwarding’s gone, a new path is clear,
With Tailwind refreshed, the UI’s full of cheer!
Hop, skip, and jump—our styles now gleam,
As bunnies refactor and polish the dream.
🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/components/message.tsx

Oops! Something went wrong! :(

ESLint: 9.27.0

ESLint couldn't find the plugin "@next/eslint-plugin-next".

(The package "@next/eslint-plugin-next" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install @next/eslint-plugin-next@latest --save-dev

The plugin "@next/eslint-plugin-next" was referenced from the config file in " » eslint-config-next/core-web-vitals » /node_modules/.pnpm/eslint-config-next@15.3.3_eslint@9.27.0_jiti@2.4.2__typescript@5.8.3/node_modules/eslint-config-next/index.js".

If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting.

src/app/(auth)/sign-in/signin-form.tsx

Oops! Something went wrong! :(

ESLint: 9.27.0

ESLint couldn't find the plugin "@next/eslint-plugin-next".

(The package "@next/eslint-plugin-next" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install @next/eslint-plugin-next@latest --save-dev

The plugin "@next/eslint-plugin-next" was referenced from the config file in " » eslint-config-next/core-web-vitals » /node_modules/.pnpm/eslint-config-next@15.3.3_eslint@9.27.0_jiti@2.4.2__typescript@5.8.3/node_modules/eslint-config-next/index.js".

If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting.

src/app/(internal-sites)/chats/[chatId]/page.tsx

Oops! Something went wrong! :(

ESLint: 9.27.0

ESLint couldn't find the plugin "@next/eslint-plugin-next".

(The package "@next/eslint-plugin-next" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install @next/eslint-plugin-next@latest --save-dev

The plugin "@next/eslint-plugin-next" was referenced from the config file in " » eslint-config-next/core-web-vitals » /node_modules/.pnpm/eslint-config-next@15.3.3_eslint@9.27.0_jiti@2.4.2__typescript@5.8.3/node_modules/eslint-config-next/index.js".

If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting.

  • 6 others
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

Copy link

socket-security bot commented May 12, 2025

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

♻️ Duplicate comments (3)
src/components/login-dialog.tsx (2)

32-50: Compilation stops here – missing the newly-required ref prop
AlertDialogContent renders <AlertDialogOverlay /> (line 41) without passing the mandatory ref, triggering a TS error. Once AlertDialogOverlay is refactored back to forwardRef (or its ref prop is made optional), this call site will compile again.


81-94: Pattern repeated across Title, Description, Action, Cancel
All these components have the same invalid ref contract. Wrap them with React.forwardRef or drop the prop entirely to prevent run-time ref errors.

src/components/ui/select.tsx (1)

38-55: Type error propagation – internal renders omit mandatory ref
SelectContent later renders <SelectScrollUpButton /> and <SelectScrollDownButton /> without supplying the required ref. Fixing the contract with forwardRef (or making the prop optional) will eliminate these downstream errors.

🧹 Nitpick comments (2)
src/components/ui/label.tsx (1)

12-22: Missing explicit ref type in component props.

While the refactoring from React.forwardRef to a functional component with an explicit ref prop is consistent with other component changes, the ref prop isn't explicitly typed as it is in other components (e.g., Progress component). For consistency, consider explicitly typing the ref.

-}: React.ComponentProps<typeof LabelPrimitive.Root>) => (
+}: React.ComponentProps<typeof LabelPrimitive.Root> & {
+  ref?: React.RefObject<React.ElementRef<typeof LabelPrimitive.Root>>;
+}) => (
src/components/ui/select.tsx (1)

79-114: Non-standard Tailwind classes may be stripped
rounded-xs and focus:outline-hidden are not part of Tailwind’s default preset. If they are not declared in your tailwind.config, they will be purged and styling will vanish. Please confirm these utilities exist or revert to standard classes such as rounded-sm / focus:outline-none.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5469e65 and fa6ad5c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (49)
  • .idea/git_toolbox_blame.xml (1 hunks)
  • .idea/git_toolbox_prj.xml (1 hunks)
  • .idea/misc.xml (1 hunks)
  • convex/README.md (1 hunks)
  • convex/chats.ts (5 hunks)
  • convex/clearRequests.ts (5 hunks)
  • convex/crons.ts (1 hunks)
  • convex/lib/functions.ts (4 hunks)
  • convex/messages.ts (2 hunks)
  • convex/schema.ts (1 hunks)
  • eslint.config.mjs (1 hunks)
  • next.config.js (1 hunks)
  • package.json (4 hunks)
  • postcss.config.cjs (1 hunks)
  • src/app/(auth)/sign-in/signin-form.tsx (5 hunks)
  • src/app/(auth)/sign-up/page.tsx (1 hunks)
  • src/app/(auth)/sign-up/signup-form.tsx (4 hunks)
  • src/app/(internal-sites)/chats/[chatId]/page.tsx (20 hunks)
  • src/app/(internal-sites)/profile/page.tsx (2 hunks)
  • src/app/(internal-sites)/profile/settings/page.tsx (19 hunks)
  • src/app/api/sign-up/route.ts (7 hunks)
  • src/app/contributors/page.tsx (5 hunks)
  • src/app/layout.tsx (1 hunks)
  • src/components/add-user-dialog.tsx (4 hunks)
  • src/components/chat-overview.tsx (11 hunks)
  • src/components/dev-mode-info.tsx (1 hunks)
  • src/components/forward-message-dialog.tsx (4 hunks)
  • src/components/login-dialog.tsx (3 hunks)
  • src/components/message.tsx (32 hunks)
  • src/components/navbar.tsx (1 hunks)
  • src/components/reactions.tsx (7 hunks)
  • src/components/ui/aurora-background.tsx (1 hunks)
  • src/components/ui/avatar.tsx (2 hunks)
  • src/components/ui/badge.tsx (1 hunks)
  • src/components/ui/button.tsx (3 hunks)
  • src/components/ui/checkbox.tsx (1 hunks)
  • src/components/ui/dialog.tsx (3 hunks)
  • src/components/ui/form.tsx (5 hunks)
  • src/components/ui/input.tsx (1 hunks)
  • src/components/ui/label.tsx (1 hunks)
  • src/components/ui/popover.tsx (1 hunks)
  • src/components/ui/progress.tsx (1 hunks)
  • src/components/ui/resize.tsx (2 hunks)
  • src/components/ui/select.tsx (1 hunks)
  • src/components/ui/skeleton.tsx (1 hunks)
  • src/components/ui/tooltip.tsx (1 hunks)
  • src/middleware.ts (1 hunks)
  • src/styles/globals.css (2 hunks)
  • tailwind.config.ts (3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
src/components/reactions.tsx (1)
convex/messages.ts (1)
  • reactToMessage (373-437)
src/components/login-dialog.tsx (1)
src/components/ui/button.tsx (1)
  • buttonVariants (66-66)
src/components/ui/form.tsx (1)
src/components/ui/label.tsx (1)
  • Label (25-25)
🔇 Additional comments (129)
src/components/dev-mode-info.tsx (1)

22-22: Approve explicit return block change. Converting the implicit-return arrow function to an explicit block with return is purely stylistic, preserves the existing behavior, and can improve readability.

.idea/misc.xml (1)

3-3: Inconsistent JDK version and language level.
The languageLevel="JDK_24" is set while project-jdk-name="temurin-21". Please confirm whether you intend to compile with JDK 21 using preview features, or align the JDK name/version to match the language level.

.idea/git_toolbox_blame.xml (1)

1-6: IDE-specific config approved.
The GitToolBoxBlameSettings component is properly defined with version="2". No issues detected.

.idea/git_toolbox_prj.xml (1)

1-15: IDE-specific config approved.
The GitToolBoxProjectSettings component correctly enables the commit message validation overrides. No issues detected.

src/components/ui/skeleton.tsx (1)

11-11: Approve trailing comma removal: The deleted trailing comma after className in the cn call is a harmless stylistic cleanup and aligns with the PR’s formatting consistency.

convex/README.md (1)

83-83: Approve trailing comma removal: Removing the trailing comma after console.log(result) in the mutation example is purely stylistic and has no effect on functionality.

src/middleware.ts (1)

33-33: Approve trailing comma cleanup: The removed comma in the clerkMiddleware options object is purely a formatting change with no runtime impact.

src/components/navbar.tsx (1)

28-28: Approve trailing comma removal: The eliminated comma in the cn call enhances style consistency and does not alter behavior.

src/components/ui/badge.tsx (1)

6-6: Approve class reorder and radius adjustment: Reordering the Tailwind CSS classes and switching from rounded-sm to rounded-xs aligns with the project’s styling conventions. No functional changes introduced.

next.config.js (1)

69-69: Trailing comma removed for style consistency.

This stylistic change is consistent with the broader pattern of removing trailing commas across the codebase.

src/app/(auth)/sign-up/page.tsx (1)

12-12: Border radius style change: rounded-smrounded-xs.

The border radius of the logo image has been adjusted for the default screen size, while maintaining the xl:rounded-xl class for larger screens. This appears to be part of a broader UI consistency update across the application.

eslint.config.mjs (1)

26-27: Trailing commas removed for style consistency.

This change removes trailing commas after the last element in the array passed to compat.extends, consistent with the codebase-wide style standardization in this PR.

convex/lib/functions.ts (1)

22-22: Trailing commas removed for style consistency.

Trailing commas after the closing braces of async functions in multiple function declarations have been removed. This is consistent with the style standardization pattern across this PR.

Also applies to: 32-32, 42-42, 52-52

src/app/(internal-sites)/profile/page.tsx (2)

23-23: Simplified conditional expression.

The unnecessary parentheses around the nullish coalescing operation were removed, making the expression more concise while preserving the same logic.


72-73: Trailing comma removed in object literal.

Removed trailing comma in the object literal passed to the cn function, maintaining consistency with other similar changes in this PR.

src/components/add-user-dialog.tsx (4)

72-72: Trailing comma removed

The trailing comma after parseAsBoolean.withDefault(false) has been removed, which is consistent with the PR's overall goal of removing trailing commas throughout the codebase.


127-128: Trailing comma removed

The trailing comma after classNameDialogTrigger in the cn() function call has been removed, maintaining the consistent style established in this PR.


166-167: Trailing comma removed

The trailing comma has been removed from the username input's string manipulation chain, specifically after .substring(0, 15).


189-190: Trailing comma removed

The trailing comma has been removed after the input sanitization logic for the username ID field, specifically after .replace(/\D/g, "").slice(0, 5).

convex/schema.ts (1)

35-35: Union type format simplified

The union type definition for the "status" field has been simplified by moving all union literals onto a single line rather than having each literal on a separate line. This maintains the same functionality while reducing the vertical space used by the type definition.

src/components/forward-message-dialog.tsx (7)

48-49: Trailing comma removed

The trailing comma has been removed from the arrow function parameter in the .some() array method.


52-53: Trailing comma removed

The trailing comma has been removed from the arrow function in the .filter() array method.


91-92: Trailing comma removed

The trailing comma has been removed from the ternary expression used in the cn() function for conditional class assignment.


116-117: Trailing comma removed

The trailing comma has been removed from the comparison expression inside the .some() array method.


142-143: Trailing comma removed

The trailing comma has been removed from the ternary expression in the className conditional.


150-151: Trailing comma removed

The trailing comma has been removed from the comparison expression inside the .some() array method.


158-159: Trailing comma removed

The trailing comma has been removed from the ternary expression in another className conditional.

src/app/(auth)/sign-up/signup-form.tsx (3)

90-91: Trailing comma removed

The trailing comma has been removed after await response.json() in the API response parsing logic.


220-221: Trailing comma removed

The trailing comma has been removed after .substring(0, 15) in the username input sanitization chain.


243-244: Trailing comma removed

The trailing comma has been removed after e.target.value.replace(/\D/g, "").slice(0, 5) in the usernameId input sanitization logic.

convex/chats.ts (3)

21-23: Formatting: Removed trailing comma in ConvexError constructor.
Removed an extraneous trailing comma after the error message; no change in behavior.


27-30: Formatting: Removed trailing comma in ConvexError constructor.
Removed an extraneous trailing comma after the mismatch error message; no change in behavior.


136-139: Formatting: Removed trailing comma in sort callback.
Removed the trailing comma after the comparator function in sort; purely stylistic.

convex/messages.ts (5)

28-31: Formatting: Removed trailing comma in ConvexError call.
Stylistic removal of trailing comma in the unauthorized request error; behavior unchanged.


81-84: Formatting: Removed trailing comma in sort comparator.
Removed the trailing comma after the comparator in the array sort; no functional impact.


408-412: Comment Clarification: Updated inline comment.
Refined wording of the comment before checking for an existing reaction to improve readability.


416-419: Comment Clarification: Updated inline comment.
Adjusted comment text to clearly indicate removal of an existing reaction.


426-429: Comment Clarification: Updated inline comment.
Reworded comment to explain creation of a new reaction when none exists.

src/app/api/sign-up/route.ts (11)

14-16: Formatting: Removed trailing comma in function call.
Removed an extra comma after the argument list in safeParse; no effect on parsing.


18-21: Formatting: Removed trailing comma in Response.json call.
Removed trailing comma after the error message object; purely stylistic.


23-26: Formatting: Removed trailing comma in Response.json call.
Removed trailing comma after the success response object; no behavioral change.


36-39: Formatting: Removed trailing comma in log.error call.
Removed trailing comma after the error detail in log.error; styling only.


42-45: Formatting: Removed trailing comma in Response.json call.
Stylistic removal of trailing comma after the validation error response.


73-76: Formatting: Removed trailing comma in Response.json call.
Removed trailing comma after the { status: 400 } object for email-exists error.


87-90: Formatting: Removed trailing comma in Response.json call.
Removed trailing comma after the { status: 400 } object for username-exists error.


95-97: Formatting: Removed trailing comma in log.error call.
Stylistic removal of trailing comma after the breach warning in the log message.


104-107: Formatting: Removed trailing comma in Response.json call.
Removed trailing comma after the { status: 400 } object for password-pwned error.


113-118: Formatting: Removed trailing commas in error handling block.
Removed extraneous commas around the generic error response; no effect on error flow.


129-132: Formatting: Removed trailing comma in Response.json call.
Removed trailing comma after the { status: 200 } object for successful sign-up.

convex/clearRequests.ts (7)

24-27: Formatting: Removed trailing comma in ConvexError constructor.
Stylistic removal of the comma after the mismatch error message; functionality unchanged.


36-40: Formatting: Removed trailing comma in ConvexError constructor.
Removed extra comma after unauthorized-request message; no logic change.


89-94: Formatting: Removed trailing comma in ConvexError constructor.
Stylistic cleanup of the rejection unauthorized error; behavior unaffected.


97-101: Formatting: Removed trailing comma in ConvexError constructor.
Removed trailing comma after the self-rejection error message; semantics preserved.


133-140: Formatting: Removed trailing comma in ConvexError constructor.
Removed the comma after the accept unauthorized-request message; purely stylistic.


141-146: Formatting: Removed trailing comma in ConvexError constructor.
Removed comma following the self-accept error message; no change in behavior.


165-168: Formatting: Removed trailing comma in query builder call.
Removed the trailing comma in the lte predicate lambda; styling only.

convex/crons.ts (1)

6-10: Formatting: Removed trailing comma in cronJobs interval call.
Removed an extra comma after the function reference; no impact on cron scheduling.

src/app/(internal-sites)/profile/settings/page.tsx (4)

88-90: Style improvements for better code consistency

The removal of trailing commas throughout the file follows a consistent pattern and improves code readability. This is a non-functional change that aligns with code style standardization.


359-369: Consistent CSS class ordering improves maintainability

The className reordering pattern (placing color/text classes before spacing/layout classes) improves consistency across the codebase, making it easier to understand and maintain styling patterns.


374-422: Standardized class ordering in form inputs

The className attribute reordering in Input components follows the project's new convention of placing border and color styles before sizing and positioning styles. This improves codebase consistency without affecting the rendered output.


512-516: Trailing comma removal in function calls

Removing trailing commas in function calls is consistent with the changes throughout the PR, and doesn't affect functionality.

src/app/(auth)/sign-in/signin-form.tsx (4)

105-107: Trailing comma removal for consistency

The removal of trailing commas throughout the file follows a consistent pattern applied across the codebase.


160-165: Improved template literal formatting

The template literal has been reformatted to span multiple lines, which improves readability while maintaining the same functionality.


191-195: Consistent template literal formatting

Similar to the previous change, this template literal reformatting improves readability while maintaining identical functionality.


262-267: Simplified string manipulation in onChange handler

The string manipulation in the onChange handler has been simplified without changing its behavior. It still correctly replaces non-digit characters and limits to 5 characters.

src/components/chat-overview.tsx (6)

47-53: Trailing comma removal in function calls

The removal of trailing commas after getTime() calls is consistent with the project-wide style changes.


81-87: Improved conditional formatting

The ternary conditional has been reformatted to be more concise and readable without changing its functionality.


145-156: More readable nested conditional expressions

The nested conditional expressions have been reformatted to be more readable while maintaining the same message rendering logic for different request types.


204-206: Consistent className attribute formatting

The className attribute in the Link component has been reformatted to maintain consistency with the codebase-wide styling convention.


235-247: Improved readability in conditional chain

The nested conditional expressions for handling expired requests have been reformatted to be more readable while maintaining the same logic.


296-308: Consistent conditional message formatting

This reformatting of the conditional chain follows the same pattern as other similar changes, improving readability without changing the logic.

src/components/reactions.tsx (4)

40-43: Trailing comma removal in callback functions

The removal of trailing commas in callback functions is consistent with the project-wide style changes.


148-152: More concise reducer implementation

The reducer implementation has been reformatted to be more concise and readable without changing its functionality - it still correctly counts reactions by emoji.


207-213: Simplified reducer for grouping reactions

Similar to the previous change, this reducer has been reformatted to be more concise while maintaining the same grouping logic.


242-248: Improved ternary expression formatting

The nested ternary expression has been reformatted to be more readable while preserving its functionality for user identification.

src/app/contributors/page.tsx (4)

49-50: Consistent class ordering follows new convention

The className attribute has been reformatted to follow the new convention of placing color and background styles before sizing and layout styles.


60-67: Standardized class ordering in contributor cards

The className ordering in the contributor card components follows the same convention as other UI components in the PR, placing text and color styles before layout and spacing styles.


70-77: Trailing comma removal in conditional classes

The trailing comma has been removed from the conditional className object, which is consistent with the style changes throughout the codebase.


97-99: Consistent icon styling

The className ordering in icon components follows the same pattern as other similar changes, placing margin and spacing styles in a consistent order.

src/app/(internal-sites)/chats/[chatId]/page.tsx (6)

119-119: Type annotation improvement

The explicit type annotation for the messages parameter improves type safety and code readability.


195-195: Improved code clarity with parentheses

Adding parentheses around the comparison expression makes the precedence more explicit and improves readability.


218-218: Consistent CSS class ordering

Reordering CSS classes to put style-related classes (colors, backgrounds) before layout classes improves consistency. Also changing rounded-sm to rounded-xs for a more refined border radius.

Also applies to: 221-221, 225-227


281-282: Removed trailing commas

Trailing commas have been removed from function calls, object literals, and array operations for consistent code style.

Also applies to: 338-339, 371-372, 376-376, 396-397, 486-486, 534-535


633-633: Consistent CSS class ordering across components

CSS classes have been reordered throughout the component to follow a consistent pattern: color/background classes first, followed by layout and spacing classes. This improves code readability and maintenance.

Also applies to: 636-637, 675-676, 696-700, 702-704, 706-708, 712-713, 718-719, 730-734, 760-761, 763-764, 790-791


796-797: Consistent formatting for icon components

CSS classes for icon components have been reordered and conditional rendering syntax has been made consistent. Removed trailing commas from function references.

Also applies to: 809-810, 835-837, 842-844, 858-860, 865-867

src/components/message.tsx (7)

47-48: Removed trailing comma in type definition

Removed the trailing comma from the UserInfos type tuple, improving code style consistency.


51-53: Consistent text and border styling

CSS classes have been reordered to put color and text styling classes first, followed by layout classes, maintaining consistent style ordering across components.

Also applies to: 71-72, 74-75


195-196: Consistent formatting and trailing comma removal

Trailing commas have been removed from function parameter types and nested function calls. This creates a more consistent code style throughout the component.

Also applies to: 220-222, 302-303, 368-371, 394-397, 420-423, 446-449, 472-475, 491-492


350-351: Consistent CSS styling for context menus

CSS classes for context menus and reaction components have been reordered to follow the project's styling convention (color/background classes first).

Also applies to: 497-498, 627-629, 644-645, 650-651, 665-666, 676-677, 689-692, 700-701


733-734: Consistent message styling

Reordered CSS classes for message bubbles to maintain consistent styling patterns with other components.

Also applies to: 736-738, 742-743


765-768: Improved template literal formatting

Template literal formatting has been adjusted to improve readability while maintaining the same output.


778-779: Consistent button and dialog styling

CSS classes for buttons and dialogs have been reordered to follow the project's styling convention. Trailing commas were removed from function calls for consistency.

Also applies to: 786-788, 821-822, 837-838, 846-847, 857-858, 864-865

postcss.config.cjs (1)

3-3:

✅ Verification successful

Simplified PostCSS configuration

Replaced individual plugins with a single @tailwindcss/postcss plugin, which likely consolidates the functionality of previous plugins like tailwindcss and autoprefixer.


🏁 Script executed:

#!/bin/bash
# Check if the new package is properly installed in package.json
grep -A2 "@tailwindcss/postcss" package.json

# Check related Tailwind imports in CSS files
fd -e css -x grep -l "@import.*tailwindcss" {}

Length of output: 267


PostCSS plugin verification successful

  • @tailwindcss/postcss is correctly listed in package.json.
  • Tailwind imports detected in src/styles/globals.css.

No further changes needed.

src/app/layout.tsx (1)

81-82:

✅ Verification successful

Removed explicit background class

The bg-background class has been removed from the body element. This might be because the background is now handled differently in the global CSS or theme configuration.


🏁 Script executed:

#!/bin/bash
# Check if background styling is defined elsewhere
fd -e css -x grep -l "body.*background" {}
grep -r "bg-background" --include="*.css" --include="*.ts" .

Length of output: 172


Global background styling confirmed

The bg-background utility is now applied globally in src/styles/globals.css, so the explicit bg-background class in layout.tsx is no longer necessary.

• In src/styles/globals.css:

body {
  @apply bg-background text-foreground;
}

Removing the inline bg-background class is intentional and won’t affect the background styling.

src/components/ui/progress.tsx (1)

7-28: Refactoring from React.forwardRef to direct ref prop looks good.

The Progress component has been refactored from using React.forwardRef to a plain functional component with an explicit ref prop. The ref is properly typed as React.RefObject<React.ElementRef> and all functionality is preserved.

src/components/ui/resize.tsx (3)

14-14: Trailing comma removal looks good.

The trailing comma has been removed from the className prop in ResizablePanelGroup, which maintains consistent coding style.


38-38:

❓ Verification inconclusive

Border radius class change from rounded-sm to rounded-xs.

The border radius class has been changed from rounded-sm to rounded-xs, which may affect the visual appearance of the resize handle. Please verify that this change produces the intended visual result.


🏁 Script executed:

#!/bin/bash
# Check if rounded-xs is defined in the Tailwind config
rg "rounded-xs" --type ts

Length of output: 4460


Please visually verify the updated resize handle border radius
The border-radius utility was changed from rounded-sm to rounded-xs. The rounded-xs class is defined in your Tailwind config and already used across multiple components, but you should confirm in the UI that the smaller radius on the resize handle matches your design intent.


31-32:

❓ Verification inconclusive

Verify visual appearance after CSS class reordering and changes.

The CSS classes have been reordered with notable changes:

  • bg-secondary and focus-visible:ring-ring moved to the front
  • focus-visible:outline-none replaced with focus-visible:outline-hidden

While this is primarily a style change, please verify that the focus states still appear correctly with this new class ordering and the outline-hidden replacement.


🏁 Script executed:

#!/bin/bash
# Check if outline-hidden is defined in the Tailwind config
rg "outline-hidden" --type ts

Length of output: 3302


Please verify focus state in the Resize handle
We’ve reordered the utility classes (bg-secondary and focus-visible:ring-ring now lead) and swapped out focus-visible:outline-none for focus-visible:outline-hidden—consistent with other UI components (e.g. Button, Input, Select). Although outline-hidden is already defined and used elsewhere, please test the Resize splitter in both horizontal and vertical orientations to ensure its focus ring still renders as intended.

• File: src/components/ui/resize.tsx (around lines 31–32)
• Confirm focus-visible ring appears correctly and no unexpected outline is shown.

src/components/ui/label.tsx (1)

5-5: Unused import removed correctly.

The VariantProps import has been removed as it's no longer used in the component, which is good for reducing unused imports.

package.json (5)

26-36: Radix UI package updates look good.

The Radix UI packages have been updated to newer versions, which aligns with the component refactoring approach seen in the UI components.


41-41: New Tailwind PostCSS integration added.

Added @tailwindcss/postcss which likely consolidates Tailwind CSS and PostCSS functionality. This is consistent with the broader CSS tooling updates in this PR.


107-107: Added Tailwind Oxide to built dependencies.

Adding @tailwindcss/oxide to the built dependencies list indicates the project is now using the Rust-based implementation of Tailwind CSS, which should improve build performance.


90-92:

❓ Verification inconclusive

Dev dependencies updated for Tailwind ecosystem.

Updated prettier-plugin-tailwindcss and tailwindcss to newer versions. The major version bump of Tailwind CSS (v4.1.6) may introduce breaking changes in how utility classes work.


🌐 Web query:

What are the breaking changes in Tailwind CSS v4?

💡 Result:

Tailwind CSS v4 introduces several breaking changes that may affect your existing projects. Here's a summary of the key updates:

1. Package Separation:

  • PostCSS Plugin: In v3, the tailwindcss package served as a PostCSS plugin. In v4, it's been moved to a dedicated package: @tailwindcss/postcss.
  • CLI Tool: Similarly, the Tailwind CLI is now available as @tailwindcss/cli.

2. Default Utility Changes:

  • Border Color: The border utility now defaults to currentColor instead of gray-200. To maintain the previous behavior, you can add the following to your CSS:
  @layer base {
    *,
    ::after,
    ::before,
    ::backdrop,
    ::file-selector-button {
      border-color: var(--color-gray-200, currentColor);
    }
  }

(tailwindcss.com)

  • Ring Width: The ring utility now defaults to a 1px ring instead of 3px. To revert to the previous width, replace ring with ring-3 in your classes.
    (tailwindcss.com)

3. Utility Renaming:

  • Outline Utilities: The outline-none utility now sets outline-style: none. To achieve the previous behavior, use outline-hidden instead.
    (tailwindcss.com)

4. Configuration Changes:

  • Container Utility: In v4, the container utility is configured using the @utility directive:
  @utility container {
    margin-inline: auto;
    padding-inline: 2rem;
  }

(tailwindcss.com)

5. Arbitrary Value Syntax:

  • CSS Variables: The syntax for using CSS variables in arbitrary values has changed from square brackets to parentheses. For example:
  <div class="bg-(--brand-color)"></div>

(tailwindcss.com)

6. Hover Styles on Mobile:

  • Hover styles now only apply when the primary input device supports hover interactions. To maintain hover effects on touch devices, you can define a custom variant:
  @custom-variant hover (&:hover);

(tailwindcss.com)

7. @apply Directive Changes:

  • The @apply directive now requires explicit references to theme variables. For instance, instead of:
  .my-class {
    @apply bg-red-500;
  }

Use:

  .my-class {
    background-color: var(--color-red-500);
  }

(tailwindcss.com)

8. JavaScript Configuration:

  • JavaScript-based configuration files (tailwind.config.js) are no longer detected automatically. To load a JavaScript config file, use the @config directive:
  @config "../../tailwind.config.js";

(tailwindcss.com)

For a comprehensive list of breaking changes and detailed migration steps, refer to the official Tailwind CSS v4 upgrade guide. (tailwindcss.com)

Citations:


Verify Tailwind CSS v4 Upgrade for Breaking Changes

The bump from Tailwind CSS v3 → v4.1.6 may introduce runtime and build-time breakages. Please review your configuration and code for the following key changes before merging:

• Package separation
– Replace the PostCSS plugin import from tailwindcss@tailwindcss/postcss
– If you invoke the CLI, install/use @tailwindcss/cli instead of the old tailwindcss bin

• Default utility behavior
border now defaults to currentColor (was gray-200)
ring now defaults to 1px (was 3px)

• Renamed utilities
outline-none now only sets outline-style: none; use outline-hidden for previous behavior

• Configuration directives
– Container must be declared via @utility container { … }
– JavaScript configs (tailwind.config.js) require explicit @config imports in your CSS

• Arbitrary value syntax
– Use parentheses for CSS variables: e.g. bg-(--brand-color)

• Mobile hover and @apply changes
– Hover styles apply only on hover-capable devices (define a custom variant if needed)
@apply requires explicit theme variable references (e.g. use var(--color-red-500) instead of @apply bg-red-500)

Review your:

  • build scripts and PostCSS/Tailwind plugin imports
  • tailwind.config.js loading and directive usage in your CSS
  • existing utility class usages in markup and component stylesheets

For full details and migration steps, see the official Tailwind CSS v4 Upgrade Guide:
https://tailwindcss.com/docs/upgrade-guide


69-70:

❓ Verification inconclusive

Tailwind utility packages updated.

Updated tailwind-merge to v3.3.0 and replaced tailwindcss-animate with tw-animate-css. Ensure that any animation classes used in your components are compatible with the new animation package.


🏁 Script executed:

#!/bin/bash
# Check for animation classes in component files that might need updating
rg "animate-" --type tsx

Length of output: 52


To ensure we catch all uses of animate- classes, let’s search across common JS/TS extensions:


🏁 Script executed:

#!/bin/bash
# Search for 'animate-' in JS/TS/JSX/TSX files
rg "animate-" -g '*.js' -g '*.jsx' -g '*.ts' -g '*.tsx'

Length of output: 5593


🌐 Web query:

List of utility classes provided by the tw-animate-css Tailwind plugin and how they map to animate.css classes

💡 Result:

The tw-animate-css package is a collection of Tailwind CSS v4.0 utilities designed for creating beautiful animations. It serves as a replacement for the tailwindcss-animate plugin, embracing Tailwind's new CSS-first architecture with a pure CSS solution rather than relying on JavaScript plugins.

Animation Utilities in tw-animate-css

Core Animation Classes

The tw-animate-css package provides several fundamental animation utility classes:

  • animate-in: Creates entrance animations for elements[3][7]
  • animate-out: Creates exit animations for elements[3][7]

Animation Types

Entrance Animations:

  • fade-in: Fades the element in[3][7]
  • zoom-in: Zooms the element in[3][7]

Exit Animations:

  • slide-out-to-top: Slides the element out to the top[3][7]
  • slide-out-to-left: Slides the element out to the left[3][7]

Ready-to-Use Animations

The package includes several pre-configured animations:

  • accordion-down: Animation for accordion opening[3][7]
  • accordion-up: Animation for accordion closing[3][7]
  • caret-blink: Animation for blinking cursor effect[3][7]

Animation Control Utilities

Duration Control:

  • duration-75: Sets animation duration to 75ms[5]
  • duration-100: Sets animation duration to 100ms[5]
  • duration-150: Sets animation duration to 150ms[5]
  • duration-200: Sets animation duration to 200ms[5]
  • duration-300: Sets animation duration to 300ms[5]
  • duration-500: Sets animation duration to 500ms[5]
  • duration-700: Sets animation duration to 700ms[5]
  • duration-1000: Sets animation duration to 1000ms[5]
  • duration-[value]: Sets a custom animation duration[5]

Delay Control:

  • delay-150: Sets animation delay to 150ms[3][7]
  • Various other delay options are available

Comparison with animate.css

Unlike the tailwind-animatecss plugin which directly maps animate.css classes, tw-animate-css creates its own utility-based system. Here's how they differ:

The tailwind-animatecss plugin maps animate.css classes with a prefix:

  • animate__animated becomes animatecss
  • animate__fadeIn becomes animatecss-fadeIn
  • animate__infinite becomes animatecss-infinite[6]

In contrast, tw-animate-css uses a more Tailwind-native approach with utility classes like animate-in fade-in instead of direct mappings to animate.css.

Usage Examples

<!-- Entrance animation with fade and zoom -->
<div class="animate-in fade-in zoom-in">Content fades and zooms in</div>

<!-- Exit animation sliding to top-left -->
<div class="animate-out slide-out-to-top slide-out-to-left">Content slides out</div>

<!-- Animation with custom duration -->
<div class="animate-in fade-in duration-300">Content with 300ms duration</div>

<!-- Animation with delay -->
<div class="animate-in fade-in delay-150">Content with 150ms delay</div>

The tw-animate-css package is particularly well-suited for Tailwind CSS v4.0 projects, providing a modern approach to animations that aligns with Tailwind's utility-first philosophy.

Citations:


Verify animation class compatibility after migrating to tw-animate-css

I ran rg "animate-" -g '*.js' -g '*.jsx' -g '*.ts' -g '*.tsx' and found animation utilities in several components:

• src/components/message.tsx
• src/components/login-dialog.tsx
• src/components/forward-message-dialog.tsx
• src/components/ui/tooltip.tsx
• src/components/ui/skeleton.tsx
• src/components/ui/select.tsx
• src/components/ui/popover.tsx
• src/components/ui/dialog.tsx
• src/components/ui/aurora-background.tsx
• src/app/page.tsx
• src/app/(auth)/sign-up/signup-form.tsx
• src/app/(auth)/sign-in/signin-form.tsx
• src/app/(internal-sites)/chats/[chatId]/page.tsx

Please ensure:

  • Tailwind’s core animation classes (animate-pulse, animate-spin, animate-bounce) remain available.
  • All tw-animate-css utilities you’re using—such as animate-in, animate-out, fade-in-0, fade-out-0, zoom-in-95, zoom-out-95, slide-in-from-*, slide-out-to-*, and the data-[state] variants—are defined by the new plugin.

Cross-check each class against the tw-animate-css documentation and update any unsupported class names.

src/components/ui/aurora-background.tsx (1)

26-57: Improved component encapsulation with local CSS variable definitions.

The component now defines all color variables and gradients locally within the component's style object rather than relying on global CSS variables. This improves encapsulation and makes the component more self-contained.

+ <div
+   className="absolute inset-0 overflow-hidden"
+   style={
+     {
+       "--aurora":
+         "repeating-linear-gradient(100deg,#3b82f6_10%,#a5b4fc_15%,#93c5fd_20%,#ddd6fe_25%,#60a5fa_30%)",
+       "--dark-gradient":
+         "repeating-linear-gradient(100deg,#000_0%,#000_7%,transparent_10%,transparent_12%,#000_16%)",
+       "--white-gradient":
+         "repeating-linear-gradient(100deg,#fff_0%,#fff_7%,transparent_10%,transparent_12%,#fff_16%)",
+
+       "--blue-300": "#93c5fd",
+       "--blue-400": "#60a5fa",
+       "--blue-500": "#3b82f6",
+       "--indigo-300": "#a5b4fc",
+       "--violet-200": "#ddd6fe",
+       "--black": "#000",
+       "--white": "#fff",
+       "--transparent": "transparent",
+     } as React.CSSProperties
+   }
+ >

The changes in the CSS class name on line 51 are now updated to reference these local variables instead of using global ones.

src/components/ui/input.tsx (1)

6-27: Refactored to use explicit ref prop instead of forwardRef pattern.

The component has been changed from using React.forwardRef to a standard functional component with an explicit ref prop. This approach provides more explicit typing and is part of a consistent pattern change across the codebase.

CSS classes have been reordered, and the border radius has been changed from rounded-sm to rounded-xs, while focus styles now use outline-hidden instead of outline-none.

- const Input = React.forwardRef<
-   HTMLInputElement,
-   InputProps
- >(({ className, type, ...props }, ref) => {
+ const Input = (
+   {
+     ref,
+     className,
+     type,
+     ...props
+   }: InputProps & {
+     ref: React.RefObject<HTMLInputElement>;
+   }
+ ) => {
+   return (
+     <input
+       type={type}
+       className={cn(
+         "bg-input text-destructive-foreground ring-offset-background placeholder:text-secondary-foreground flex h-14 w-full rounded-xs px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
+         className
+       )}
+       ref={ref}
+       {...props}
+     />
+   );
+ };

The change maintains the same functionality while providing more explicit type safety.

src/styles/globals.css (4)

1-4: Updated Tailwind integration method.

The file now uses @import statements instead of @tailwind directives, and adds a specific @config directive pointing to the TypeScript Tailwind configuration. This modernizes the Tailwind integration approach.

- @tailwind base;
- @tailwind components;
- @tailwind utilities;
+ @import "tailwindcss";
+ @import "tw-animate-css";
+ 
+ @config "../../tailwind.config.ts";

27-48: Improved CSS variable organization with explicit HSL notation.

The CSS custom properties for colors have been moved out of the @layer base block and are now defined using explicit hsl() notation with commas and parentheses. This makes the color values more readable and explicit.

- @layer base {
-   :root {
-     --background: 0 0% 100%;
-     --foreground: 222.2 84% 4.9%;
-     ...
-   }
- }
+ :root {
+   --background: hsl(0 0% 100%);
+   --foreground: hsl(222.2 84% 4.9%);
+   --card: hsl(0 0% 100%);
+   --card-foreground: hsl(210 40% 96.1%);
+   ...
+ }

This change aligns with the explicit CSS variable usage introduced in the Aurora Background component.


50-69: Updated dark theme color variables with explicit HSL notation.

Similar to the root variables, the dark theme color variables have been updated to use explicit hsl() notation, making the color values more readable and consistent.

- .dark {
-   --background: 0 0% 6.27%;
-   --foreground: 210 40% 98%;
-   ...
- }
+ .dark {
+   --background: hsl(0, 0%, 6.27%);
+   --foreground: hsl(210 40% 98%);
+   --card: hsl(222.2 84% 4.9%);
+   ...
+ }

72-78: Simplified global styles structure.

The global styles for the universal selector and body have been unwrapped from the @layer base block and simplified to a cleaner structure, while maintaining the existing Tailwind utility classes and font feature settings.

- @layer base {
-   * {
-     @apply border-border;
-   }
-   body {
-     @apply bg-background text-foreground;
-     font-feature-settings: "rlig" 1, "calt" 1;
-   }
- }
+ * {
+   @apply border-border;
+ }
+ body {
+   @apply bg-background text-foreground;
+   font-feature-settings: "rlig" 1, "calt" 1;
+ }
src/components/ui/checkbox.tsx (1)

8-29: Refactored to use explicit ref prop instead of forwardRef pattern.

Similar to the Input component, this component has been changed from using React.forwardRef to a standard functional component with an explicit ref prop. The JSX structure has been slightly reformatted with the CheckboxPrimitive.Indicator element now placed explicitly inside the CheckboxPrimitive.Root element.

CSS classes have been reordered with the peer class moved to the start, shadow replaced by shadow-sm, and focus-visible:outline-none replaced by focus-visible:outline-hidden.

- const Checkbox = React.forwardRef<
-   React.ElementRef<typeof CheckboxPrimitive.Root>,
-   React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
- >(({ className, ...props }, ref) => (
-   <CheckboxPrimitive.Root
-     ref={ref}
-     className={cn(
-       "h-4 w-4 shrink-0 border shadow focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-foreground peer border-primary bg-primary",
-       className
-     )}
-     {...props}
-   >
-     <CheckboxPrimitive.Indicator
-       className={cn("flex items-center justify-center text-current")}
-     >
-       <Check className="h-4 w-4" />
-     </CheckboxPrimitive.Indicator>
-   </CheckboxPrimitive.Root>
- ));
+ const Checkbox = (
+   {
+     ref,
+     className,
+     ...props
+   }: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> & {
+     ref: React.RefObject<React.ElementRef<typeof CheckboxPrimitive.Root>>;
+   }
+ ) => (<CheckboxPrimitive.Root
+   ref={ref}
+   className={cn(
+     "peer border-primary bg-primary data-[state=checked]:bg-primary data-[state=checked]:text-foreground h-4 w-4 shrink-0 border shadow-sm focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
+     className
+   )}
+   {...props}
+ >
+   <CheckboxPrimitive.Indicator
+     className={cn("flex items-center justify-center text-current")}
+   >
+     <Check className="h-4 w-4" />
+   </CheckboxPrimitive.Indicator>
+ </CheckboxPrimitive.Root>);

This change is consistent with the pattern applied across the UI component library, making the ref handling more explicit while maintaining the same functionality.

src/components/ui/avatar.tsx (3)

8-32: Function component refactoring looks good

The refactoring from React.forwardRef to a plain functional component with an explicit ref prop is well-implemented. This approach provides better type safety by explicitly typing the ref as React.RefObject<React.ElementRef<typeof AvatarPrimitive.Root>>.


35-47: Clean implementation of AvatarImage component

The component has been successfully refactored to use an explicit ref prop instead of forwardRef. The className concatenation with cn() is properly maintained.


50-65: AvatarFallback component refactoring looks good

The refactoring follows the same pattern as the other components, maintaining consistent ref handling throughout the codebase.

tailwind.config.ts (4)

5-5: Simplified darkMode configuration

Changed from array notation ["class"] to string notation "class". This is a valid simplification that maintains the same functionality.


96-107: Improved type safety in addVariablesForColors plugin

The type annotations for the plugin function parameters have been refined for better type safety. The theme colors are now explicitly cast to a more specific type before flattening.


92-92:

✅ Verification successful

Simplified plugin configuration

Removed tailwindcss-animate plugin, now only using the custom addVariablesForColors plugin. Check that animation utilities are still available through other means.


🏁 Script executed:

#!/bin/bash
# Check if animation utilities are imported elsewhere
grep -r "tailwindcss-animate\|tw-animate-css" --include="*.css" --include="*.ts" --include="*.tsx" src/

Length of output: 154


Animation utilities remain available via CSS import
The tw-animate-css utilities are still pulled in through your global stylesheet:

  • src/styles/globals.css: @import "tw-animate-css";

No further changes are needed here.


28-60:

✅ Verification successful

Simplified color variable references

Removed hsl() wrappers around CSS variable references, changing from "hsl(var(--color))" to "var(--color)". This change simplifies the configuration but may require corresponding updates in CSS files.


🏁 Script executed:

#!/bin/bash
# Check if global CSS has been updated to support new color variable format
grep -r "hsl" --include="*.css" src/

Length of output: 2338


CSS variables already include hsl() wrappers – no CSS updates required
Global CSS (src/styles/globals.css) defines each --* variable with the full hsl(...) syntax, so using var(--…) directly in tailwind.config.ts yields a valid color. Changes are safe to approve.

src/components/ui/form.tsx (7)

24-26: Style adjustments in context creation

Removed trailing commas in the empty object casts for FormFieldContext and FormItemContext. This is a minor style adjustment with no functional impact.

Also applies to: 68-70


17-20: Generic type formatting adjustment

Adjusted the formatting of generic type parameters in the FormFieldContextValue type. This is a minor style adjustment with no functional impact.


72-88: FormItem component refactoring looks good

Successfully refactored from React.forwardRef to a functional component with an explicit ref prop. The component maintains its functionality while improving type safety.


91-105: FormLabel component refactoring looks good

The component has been properly refactored to use an explicit ref prop with appropriate typing. The ref is correctly forwarded to the Label component.


108-132: FormControl component refactoring looks good

Successfully refactored to use explicit ref handling with proper typing. The component correctly forwards the ref to the Slot component and maintains its accessibility attributes.


135-156: FormDescription component refactoring looks good

The component has been properly refactored to use an explicit ref prop instead of React.forwardRef. The conditional rendering based on error state is maintained.


159-186: FormMessage component refactoring looks good

Successfully refactored with explicit ref handling. The component maintains its conditional rendering logic and proper error message display.

src/components/ui/dialog.tsx (4)

16-32: DialogOverlay component refactoring looks good

Successfully refactored from React.forwardRef to a functional component with explicit ref handling. Class names have been reordered but maintain the same styling semantics.


62-88: Minor whitespace adjustments in DialogHeader and DialogFooter

Only whitespace changes in className prop spreading with no functional impact.


90-106: DialogTitle component refactoring looks good

Successfully refactored with explicit ref handling. Class names have been reordered but maintain the same styling semantics.


108-124: DialogDescription component refactoring looks good

Successfully refactored with explicit ref handling. Class names have been reordered but maintain the same styling semantics.

# Conflicts:
#	pnpm-lock.yaml
Repository owner locked and limited conversation to collaborators May 17, 2025
Repository owner unlocked this conversation May 17, 2025
# Conflicts:
#	pnpm-lock.yaml
Copy link

socket-security bot commented May 29, 2025

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

41-51: Introduce TypeScript type checking job
Adding a dedicated typecheck job strengthens the pipeline by catching type errors early. To optimize runtime, consider adding caching for the pnpm store (e.g., via actions/cache@v3) so that dependencies are restored quickly across the lint, format, and typecheck jobs.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 83d9220 and 84f9d94.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (13)
  • .github/workflows/ci.yml (1 hunks)
  • .idea/chat-io.iml (1 hunks)
  • .idea/jsLibraryMappings.xml (1 hunks)
  • package.json (2 hunks)
  • src/app/(auth)/sign-in/signin-form.tsx (6 hunks)
  • src/app/(internal-sites)/chats/[chatId]/page.tsx (12 hunks)
  • src/app/contributors/page.tsx (6 hunks)
  • src/app/page.tsx (7 hunks)
  • src/components/add-user-dialog.tsx (1 hunks)
  • src/components/message.tsx (27 hunks)
  • src/components/ui/button.tsx (2 hunks)
  • src/components/ui/select.tsx (6 hunks)
  • src/styles/globals.css (2 hunks)
✅ Files skipped from review due to trivial changes (2)
  • .idea/chat-io.iml
  • .idea/jsLibraryMappings.xml
🚧 Files skipped from review as they are similar to previous changes (10)
  • src/components/add-user-dialog.tsx
  • src/app/(auth)/sign-in/signin-form.tsx
  • src/app/page.tsx
  • src/app/contributors/page.tsx
  • src/components/ui/button.tsx
  • src/components/ui/select.tsx
  • src/app/(internal-sites)/chats/[chatId]/page.tsx
  • src/styles/globals.css
  • src/components/message.tsx
  • package.json
🔇 Additional comments (1)
.github/workflows/ci.yml (1)

39-39: Align CI formatting step with new script
Switching from pnpm format to pnpm format:check ensures formatting is verified without automatic changes. Confirm that the format:check script is defined in package.json and that it fails on misformatted files as intended.

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.

1 participant