-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: upgrade next 14 to next 15 #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Dokploy Preview Deployment
|
|
Warning Rate limit exceeded@mrbadri has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 52 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThis update introduces several structural, dependency, and code organization changes across the repository. It upgrades React and related type dependencies to version 19 in all relevant packages and applications, updates Next.js to version 15.x, and revises the package manager from Bun to Yarn. The UI components and hooks are refactored for centralized exports, and import paths are consolidated throughout the codebase for consistency. New error boundary and not-found pages are added, and several UI component props and exports are updated for improved type safety and React best practices. Additionally, new GitHub issue and pull request templates are introduced to standardize project contributions. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UIComponent
participant CentralExports
participant ReactApp
User->>ReactApp: Navigates to page
ReactApp->>CentralExports: Imports UI components/hooks
CentralExports->>UIComponent: Re-exports components (atoms, molecules, organisms)
ReactApp->>UIComponent: Renders components (with updated props/types)
UIComponent->>User: Displays UI (with new error boundaries, tabs, etc.)
sequenceDiagram
participant User
participant ErrorBoundary
participant GlobalError
participant NotFound
User->>ErrorBoundary: Triggers error or 404
ErrorBoundary->>GlobalError: Renders error UI (on error)
ErrorBoundary->>NotFound: Renders 404 UI (on not found)
GlobalError->>User: Shows error message and retry option
NotFound->>User: Shows 404 message and navigation options
Possibly related PRs
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
refactor: upgrade next 14 to next 15
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
Added a new GitHub Actions workflow for building and merging pull requests. The workflow includes steps for checking out the repository, caching dependencies, setting up Bun, running type checks, and building the application. It also includes logic to check the PR author and wait for approvals before merging, with immediate merging for the author "mrbadri". This replaces the previous CI/CD workflows for Docker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 17
🔭 Outside diff range comments (3)
package.json (1)
13-13:⚠️ Potential issueScript still using Bun
While the package manager has been updated to Yarn, this script still references Bun. Consider updating it to use Yarn for consistency.
- "ui:add": "bun --filter @repo/ui ui:add", + "ui:add": "yarn workspace @repo/ui ui:add",packages/icons/package.json (1)
84-85:⚠️ Potential issueReact types still on v18
While the direct React dependency has been updated to version 19, the React types (@types/react and @types/react-dom) are still on version 18. This inconsistency could lead to type errors.
- "@types/react": "^18.2.61", - "@types/react-dom": "^18.2.19", + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0",apps/core/app/auth/signup/page.tsx (1)
91-98:⚠️ Potential issueFix error prop for Confirm Password field
TheConfirm Passwordinput is wired to showerrors.password?.messageinstead oferrors.confirm_password?.message, so it will never display its own validation errors. Update as follows:- <Input + <Input type="password" label="Confirm Password" placeholder="********" {...register("confirm_password")} - error={errors.password?.message} + error={errors.confirm_password?.message} />This ensures the correct error message is displayed.
🧹 Nitpick comments (21)
.github/PULL_REQUEST_TEMPLATE.md (1)
11-13: Clarify the “Changes” section
The “Changes” section currently contains empty list items (-). Consider adding descriptive placeholders or comments (e.g.,- Describe the modifications here) to guide contributors in listing their changes..github/ISSUE_TEMPLATE/feature_request.md (1)
5-7: Use a YAML list forassignees
The fieldassignees: ""may not correctly represent an empty list. It’s more conventional to use an explicit YAML list for no default assignees:assignees: [].github/ISSUE_TEMPLATE/bug_report.md (1)
5-7: Use a YAML list forassignees
Similarly, replaceassignees: ""with an empty list to avoid inadvertently assigning an empty string:assignees: []apps/storybook/package.json (1)
17-18: Consider caret ranges for React versions
You’ve pinned React and React DOM to exact19.1.0. If you prefer automatic patch updates, you may want to reintroduce a caret (e.g.,^19.1.0).packages/ui/src/components/molecules/prodoct-card.tsx (1)
3-3: Import Path Consolidation & File Naming Suggestion
The named import ofTypographyfrom../atoms/typographyaligns with the updated export. Consider renaming the file fromprodoct-card.tsxtoproduct-card.tsxto match theProductCardcomponent and avoid confusion.packages/ui/src/components/organisms/foundation-color.tsx (1)
1-1: Consider centralizing component imports.To align with the new consolidated export at
packages/ui/src/components/index.ts, you may importTypographydirectly from@repo/ui/componentsinstead of the relative path:- import { Typography } from "../atoms/typography"; + import { Typography } from "@repo/ui/components";apps/core/app/auth/set-password/page.tsx (1)
3-8: Group UI component imports for clarity
Multiple imports from@repo/ui/componentscan be consolidated into a single statement to reduce verbosity:-import { Button } from "@repo/ui/components"; -import { - InputOTP, - InputOTPGroup, - InputOTPSlot, -} from "@repo/ui/components"; -import { Input } from "@repo/ui/components"; +import { + Button, + Input, + InputOTP, + InputOTPGroup, + InputOTPSlot, + REGEXP_ONLY_DIGITS_AND_CHARS, +} from "@repo/ui/components";This enhances readability and simplifies future maintenance.
Also applies to: 16-16
packages/apis/src/providers/api-provider.tsx (1)
5-6: Consolidate React imports
You can merge the two separate React imports into one for brevity:-import { ReactNode } from "react"; -import { useState } from "react"; +import { ReactNode, useState } from "react";This aligns with common import patterns and reduces duplication.
apps/core/app/dashboard/products/create/_components/price-section.tsx (1)
1-9: Combine UI component imports
Instead of importing each component from the same package on its own line, group them:-import { Input } from "@repo/ui/components"; -import { Typography } from "@repo/ui/components"; -import { Switch } from "@repo/ui/components"; -import { Chip } from "@repo/ui/components"; -import { Button } from "@repo/ui/components"; +import { Input, Typography, Switch, Chip, Button } from "@repo/ui/components";This reduces boilerplate and keeps imports tidy.
packages/ui/src/components/molecules/attachment/attachmentAdmin/attachmentItem/attachmentItem.tsx (1)
4-7: Prefer public API imports over deep relative paths
Inside the UI package, avoid deep relative imports (../../../../atoms/...). Instead use the package’s public entrypoint:-import { Button } from "../../../../atoms/button"; -import { Typography } from "../../../../atoms/typography"; +import { Button, Typography } from "@repo/ui/components";This ensures correct encapsulation and reduces fragility when files move.
apps/core/app/auth/signup/otp/_components/signup-otp-form.tsx (2)
82-82: Empty Input component should be removed.There's an empty
<Input></Input>component that appears to serve no purpose and might be leftover code.- <Input></Input>
106-106: Fix typo in text message.The text contains repeated characters that appear to be a mistake.
- didnt recieveddqqdqdqdqdqdqdqdqdq code yet? <Countdown date={Date.now() + 120000} /> + didn't receive code yet? <Countdown date={Date.now() + 120000} />apps/core/app/dashboard/_compnents/logo-icon-switcher.tsx (1)
5-14: Remove unused imports.Several sidebar components are imported but not used in this file. Consider removing the unused imports to reduce bundle size and improve code clarity.
import * as React from "react"; import { motion, AnimatePresence } from "framer-motion"; // UI components import { - Sidebar, - SidebarContent, - SidebarHeader, SidebarMenu, - SidebarMenuButton, SidebarMenuItem, - SidebarProvider, useSidebar, } from "@repo/ui/components";apps/core/app/layout.tsx (1)
39-41: Remove unnecessary Fragment wrapper.The Fragment wrapper around the children prop is unnecessary since there's only one child element being passed to NuqsAdapter.
<NuqsAdapter> - <Fragment>{children}</Fragment> + {children} </NuqsAdapter>🧰 Tools
🪛 Biome (1.9.4)
[error] 40-40: Avoid using unnecessary Fragment.
A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
Unsafe fix: Remove the Fragment(lint/complexity/noUselessFragments)
apps/core/app/not-found.tsx (1)
16-21: Consider adding aria-labels to navigation links for better accessibility.While the links have clear text content, adding aria-labels would further improve accessibility, especially for screen readers.
-<Link href="/" className="bg-primary text-primary-foreground px-4 py-2 rounded-md"> +<Link href="/" aria-label="Return to home page" className="bg-primary text-primary-foreground px-4 py-2 rounded-md"> Go Home </Link> -<Link href="/auth/login" className="bg-secondary text-secondary-foreground px-4 py-2 rounded-md"> +<Link href="/auth/login" aria-label="Navigate to sign in page" className="bg-secondary text-secondary-foreground px-4 py-2 rounded-md"> Sign In </Link>packages/ui/src/components/molecules/tabs/tab-content.tsx (1)
28-30: Consider fallback handling for missing searchParams.The component uses optional chaining for
searchParams?.get(), but doesn't have a defined fallback behavior whensearchParamsis undefined andvalueStoreis also not set.-const valueQuery = searchParams?.get(tabId || idStore); +const valueQuery = searchParams?.get(tabId || idStore) || null; const activeValue = valueQuery || valueStore;apps/core/app/(landing)/_components/landing-tabs.tsx (3)
9-12: Remove the unusedSuspenseimport.
Suspenseis imported but never referenced in this file, which will trigger theno-unused-varsESLint rule and slightly inflates bundle size.-import { Suspense } from "react";
3-10: Consolidate component imports from the same module.
@repo/ui/componentsis imported twice. Combining them reduces duplication and keeps import lists tidy.-import { - TabContent, - TabList, - TabProvider, - TabTrigger, -} from "@repo/ui/components"; -import { ProductCard } from "@repo/ui/components"; +import { + TabContent, + TabList, + TabProvider, + TabTrigger, + ProductCard, +} from "@repo/ui/components";
23-25: Preserve the current pathname when updating query params.
router.push(\?${params}`)replaces the whole URL with only the search string. If this component is ever moved under a deeper route (e.g./landing),pushwill navigate to/?tab=…`, dropping the pathname.- const setSearchParams = (params: URLSearchParams) => { - router.push(`?${params.toString()}`); - }; + const setSearchParams = (params: URLSearchParams) => { + router.push({ query: Object.fromEntries(params) }, { scroll: false }); + };Using the object form also avoids manual string interpolation & URL-encoding mistakes.
apps/core/app/(landing)/page.tsx (2)
86-89: Provide afallbackfor<Suspense>to avoid a blank flash
fallbackis optional but omitting it yields an empty region whileLandingTabsstreams, which can feel broken on slower networks. A lightweight skeleton or spinner improves UX:- <Suspense> + <Suspense fallback={<div className="h-48 w-full animate-pulse" />}> <LandingTabs /> </Suspense>
15-22: Re-evaluatepriorityusage on off-screen decorative image
priorityforces eager loading, bypassing Next-js image heuristics. Because this shadow SVG is absolutely positioned behind the fold, it probably shouldn’t block LCP. Consider removing the flag unless you have a performance metric proving the need.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (11)
apps/core/app/(landing)/_assets/blender-bg.svgis excluded by!**/*.svgapps/core/app/(landing)/_assets/figma-bg-q.svgis excluded by!**/*.svgapps/core/app/(landing)/_assets/figma-bg.svgis excluded by!**/*.svgapps/core/app/(landing)/_assets/planet-bg.svgis excluded by!**/*.svgapps/core/app/(landing)/_assets/shadow-bg.svgis excluded by!**/*.svgapps/core/app/(landing)/_assets/sketch-bg.svgis excluded by!**/*.svgapps/core/public/images/Landing-simbol.svgis excluded by!**/*.svgapps/core/public/images/bg-landing.svgis excluded by!**/*.svgapps/core/public/images/landing-simbol2.svgis excluded by!**/*.svgbun.lockis excluded by!**/*.lockyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (93)
.github/ISSUE_TEMPLATE/bug_report.md(1 hunks).github/ISSUE_TEMPLATE/config.yml(1 hunks).github/ISSUE_TEMPLATE/feature_request.md(1 hunks).github/PULL_REQUEST_TEMPLATE.md(1 hunks)Dockerfile(0 hunks)apps/core/Dockerfile(2 hunks)apps/core/app/(landing)/_components/addtoCard.tsx(1 hunks)apps/core/app/(landing)/_components/browseMegaMenu/bottomPart/bottom-part-menu.tsx(1 hunks)apps/core/app/(landing)/_components/browseMegaMenu/browse-mega-menu.tsx(1 hunks)apps/core/app/(landing)/_components/browseMegaMenu/topPart/top-part-menu.tsx(1 hunks)apps/core/app/(landing)/_components/card.tsx(1 hunks)apps/core/app/(landing)/_components/desktop-navbar/feature-navbar-authenticated.tsx(2 hunks)apps/core/app/(landing)/_components/desktop-navbar/feature-navbar-guest.tsx(1 hunks)apps/core/app/(landing)/_components/desktop-navbar/navbar-links.tsx(1 hunks)apps/core/app/(landing)/_components/desktop-navbar/search-bar.tsx(1 hunks)apps/core/app/(landing)/_components/landing-tabs.tsx(1 hunks)apps/core/app/(landing)/become-auther/_components/auther-form.tsx(1 hunks)apps/core/app/(landing)/become-auther/page.tsx(1 hunks)apps/core/app/(landing)/page.tsx(2 hunks)apps/core/app/(landing)/product/[id]/_components/comment-section.tsx(1 hunks)apps/core/app/(landing)/product/[id]/_components/product-footer.tsx(1 hunks)apps/core/app/(landing)/product/[id]/page.tsx(3 hunks)apps/core/app/(landing)/product/test/page.tsx(2 hunks)apps/core/app/auth/forget-password/_components/form/forgetPasswordForm.tsx(1 hunks)apps/core/app/auth/login/_components/form/loginForm.tsx(1 hunks)apps/core/app/auth/set-password/page.tsx(1 hunks)apps/core/app/auth/signup/otp/_components/signup-otp-form.tsx(1 hunks)apps/core/app/auth/signup/otp/page.tsx(2 hunks)apps/core/app/auth/signup/page.tsx(1 hunks)apps/core/app/dashboard/_compnents/app-sidebar.tsx(1 hunks)apps/core/app/dashboard/_compnents/logo-icon-switcher.tsx(1 hunks)apps/core/app/dashboard/_compnents/nav-main.tsx(1 hunks)apps/core/app/dashboard/_compnents/navbar-dashboard.tsx(1 hunks)apps/core/app/dashboard/layout.tsx(1 hunks)apps/core/app/dashboard/page.tsx(2 hunks)apps/core/app/dashboard/products/create/_components/file-formate-field-loading.tsx(1 hunks)apps/core/app/dashboard/products/create/_components/file-formate-field.tsx(1 hunks)apps/core/app/dashboard/products/create/_components/file-formate-section.tsx(1 hunks)apps/core/app/dashboard/products/create/_components/highlight-section.tsx(1 hunks)apps/core/app/dashboard/products/create/_components/price-section.tsx(1 hunks)apps/core/app/dashboard/products/create/_components/tabGeneral.tsx(1 hunks)apps/core/app/dashboard/products/create/page.tsx(2 hunks)apps/core/app/error.tsx(1 hunks)apps/core/app/foundation/page.tsx(1 hunks)apps/core/app/global-error.tsx(1 hunks)apps/core/app/layout.tsx(2 hunks)apps/core/app/not-found.tsx(1 hunks)apps/core/next.config.mjs(1 hunks)apps/core/package.json(2 hunks)apps/storybook/package.json(4 hunks)apps/storybook/src/stories/Attachment.stories.tsx(4 hunks)apps/storybook/src/stories/Button.stories.tsx(1 hunks)apps/storybook/src/stories/chip.stories.tsx(1 hunks)apps/storybook/src/stories/select.stories.tsx(1 hunks)apps/storybook/src/stories/tab.stories.tsx(1 hunks)apps/storybook/src/stories/typography.stories.tsx(1 hunks)package.json(1 hunks)packages/apis/package.json(1 hunks)packages/apis/src/providers/api-provider.tsx(1 hunks)packages/icons/package.json(2 hunks)packages/icons/src/components/avatar.tsx(1 hunks)packages/icons/src/components/menu.tsx(1 hunks)packages/icons/src/components/metamask.tsx(1 hunks)packages/icons/src/components/moon.tsx(1 hunks)packages/icons/src/components/remove.tsx(1 hunks)packages/icons/src/components/security.tsx(1 hunks)packages/icons/src/components/user.tsx(1 hunks)packages/ui/package.json(3 hunks)packages/ui/postcss.config.mjs(0 hunks)packages/ui/src/components/atoms/alert-dialog.tsx(2 hunks)packages/ui/src/components/atoms/button.tsx(1 hunks)packages/ui/src/components/atoms/calendar.tsx(3 hunks)packages/ui/src/components/atoms/carousel.tsx(3 hunks)packages/ui/src/components/atoms/command.tsx(1 hunks)packages/ui/src/components/atoms/countdown.tsx(2 hunks)packages/ui/src/components/atoms/custom-cursor.tsx(3 hunks)packages/ui/src/components/atoms/form.tsx(1 hunks)packages/ui/src/components/atoms/pagination.tsx(4 hunks)packages/ui/src/components/atoms/typography.tsx(1 hunks)packages/ui/src/components/index.ts(1 hunks)packages/ui/src/components/molecules/attachment/attachmentAdmin/attachmentAdmin.tsx(2 hunks)packages/ui/src/components/molecules/attachment/attachmentAdmin/attachmentItem/attachmentItem.tsx(2 hunks)packages/ui/src/components/molecules/attachment/attachmentLanding/attachmentItem/attachmentItem.tsx(2 hunks)packages/ui/src/components/molecules/attachment/attachmentLanding/attachmentLanding.tsx(2 hunks)packages/ui/src/components/molecules/attachment/attachmentThumbnail/attachmentThumbnail.tsx(3 hunks)packages/ui/src/components/molecules/label-wrapper.tsx(1 hunks)packages/ui/src/components/molecules/prodoct-card.tsx(1 hunks)packages/ui/src/components/molecules/sidebar.tsx(1 hunks)packages/ui/src/components/molecules/tabs/tab-content.tsx(2 hunks)packages/ui/src/components/molecules/tabs/tab-trigger.tsx(4 hunks)packages/ui/src/components/organisms/foundation-color.tsx(1 hunks)packages/ui/src/hooks/index.ts(1 hunks)packages/utils/package.json(1 hunks)
💤 Files with no reviewable changes (2)
- Dockerfile
- packages/ui/postcss.config.mjs
🧰 Additional context used
🧬 Code Graph Analysis (8)
apps/core/app/dashboard/products/create/page.tsx (1)
packages/ui/src/components/molecules/tabs/tab-provider.tsx (1)
TabProvider(42-75)
packages/ui/src/components/atoms/calendar.tsx (1)
packages/ui/src/components/atoms/button.tsx (1)
buttonVariants(144-144)
packages/ui/src/components/molecules/tabs/tab-content.tsx (1)
packages/ui/src/components/molecules/tabs/tab-provider.tsx (1)
useTabStore(78-84)
apps/core/app/global-error.tsx (1)
apps/core/app/error.tsx (1)
Error(6-42)
apps/storybook/src/stories/Attachment.stories.tsx (3)
packages/ui/src/components/molecules/attachment/useAttachment.ts (1)
AttachmentProps(7-19)packages/ui/src/components/molecules/attachment/attachmentThumbnail/attachmentThumbnail.tsx (1)
AttachmentThumbnailProps(14-20)packages/apis/src/providers/api-provider.tsx (1)
ApiProvider(8-28)
apps/core/app/(landing)/_components/landing-tabs.tsx (5)
packages/ui/src/components/molecules/tabs/tab-provider.tsx (1)
TabProvider(42-75)packages/ui/src/components/molecules/tabs/tab-list.tsx (1)
TabList(6-23)packages/ui/src/components/molecules/tabs/tab-trigger.tsx (1)
TabTrigger(67-133)packages/ui/src/components/molecules/tabs/tab-content.tsx (1)
TabContent(16-38)apps/core/app/(landing)/_constant/mock-product-list.ts (4)
ProductList(1-97)ProductListUiUx(99-195)ProductList3D(197-233)ProductListGraphic(235-332)
packages/ui/src/components/molecules/attachment/attachmentThumbnail/attachmentThumbnail.tsx (1)
packages/ui/src/components/molecules/attachment/useAttachment.ts (1)
AttachmentProps(7-19)
apps/core/app/layout.tsx (2)
packages/apis/src/providers/api-provider.tsx (1)
ApiProvider(8-28)packages/ui/src/lib/utils.ts (1)
cn(4-6)
🪛 Biome (1.9.4)
apps/core/app/error.tsx
[error] 6-6: Do not shadow the global "Error" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
apps/core/app/layout.tsx
[error] 40-40: Avoid using unnecessary Fragment.
A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
Unsafe fix: Remove the Fragment
(lint/complexity/noUselessFragments)
🔇 Additional comments (113)
.github/ISSUE_TEMPLATE/config.yml (1)
3-5: Update placeholder repository URL
The URLhttps://github.com/your-org/your-repo/discussionsuses placeholder values; please replaceyour-org/your-repowith the actual organization and repository path so the “Questions or Help” link directs correctly.package.json (1)
27-27: Package manager updated to YarnThe package manager has been changed from Bun to Yarn, which aligns with the PR's objective to revise the package management strategy.
packages/utils/package.json (2)
10-10: React peer dependency updated to v19The React peer dependency has been correctly updated to align with the React 19 upgrade in the PR.
16-16: React types updated to v19The React types have been correctly updated to match the React 19 peer dependency.
packages/icons/package.json (2)
5-7: React peer dependency addedAdding the React peer dependency is a good practice and correctly specifies version 19 to align with the PR's React upgrade.
93-93: React dependency updated to v19The React dependency has been correctly updated to version 19.1.0, aligning with the PR's objective.
apps/core/next.config.mjs (1)
14-19: Configuration for styled componentsThe configuration has been updated to disable styled-jsx during server-side rendering and enable styled-components instead. This is a good approach to avoid useContext issues with Next.js 15 and React 19.
apps/storybook/package.json (4)
2-2: Correct package name for clarity
Renaming"sb"to"storybook"better reflects the purpose of this workspace.
16-18: Upgrade core dependencies to React 19 and Next.js 15
The bumps tonuqs,react,react-dom, the newnextdependency, and the Storybook themes addon align with the monorepo-wide upgrade.Also applies to: 20-21
34-35: Pin TypeScript definitions to avoid mismatches
Locking@types/reactand@types/react-domin bothdevDependenciesandresolutionsprevents version skew across packages.Also applies to: 49-51
21-21: Verify necessity of Next.js in Storybook
Storybook typically runs on Vite; please confirm that addingnextas a dependency here is required for custom integrations or typings.apps/core/app/dashboard/_compnents/nav-main.tsx (1)
5-6: Centralize UI imports from@repo/ui/components
ImportingSidebarMenuItemfrom the unified entrypoint keeps paths consistent and reduces coupling to subpaths.apps/core/app/dashboard/layout.tsx (1)
2-2: ConsolidateSidebarProviderimport
Switching to the central"@repo/ui/components"entrypoint aligns with the new component export structure.apps/core/app/dashboard/_compnents/navbar-dashboard.tsx (1)
1-1: UpdateSidebarTriggerimport path
Using the unified@repo/ui/componentsentrypoint ensures all sidebar-related components are imported from the same location.apps/core/app/(landing)/_components/browseMegaMenu/bottomPart/bottom-part-menu.tsx (1)
1-1: Unified import for Typography
The import ofTypographyhas been updated to the centralized export from@repo/ui/components. This aligns with the new component index and maintains consistency across the codebase. No functional changes were introduced.apps/core/app/dashboard/products/create/_components/file-formate-field-loading.tsx (1)
3-3: Centralized Skeleton import
ImportingSkeletonfrom the consolidated@repo/ui/componentsindex is correct and consistent with the refactor. The component’s usage and props remain unchanged.apps/core/app/(landing)/_components/desktop-navbar/navbar-links.tsx (1)
1-1: Standardized Typography import
Switching to the centralizedTypographyexport from@repo/ui/componentsaligns with the project-wide import strategy. No other logic was affected.packages/ui/src/components/atoms/form.tsx (1)
16-16: Consistent Label import
Updating theLabelimport to use the unified@repo/ui/componentsindex is in line with the new central exports. The FormLabel component continues to function as expected.apps/core/app/(landing)/_components/desktop-navbar/search-bar.tsx (1)
2-2: Central BaseInput import
TheBaseInputcomponent import has been consolidated to@repo/ui/components, matching the updated export pattern. No functional changes are detected.apps/core/app/(landing)/_components/desktop-navbar/feature-navbar-guest.tsx (1)
1-1: Consolidated Typography import approvedImporting
Typographyfrom"@repo/ui/components"aligns with the new centralized exports and maintains consistency with the refactor.apps/core/app/(landing)/product/[id]/_components/comment-section.tsx (1)
1-1: Consolidated Button import approvedSwitching to
import { Button } from "@repo/ui/components"is consistent with the new unified export structure and simplifies module paths.apps/storybook/src/stories/chip.stories.tsx (1)
2-2: Consolidated Chip import approvedUsing the central
@repo/ui/componentsentry point forChipis correct given the new index exports.apps/core/app/dashboard/products/create/_components/file-formate-field.tsx (1)
8-8: Consolidated Chip import approvedImporting
Chipfrom the unified"@repo/ui/components"module streamlines UI component imports as intended.apps/core/app/(landing)/_components/browseMegaMenu/browse-mega-menu.tsx (1)
4-4: Consolidated RetroGrid import approvedUpdating to
import { RetroGrid } from "@repo/ui/components"fits with the new centralized exports and keeps imports consistent.apps/storybook/src/stories/typography.stories.tsx (1)
1-1: Import Consolidation Approved
Switching from deep imports to the unified@repo/ui/componentsforTypographyis consistent with the refactor and improves maintainability.apps/core/app/(landing)/_components/card.tsx (1)
2-2: Import Consolidation Approved
Updating theTypographyimport to come from@repo/ui/componentsfollows the new centralized component export strategy and keeps imports consistent across the codebase.packages/ui/src/components/molecules/label-wrapper.tsx (1)
8-8: Import Consolidation Approved
Switching to a named import forTypographyfrom../atoms/typographymatches the refactored export and maintains consistency across UI components.apps/core/app/dashboard/products/create/_components/file-formate-section.tsx (1)
5-5: Import path refactoring looks goodThe import for Typography has been updated to use the consolidated path from
@repo/ui/componentsinstead of the specific subpath. This aligns with the broader refactoring in this PR to standardize UI component imports.apps/core/app/(landing)/_components/browseMegaMenu/topPart/top-part-menu.tsx (1)
7-7: Import refactoring looks goodThe import for Typography has been properly changed to use the consolidated path from
@repo/ui/components. This aligns with the broader pattern of import standardization across the codebase in this PR.packages/ui/src/components/atoms/alert-dialog.tsx (2)
7-7: Import path refactoring looks goodThe import for
buttonVariantshas been updated to use the consolidated path from@repo/ui/componentsinstead of the specific subpath. This aligns with the codebase-wide import path standardization.
120-120: Button variant update to design systemChanged button variant from
outlinetosecondary, which appears to be part of standardizing button variants across the application. This change ensures consistency with other components that have received similar updates as part of the design system refinement.apps/storybook/src/stories/Button.stories.tsx (2)
2-2: ConsolidatedButtonimport
ImportingButtonfrom@repo/ui/componentsaligns with the newly centralized exports and removes deep imports.
5-5: ConsolidatedTypographyimport
ImportingTypographyfrom@repo/ui/componentsmatches the unified component entry point and keeps imports consistent.packages/icons/src/components/avatar.tsx (1)
252-252: Correct SVG attribute naming
Changingstroke-widthtostrokeWidthadheres to React’s JSX conventions for SVG props and ensures the attribute is recognized correctly.apps/core/app/auth/login/_components/form/loginForm.tsx (1)
8-8: Consolidated UI imports look correct.Importing
Button,PasswordInput, andInputfrom the central@repo/ui/componentsmodule aligns with the updated conventions. Ensure the central index exports all three components so this import resolves correctly.apps/core/app/auth/forget-password/_components/form/forgetPasswordForm.tsx (1)
7-7: Centralized component import applied correctly.Switching to the unified
@repo/ui/componentsimport forButtonandInputmatches the project's refactoring. Confirm that the index file re-exports these components to avoid import errors.packages/ui/src/components/atoms/command.tsx (1)
9-9: Unified import of Dialog components.Moving
DialogandDialogContentinto your central@repo/ui/componentsimport is consistent with the new export structure. Verify that both exports are re-exported in the index to prevent resolution issues.packages/ui/src/components/atoms/button.tsx (1)
24-24: Nice addition of the icon size variant.The new "icon" size variant is a useful addition that provides a consistent square dimension (h-9 w-9) for icon buttons, making them visually balanced.
packages/apis/package.json (1)
12-12: React 19 upgrade looks good.The peer dependency and type definitions have been properly updated to React 19, aligning with the Next.js 15 upgrade.
Also applies to: 19-19
apps/core/app/(landing)/become-auther/page.tsx (1)
7-7: Import path consolidation looks good.The change to import accordion components from the centralized
@repo/ui/componentspath is consistent with the broader refactoring pattern in this PR.apps/core/app/(landing)/_components/desktop-navbar/feature-navbar-authenticated.tsx (2)
6-13: Consolidate DropdownMenu imports
Imports for allDropdownMenusubcomponents have been moved to the central@repo/ui/componentsmodule, improving consistency and reducing deep-path imports. Ensure thatDropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuLabel,DropdownMenuSeparator, andDropdownMenuTriggerare correctly re-exported from the main index.
18-22: Unify Avatar component imports
TheAvatar,AvatarImage, andAvatarFallbackcomponents are now imported from@repo/ui/components, aligning with the consolidated UI exports. Verify these exports inpackages/ui/src/components/index.tsto prevent unresolved import errors.apps/core/app/dashboard/products/create/_components/tabGeneral.tsx (1)
1-1: Consolidate Typography, Input, and Separator imports
Typography,Input, andSeparatorare now imported from the unified@repo/ui/componentsentry point rather than individual sub-paths. This centralization streamlines import statements—just confirm these components are re-exported in the main components index.Also applies to: 4-5
apps/core/app/dashboard/products/create/_components/highlight-section.tsx (1)
1-3: Standardize Button, Input, and Typography imports
Moved imports forButton,Input, andTypographyto@repo/ui/componentsto match the new centralized export structure. Please verify that these are available in the components index.apps/core/app/(landing)/become-auther/_components/auther-form.tsx (1)
6-9: Group UI component imports
Button,Input,Label, andTextareaare now imported from the single@repo/ui/componentsmodule. This reduces import noise and maintains consistency—ensure the main index exports these.apps/core/app/(landing)/product/[id]/_components/product-footer.tsx (1)
4-5: Import SCROLL_TOP_RANGE and Button from central module
Updated bothSCROLL_TOP_RANGEandButtonto come from@repo/ui/components. Confirm these are re-exported in the UI components index so that there are no missing exports at runtime.packages/ui/src/components/atoms/typography.tsx (1)
136-137: Export change looks good - improves import consistency.Changing from default to named exports aligns with the codebase-wide refactor to standardize component imports. This allows consumers to import both the component and its variants from a single location.
apps/core/app/(landing)/_components/addtoCard.tsx (1)
7-8: Import consolidation matches the standardization pattern.Consolidating imports from specific paths to the main components module simplifies imports and makes them more consistent across the codebase. This change is part of the broader refactoring effort.
Also applies to: 10-10, 14-14
apps/core/Dockerfile (2)
37-37: Build optimization with filter looks good.Adding the
--filter=coreflag to the build command is a good optimization that will focus the build process only on the core package, potentially speeding up builds.
14-14:Details
✅ Verification successful
Verify if the prepare:ci step is still needed.
Commenting out the prepare:ci script might skip important setup steps. Please verify that this step is no longer necessary with the Next.js 15 upgrade.
🏁 Script executed:
#!/bin/bash # Check what the prepare:ci script does if [ -f package.json ]; then grep -A 10 "prepare:ci" package.json fiLength of output: 404
🏁 Script executed:
#!/bin/bash # Show surrounding lines in the Dockerfile for the commented prepare:ci step rg -n -C3 "# RUN npm run prepare:ci" --glob 'apps/core/Dockerfile' # Locate and display the content of scripts/prepare.js prepare_file=$(fd prepare.js | head -n 1) echo ">>> Found prepare script: $prepare_file" sed -n '1,200p' "$prepare_file"Length of output: 1314
🏁 Script executed:
#!/bin/bash # Check if packageManager is already defined in package.json rg -n '"packageManager"' package.json || true # Display the top of package.json to inspect default fields sed -n '1,30p' package.jsonLength of output: 958
prepare:ci step is redundant – you can remove it
Theprepare:ciscript only ensurespackageManageris set to[email protected], and yourpackage.jsonalready declares that. There are no other side effects from dropping it.• File to tidy up:
apps/core/Dockerfile— remove the commented-out# RUN npm run prepare:cion line 14.apps/storybook/src/stories/tab.stories.tsx (1)
4-9: Tab component import consolidation matches the standardization pattern.The grouped import from
@repo/ui/componentsaligns with the project-wide refactoring approach and simplifies the import statements. No functional changes to the component usage or story definitions.packages/ui/src/components/molecules/attachment/attachmentAdmin/attachmentItem/attachmentItem.tsx (1)
66-67: VerifydisplayNameconsistency
You addedAttachmentItem.displayName = "AttachmentAdmin.AttachmentItem".
Please confirm this naming convention aligns with other components in DevTools and matches your organizational patterns.apps/storybook/src/stories/select.stories.tsx (1)
3-12: Import consolidation looks goodThis change imports all Select components from the main
@repo/ui/componentsmodule instead of the more specific@repo/ui/components/selectpath, aligning with the codebase-wide consolidation pattern.packages/ui/src/components/molecules/attachment/attachmentLanding/attachmentItem/attachmentItem.tsx (2)
4-4: Import standardization is appropriateGood change from default import to named import, consistent with the repo-wide standardization of component imports.
54-55: Added displayName improves DevTools debuggingAdding the
displayNameproperty helps with component identification in React DevTools. The hierarchical name "AttachmentLanding.AttachmentItem" clearly indicates this component's position in the component tree.apps/core/app/dashboard/products/create/page.tsx (2)
5-10: Import consolidation is consistent with project patternConsolidating imports from specific module paths to the main
@repo/ui/componentsmodule is aligned with the repo-wide refactoring approach.
21-21:Details
❓ Verification inconclusive
Verify if tab style change is intentional
The
variant="outline"prop was removed, which will change the tab style to use the default"fill"variant. Please confirm if this visual change is intentional.
🏁 Script executed:
#!/bin/bash # Check if there are other TabProvider instances that had variant="outline" removed rg "TabProvider.*variant=\"outline\"" --type=tsx --before-context=1 --after-context=1Length of output: 113
To ensure we didn’t miss any other
TabProviderusages with avariantprop, let’s broaden the search and drop the--typeflag. Please run:This will list every
TabProviderwith avariantprop so we can confirm if removingvariant="outline"here is the only change.
🏁 Script executed:
#!/bin/bash # Search all TSX files for TabProvider instances that specify any variant rg -g '*.tsx' 'TabProvider[^>]*variant=' -n -HLength of output: 299
Verify Intentional Change to TabProvider Variant
I checked the codebase and the only other
variantusages are in Storybook demos (fillandoutline). There are no other instances in production code. Removingvariant="outline"here will make the tabs render with the default"fill"style.• Location:
apps/core/app/dashboard/products/create/page.tsx(around line 21)
• Change:<TabProvider defaultValue="general">(removedvariant="outline")Please confirm that switching to the
"fill"variant is intentional.packages/ui/src/components/molecules/attachment/attachmentAdmin/attachmentAdmin.tsx (2)
7-7: Import path standardization looks goodChanged from a specific import path to the consolidated
@repo/ui/componentsmodule, consistent with the repository-wide refactoring pattern.
81-83: Added displayName improves component identificationAdding the
displayNameproperty is a good practice that enhances debugging experience in React DevTools, making it easier to identify components in the component tree.packages/ui/src/components/molecules/attachment/attachmentLanding/attachmentLanding.tsx (2)
9-9: Verify central export for Typography
The import path was changed to@repo/ui/components. Please confirm that the top-levelcomponents/index.tsre-exportsTypographyso this import resolves correctly.
106-107: Good addition ofdisplayName
AddingAttachmentLanding.displayNameimproves React DevTools debugging and aligns with other molecules in this package.packages/ui/src/components/molecules/sidebar.tsx (2)
33-33: Verify central export for Avatar components
You’ve consolidated the avatars to import from@repo/ui/components. Ensure thatAvatar,AvatarImage, andAvatarFallbackare all re-exported at that entry point.
41-41: Verify central export for DropdownMenu components
The dropdown-related components are now imported from@repo/ui/components. Please confirmDropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuLabel,DropdownMenuSeparator, andDropdownMenuTriggerare exposed by the central index.packages/ui/src/hooks/index.ts (1)
1-3: Centralized hook exports look good
This newhooks/index.tsaligns with the consolidated import pattern and simplifies consumer code.apps/core/app/foundation/page.tsx (1)
3-4: Verify consolidated component imports
You’ve groupedButton,FoundationColor,Input, andTypographyunder the central@repo/ui/componentsentry point. Confirm these are all re-exported in the rootcomponents/index.tsso that the application continues to compile without missing symbols.apps/core/app/(landing)/product/test/page.tsx (2)
13-15: Import consolidation improves consistency.The change to import UI components from the centralized
@repo/ui/componentspath aligns with the broader refactoring effort across the codebase. This approach simplifies imports and makes component usage more consistent.
150-150: Minor typographic correction.Changed from a typographic apostrophe to a straight apostrophe for consistency.
apps/core/app/auth/signup/otp/_components/signup-otp-form.tsx (2)
3-3: Clean import consolidation.Consolidating component imports from the unified
@repo/ui/componentsmodule improves code consistency and maintainability.
8-8: Standardized import path.Updated import path for InputOTP components to match the new pattern.
packages/ui/src/components/atoms/calendar.tsx (3)
8-8: Clean import path consolidation.Updated to import
buttonVariantsfrom the centralized component module, consistent with the codebase-wide refactoring.
29-30: Improved button variant semantics.Changed navigation button variant from "outline" to "secondary", providing better semantic meaning for the button's purpose within the design system.
41-42: Improved button variant semantics.Changed day button variant from "ghost" to "tertiary", providing better semantic meaning for the button's purpose within the design system.
packages/ui/src/components/atoms/custom-cursor.tsx (3)
1-1: Good addition of "use client" directive.Adding the "use client" directive is appropriate here since the component uses browser-specific APIs (event listeners) and React hooks (useMotionValue, useState).
10-10: Improved type safety for targetRef.Refining the
targetReftype fromReact.RefObject<HTMLElement>toReact.RefObject<HTMLDivElement | null>provides better type safety and accurately reflects how this prop is used in the component.
79-79: Good switch to named export.Changing from default export to named export aligns with the broader refactoring effort to standardize component exports across the UI library, making imports more consistent.
apps/core/app/dashboard/page.tsx (3)
3-9: Good consolidation of imports.Consolidating individual component imports from specific paths into imports from the unified
@repo/ui/componentsmodule improves code maintainability and readability.
10-15: Properly structured tab component imports.Reorganizing the import of
TabProviderto be part of the same import statement as the other tab-related components is a good practice for cleaner code organization.
132-133: Improved id naming and type safety.The changes here provide two improvements:
- Changing the
idfrom "test" to "productTab" makes it more descriptive and meaningful- Adding an explicit type annotation
(value: string)to the onChange handler improves type safetyapps/core/app/layout.tsx (3)
7-9: Good consolidation of imports and explicit type imports.Consolidating the Toaster import and explicitly importing React types (ReactNode, Fragment) follows modern React best practices and aligns with the broader import standardization effort.
24-24: Improved type annotation consistency.Using the directly imported
ReactNodetype instead of the namespacedReact.ReactNodeimproves consistency with the import pattern established earlier.
29-32: Proper hydration warning suppression.Adding the
suppressHydrationWarningattribute directly to the body element is the correct approach for handling hydration warnings in Next.js applications, especially when using theme providers.packages/ui/src/components/atoms/pagination.tsx (3)
5-5: Good consolidation of imports.Changing the import path for ButtonProps and buttonVariants to the unified
@repo/ui/componentsmodule aligns with the broader effort to standardize imports throughout the codebase.
52-52: Updated button variants for better visual hierarchy.Changing the active variant from "outline" to "secondary" and inactive variant from "ghost" to "tertiary" likely provides better visual distinction between active and inactive pagination items.
68-68: Standardized size prop naming.Changing size from "default" to "md" for both PaginationPrevious and PaginationNext components aligns with standardized sizing terminology across the UI component library.
Also applies to: 84-84
apps/core/app/not-found.tsx (1)
1-25: Well-structured 404 page with clear navigation options.This Not Found page is well implemented with a clean, centered layout and clear navigation options. The semantic HTML structure with proper heading hierarchy and descriptive text provides good user experience.
apps/core/app/(landing)/product/[id]/page.tsx (2)
13-15: Good job consolidating component imports.Consolidating imports from specific paths to a unified
@repo/ui/componentspath improves code maintainability and consistency.
156-156: Good typography correction.Changing from a curly apostrophe to a straight one maintains consistency in text formatting.
packages/ui/src/components/atoms/countdown.tsx (2)
1-2: Good addition of "use client" directive.Adding the "use client" directive correctly identifies this as a client-side component in Next.js 15.
23-27: Well-implemented forwardRef with proper displayName.The refactoring to use
forwardRefimproves component reusability by allowing refs to be forwarded to the underlyingCountdownLibcomponent. AddingdisplayNameenhances debugging experience in React DevTools.packages/ui/src/components/molecules/tabs/tab-content.tsx (2)
13-13: Good addition of searchParams prop.Adding the optional
searchParamsprop allows for more flexible state management by externalizing URL parameter handling.
28-28:Details
❌ Incorrect review comment
Verify tab state synchronization across the application.
Changing from
useQueryStateto direct URL parameter access alters how tab state is managed. Ensure all components that useTabContentpass the propersearchParamsobject.
🏁 Script executed:
#!/bin/bash # Find all files that import or use TabContent rg -A 3 "TabContent" --type tsxLength of output: 59
Let’s search the entire repo for any usage or import of
TabContent:
🏁 Script executed:
#!/bin/bash # Find all references to the component name rg -n "TabContent" -g '*.tsx' # Find any import paths mentioning the file rg -n "tab-content" -g '*.tsx'Length of output: 4722
Let’s inspect the
TabContentcomponent to confirm howsearchParamsis consumed and whether it falls back to a default hook:
🏁 Script executed:
#!/bin/bash # Show the props and initial implementation of TabContent sed -n '1,200p' packages/ui/src/components/molecules/tabs/tab-content.tsxLength of output: 1045
Let’s inspect the provider and list implementations to see how
searchParamsis handled end-to-end:
🏁 Script executed:
#!/bin/bash # Show TabProvider (stores & initializers) sed -n '1,200p' packages/ui/src/components/molecules/tabs/tab-provider.tsx # Show TabList (where URL syncing likely originates) sed -n '1,200p' packages/ui/src/components/molecules/tabs/tab-list.tsxLength of output: 2577
Let’s confirm which usages actually receive a
searchParamsprop and where we might need to add it:
🏁 Script executed:
#!/bin/bash # 1. Find any components importing Next.js useSearchParams rg -n "useSearchParams" -g '*.tsx' # 2. Inspect landing-tabs to see how it's wired sed -n '1,200p' apps/core/app/\(landing\)/_components/landing-tabs.tsx # 3. Check for searchParams in the dashboard page rg -n "searchParams" -g 'apps/core/app/dashboard/page.tsx'Length of output: 4223
🏁 Script executed:
#!/bin/bash # Display TabTrigger component implementation sed -n '1,200p' packages/ui/src/components/molecules/tabs/tab-trigger.tsxLength of output: 3371
Tab URL sync is opt-in via props
TabContentandTabTriggergracefully fall back to the internal Zustand store when you don’t passsearchParams/setSearchParams. You only need to supply those props in the places where you actually want URL-parameter synchronization (for example,LandingTabsalready does this). All other usages—such as the dashboard page and Storybook stories—will continue working exactly as before via the store without any additional props.Likely an incorrect or invalid review comment.
packages/ui/src/components/atoms/carousel.tsx (3)
10-10: Import path updated to use consolidated module path.The import for
Buttonnow uses the consolidated path@repo/ui/componentsinstead of a specific path, which aligns with the broader refactoring effort in this PR to standardize imports across the codebase.
201-202: TODO comment needs to be addressed and button variant updated.The default props for
CarouselPrevioushave been changed fromvariant = "outline", size = "icon"tovariant = "secondary", size = "md", but there's an unresolved TODO comment about handling thesizeprop.This TODO should be addressed before merging. If there are specific handling requirements for the
mdsize that aren't implemented yet, please complete the implementation or document the known limitations.
231-232: TODO comment needs to be addressed and inconsistent comments.The default props for
CarouselNexthave been changed similarly toCarouselPrevious, but there's a different TODO comment here about handling theiconsize, which suggests inconsistency in the implementation plan.The TODO comments between
CarouselPreviousandCarouselNextare inconsistent - one mentions handlingsize mdwhile the other mentionssize icon. Please clarify the intended behavior for both components and ensure consistency.apps/storybook/src/stories/Attachment.stories.tsx (3)
3-8: Imports consolidated for better organization.The imports for
AttachmentAdmin,AttachmentLanding, and other components have been consolidated to import from a single path@repo/ui/components, which aligns with the broader pattern of import consolidation in this PR.
72-73: Added allowedTypes property to Landing story.The
allowedTypesproperty has been added to both the args and the component props in the Landing story, improving consistency with the component's API.Also applies to: 80-81
98-102: Added required props to Thumbnail story.The Thumbnail story has been updated with additional required props (
allowedTypes,price,productName,username) that match theAttachmentThumbnailPropstype definition from the relevant code snippets.Also applies to: 112-113
apps/core/app/error.tsx (2)
13-17: Error logging implementation is good.The component properly logs errors to the console using useEffect, which is a good practice for error boundaries.
18-42: Well-structured error UI with appropriate recovery options.The error UI provides clear feedback to users with a good hierarchy of information and two recovery options - retry the operation or navigate home.
packages/ui/src/components/index.ts (1)
51-60:Details
❓ Verification inconclusive
Run a quick sweep for other mis-spelled or missing module paths.
A missing barrel export silently breaks tree-shaking and type-generation.
You can validate all export targets with the following script:
🏁 Script executed:
#!/bin/bash # Verify that every re-export path inside ui/src/components/index.ts exists on disk awk '/export \* from/ {print $4}' packages/ui/src/components/index.ts | tr -d '"' | while read -r path; do if [ ! -f "packages/ui/src/components/${path#./}.ts" ] && \ [ ! -f "packages/ui/src/components/${path#./}.tsx" ] && \ [ ! -d "packages/ui/src/components/${path#./}" ]; then echo "❌ Missing: $path" fi doneLength of output: 18348
🏁 Script executed:
#!/bin/bash # List all .ts and .tsx files in components/molecules (max depth 2) find packages/ui/src/components/molecules -maxdepth 2 -type f \( -name '*.ts' -o -name '*.tsx' \) | sed 's|packages/ui/src/components/||'Length of output: 536
Refine export‐path validation and catch real missing modules
The original script is tripping on trailing semicolons (e.g../atoms/accordion;) and reporting all exports as “missing.” Use this improved snippet to strip both quotes and semicolons before checking:#!/usr/bin/env bash # Verify every re-export path in ui/src/components/index.ts exists on disk awk '/export \* from/ { # strip quotes and trailing semicolon path = $4 gsub(/[";]/, "", path) print path }' packages/ui/src/components/index.ts | while read -r path; do if [ ! -f "packages/ui/src/components/${path}.ts" ] && \ [ ! -f "packages/ui/src/components/${path}.tsx" ] && \ [ ! -d "packages/ui/src/components/${path}" ]; then echo "❌ Missing export target: $path" fi doneOnce you’ve run this, please:
- Remove or correct any truly missing exports (e.g. drop stale barrels or add the missing files).
- Rename consistently mis-spelled modules (e.g.
prodoct-card→product-card,passwordInput→password-input) to match your naming convention.- Ensure deep directories like
molecules/attachment/*either have anindex.tsbarrel or adjust the export paths accordingly.- Run one more sweep for your
atoms/…exports to confirm everything lines up withpackages/ui/src/components/atoms/*.apps/core/package.json (1)
20-25:Details
✅ Verification successful
Verify React 19 compatibility with Next 15 before merging.
[email protected]currently lists a peer-dependency ofreact@18, so forcing"react": "19.1.0"(and matching@types) is likely to break the build or lead to subtle runtime issues.If the output still shows
"react": "^18.0.0", please align the versions or wait for an official React-19-compatible Next release.Also applies to: 30-36
🏁 Script executed:
#!/bin/bash # Check Next.js 15 peer dependencies for React curl -s https://registry.npmjs.org/next/15.3.0 | jq '.peerDependencies'Length of output: 331
No action required: Next.js 15.3.0 already supports React 19.1.0
The peerDependencies for[email protected]from the npm registry include"react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0"so locking
"react": "19.1.0"(and matching types) is fully compatible.packages/ui/package.json (4)
12-12: React 19 upgrade looks good.Upgrading the React peer dependency to version 19 is appropriate as part of the Next.js 15 upgrade. This matches the PR objectives.
18-18: Type definitions properly upgraded.Updating the React type definitions to match the React 19 version is essential for proper TypeScript support.
65-65: Dependencies updated appropriately.The nuqs package has been updated to 2.4.3, and zustand has been added as a new dependency. These changes align with the architecture updates in the PR.
Also applies to: 78-79
86-87: Improved package exports configuration.Simplifying the exports to use centralized entry points is a good approach that will make imports more consistent across the codebase.
packages/ui/src/components/molecules/tabs/tab-trigger.tsx (2)
6-6: Import syntax updated correctly.Changed from default import to named import, which is more consistent with the new centralized component exports approach.
63-64: Improved tab state management architecture.The component now accepts external search params management instead of using internal
useQueryState. This is a better approach that:
- Provides more flexibility to consumers
- Aligns with Next.js 15 patterns for managing URL state
- Improves component reusability
Also applies to: 78-80, 91-92, 96-100
apps/core/app/auth/signup/otp/page.tsx (2)
15-16: Properly updated parameter references.All references to searchParams have been correctly updated to use resolvedParams after awaiting the Promise.
Also applies to: 27-28
6-8:Details
✅ Verification successful
Updated for Next.js 15 async searchParams handling.
The component has been correctly updated to handle searchParams as a Promise, which is a breaking change in Next.js 15. The component is now async and properly awaits the searchParams.
Also applies to: 10-14
🏁 Script executed:
#!/bin/bash # Verify searchParams is handled correctly in other page components # Check for other page components that might need similar updates rg -A 3 "searchParams.*Promise" --type tsxLength of output: 72
🏁 Script executed:
#!/bin/bash # Search for any usage of searchParams across all TSX files to verify other pages rg -n "searchParams" -g '*.tsx'Length of output: 1354
✅ Approved: Next.js 15 async
searchParamsupdate verified
- Scanned all
.tsxfiles for any othersearchParamsusage; only the OTP signup page handles it as aPromiseand correctlyawaits it.- Other occurrences (in
tab-content.tsx,tab-trigger.tsx, andlanding-tabs.tsx) use URLSearchParams or theuseSearchParamshook on the client and remain unaffected.packages/ui/src/components/molecules/attachment/attachmentThumbnail/attachmentThumbnail.tsx (4)
1-2: Added "use client" directive appropriately.Adding the "use client" directive is necessary for client-side components in Next.js, especially when using hooks or browser APIs.
12-12: Updated import path to use centralized exports.The import of Typography now comes from the centralized
@repo/ui/componentspath, which aligns with the export configuration changes in package.json.
14-20: Changed interface to type definition for props.The props definition was changed from an interface to a type. This is a stylistic change that maintains the same functionality.
178-178: Added displayName for improved debugging.Adding a displayName property to the component helps with debugging in React DevTools, making it easier to identify components in the component tree.
| "private": true, | ||
| "scripts": { | ||
| "lint": "eslint .", | ||
| "type-check": "bun tsc --noEmit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script still using Bun
While the root package.json has been updated to use Yarn, this script still references Bun. Consider updating it to use Yarn for consistency.
- "type-check": "bun tsc --noEmit"
+ "type-check": "yarn tsc --noEmit"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "type-check": "bun tsc --noEmit" | |
| "type-check": "yarn tsc --noEmit" |
| strokeWidth="2" | ||
| stroke-linecap="round" | ||
| stroke-linejoin="round" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete JSX attribute conversion
stroke-linecap and stroke-linejoin are invalid in React JSX—only strokeWidth was updated.
Please apply this diff to fully convert to camelCase:
- stroke-linecap="round"
- stroke-linejoin="round"
+ strokeLinecap="round"
+ strokeLinejoin="round"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| strokeWidth="2" | |
| stroke-linecap="round" | |
| stroke-linejoin="round" | |
| strokeWidth="2" | |
| strokeLinecap="round" | |
| strokeLinejoin="round" |
| stroke="currentColor" | ||
| stroke-width="2" | ||
| strokeWidth="2" | ||
| stroke-linecap="round" | ||
| stroke-linejoin="round" | ||
| className="icon icon-tabler icons-tabler-outline icon-tabler-user" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SVG Attribute Naming Inconsistency
While strokeWidth="2" is corrected for React, the adjacent attributes stroke-linecap and stroke-linejoin remain in kebab-case and will not be recognized in JSX. They should be updated to camelCase (strokeLinecap, strokeLinejoin).
Apply this diff:
- stroke-linecap="round"
- stroke-linejoin="round"
+ strokeLinecap="round"
+ strokeLinejoin="round"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| stroke="currentColor" | |
| stroke-width="2" | |
| strokeWidth="2" | |
| stroke-linecap="round" | |
| stroke-linejoin="round" | |
| className="icon icon-tabler icons-tabler-outline icon-tabler-user" | |
| stroke="currentColor" | |
| strokeWidth="2" | |
| strokeLinecap="round" | |
| strokeLinejoin="round" | |
| className="icon icon-tabler icons-tabler-outline icon-tabler-user" |
| d="M4 6H20M0 12H16M4 18H20" | ||
| stroke="white" | ||
| stroke-width="2" | ||
| strokeWidth="2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
JSX attribute convention fixed, but more needed
Good change to update stroke-width to the JSX-compliant strokeWidth. However, other SVG attributes on lines 20-21 (stroke-linecap and stroke-linejoin) still use kebab-case and should also be updated to camelCase for consistency.
strokeWidth="2"
- stroke-linecap="round"
- stroke-linejoin="round"
+ strokeLinecap="round"
+ strokeLinejoin="round"Additionally, clip-path on line 15 should also be converted to clipPath.
| d="M8.5 11V7C8.5 5.93913 8.92143 4.92172 9.67157 4.17157C10.4217 3.42143 11.4391 3 12.5 3C13.5609 3 14.5783 3.42143 15.3284 4.17157C16.0786 4.92172 16.5 5.93913 16.5 7V11M5.5 13C5.5 12.4696 5.71071 11.9609 6.08579 11.5858C6.46086 11.2107 6.96957 11 7.5 11H17.5C18.0304 11 18.5391 11.2107 18.9142 11.5858C19.2893 11.9609 19.5 12.4696 19.5 13V19C19.5 19.5304 19.2893 20.0391 18.9142 20.4142C18.5391 20.7893 18.0304 21 17.5 21H7.5C6.96957 21 6.46086 20.7893 6.08579 20.4142C5.71071 20.0391 5.5 19.5304 5.5 19V13ZM11.5 16C11.5 16.2652 11.6054 16.5196 11.7929 16.7071C11.9804 16.8946 12.2348 17 12.5 17C12.7652 17 13.0196 16.8946 13.2071 16.7071C13.3946 16.5196 13.5 16.2652 13.5 16C13.5 15.7348 13.3946 15.4804 13.2071 15.2929C13.0196 15.1054 12.7652 15 12.5 15C12.2348 15 11.9804 15.1054 11.7929 15.2929C11.6054 15.4804 11.5 15.7348 11.5 16Z" | ||
| stroke={color} | ||
| stroke-width="2" | ||
| strokeWidth="2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
JSX attribute convention fixed, but more needed
Good change to update stroke-width to the JSX-compliant strokeWidth. However, other SVG attributes on lines 18-19 (stroke-linecap and stroke-linejoin) still use kebab-case and should also be updated to camelCase for consistency.
strokeWidth="2"
- stroke-linecap="round"
- stroke-linejoin="round"
+ strokeLinecap="round"
+ strokeLinejoin="round"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| strokeWidth="2" | |
| strokeWidth="2" | |
| strokeLinecap="round" | |
| strokeLinejoin="round" |
| "use client" | ||
|
|
||
| export default function GlobalError({ | ||
| error, | ||
| reset, | ||
| }: { | ||
| error: Error & { digest?: string } | ||
| reset: () => void | ||
| }) { | ||
| return ( | ||
| <html> | ||
| <body> | ||
| <div className="container flex flex-col items-center justify-center min-h-screen gap-8"> | ||
| <div className="flex flex-col items-center gap-4"> | ||
| <h1 className="text-4xl font-bold">Error</h1> | ||
| <h2 className="text-xl font-semibold text-center"> | ||
| Something went wrong! | ||
| </h2> | ||
| <p className="text-sm text-center text-gray-500"> | ||
| {error.message || "An unexpected error occurred"} | ||
| </p> | ||
| </div> | ||
| <button | ||
| onClick={() => reset()} | ||
| className="bg-blue-500 text-white px-4 py-2 rounded-md" | ||
| > | ||
| Try again | ||
| </button> | ||
| </div> | ||
| </body> | ||
| </html> | ||
| ) | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
New global error handling component added.
This new component provides application-wide error handling capabilities aligned with Next.js best practices. It shows a user-friendly error message and offers a way to recover from errors.
Consider these improvements:
- Extract hardcoded styles to use the design system's classes (like
text-muted-foregroundinstead oftext-gray-500) - Add error logging similar to the regular Error component
- <p className="text-sm text-center text-gray-500">
+ <p className="text-sm text-center text-muted-foreground">
{error.message || "An unexpected error occurred"}
</p>+ import { useEffect } from "react"
+
export default function GlobalError({
error,
reset,
}: {
error: Error & { digest?: string }
reset: () => void
}) {
+ useEffect(() => {
+ // Log the error to an error reporting service
+ console.error(error)
+ }, [error])
+
return (📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "use client" | |
| export default function GlobalError({ | |
| error, | |
| reset, | |
| }: { | |
| error: Error & { digest?: string } | |
| reset: () => void | |
| }) { | |
| return ( | |
| <html> | |
| <body> | |
| <div className="container flex flex-col items-center justify-center min-h-screen gap-8"> | |
| <div className="flex flex-col items-center gap-4"> | |
| <h1 className="text-4xl font-bold">Error</h1> | |
| <h2 className="text-xl font-semibold text-center"> | |
| Something went wrong! | |
| </h2> | |
| <p className="text-sm text-center text-gray-500"> | |
| {error.message || "An unexpected error occurred"} | |
| </p> | |
| </div> | |
| <button | |
| onClick={() => reset()} | |
| className="bg-blue-500 text-white px-4 py-2 rounded-md" | |
| > | |
| Try again | |
| </button> | |
| </div> | |
| </body> | |
| </html> | |
| ) | |
| } | |
| "use client" | |
| import { useEffect } from "react" | |
| export default function GlobalError({ | |
| error, | |
| reset, | |
| }: { | |
| error: Error & { digest?: string } | |
| reset: () => void | |
| }) { | |
| useEffect(() => { | |
| // Log the error to an error reporting service | |
| console.error(error) | |
| }, [error]) | |
| return ( | |
| <html> | |
| <body> | |
| <div className="container flex flex-col items-center justify-center min-h-screen gap-8"> | |
| <div className="flex flex-col items-center gap-4"> | |
| <h1 className="text-4xl font-bold">Error</h1> | |
| <h2 className="text-xl font-semibold text-center"> | |
| Something went wrong! | |
| </h2> | |
| <p className="text-sm text-center text-muted-foreground"> | |
| {error.message || "An unexpected error occurred"} | |
| </p> | |
| </div> | |
| <button | |
| onClick={() => reset()} | |
| className="bg-blue-500 text-white px-4 py-2 rounded-md" | |
| > | |
| Try again | |
| </button> | |
| </div> | |
| </body> | |
| </html> | |
| ) | |
| } |
| export default function Error({ | ||
| error, | ||
| reset, | ||
| }: { | ||
| error: Error & { digest?: string } | ||
| reset: () => void | ||
| }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Component name shadows global Error object.
The component named Error shadows the global JavaScript Error constructor, which could lead to confusion.
-export default function Error({
+export default function ErrorPage({
error,
reset,
}: {
error: Error & { digest?: string }
reset: () => void
}) {📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export default function Error({ | |
| error, | |
| reset, | |
| }: { | |
| error: Error & { digest?: string } | |
| reset: () => void | |
| }) { | |
| export default function ErrorPage({ | |
| error, | |
| reset, | |
| }: { | |
| error: Error & { digest?: string } | |
| reset: () => void | |
| }) { |
🧰 Tools
🪛 Biome (1.9.4)
[error] 6-6: Do not shadow the global "Error" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
| {ProductList.map((product) => ( | ||
| <ProductCard | ||
| key={product.title} | ||
| title={product.title} | ||
| price={product.price} | ||
| image={product.image} | ||
| username={product.username} | ||
| see={product.see} | ||
| avatar={product.avatar} | ||
| like={product.like} | ||
| /> | ||
| ))} | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Ensure stable, unique React keys for the product list.
product.title may repeat across different authors or categories, causing key collisions and unnecessary re-mounts.
- {ProductList.map((product) => (
+ {ProductList.map((product, idx) => (
<ProductCard
- key={product.title}
+ key={`${product.title}-${idx}`}(Apply the same pattern to the other three lists.)
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| {ProductList.map((product) => ( | |
| <ProductCard | |
| key={product.title} | |
| title={product.title} | |
| price={product.price} | |
| image={product.image} | |
| username={product.username} | |
| see={product.see} | |
| avatar={product.avatar} | |
| like={product.like} | |
| /> | |
| ))} | |
| </div> | |
| {ProductList.map((product, idx) => ( | |
| <ProductCard | |
| key={`${product.title}-${idx}`} | |
| title={product.title} | |
| price={product.price} | |
| image={product.image} | |
| username={product.username} | |
| see={product.see} | |
| avatar={product.avatar} | |
| like={product.like} | |
| /> | |
| ))} |
| export * from "./molecules/parallax-scroll-effect"; | ||
| export * from "./molecules/particles"; | ||
| export * from "./molecules/passwordInput"; | ||
| export * from "./molecules/prodoct-card"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo breaks export – prodoct-card should be product-card.
The current path will fail to resolve at build time, causing “Module not found” errors anywhere ProductCard is imported from the aggregated barrel.
-export * from "./molecules/prodoct-card";
+export * from "./molecules/product-card";📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export * from "./molecules/prodoct-card"; | |
| -export * from "./molecules/prodoct-card"; | |
| +export * from "./molecules/product-card"; |
| <Image | ||
| src={shadowBGLanding} | ||
| alt="bg-landing" | ||
| className="top-0 left-0 absolute -z-10" | ||
| width={1440} | ||
| height={1024} | ||
| priority | ||
| /> | ||
|
|
||
| <img | ||
| src="/images/landing-simbol.svg" | ||
| {/* Planet Background */} | ||
| <Image | ||
| src={planetBG} | ||
| alt="bg-landing" | ||
| className="right-0 hidden sm:block absolute -z-10" | ||
| className="left-0 hidden sm:block absolute -z-10" | ||
| width={250} | ||
| height={250} | ||
| /> | ||
| <img | ||
| src="/images/landing-simbol2.svg" | ||
|
|
||
| {/* Figma Background */} | ||
| <Image | ||
| src={figmaBG} | ||
| alt="bg-landing" | ||
| className="left-0 sm:opacity-100 opacity-35 absolute -z-10" | ||
| className="left-10 top-72 sm:opacity-100 opacity-35 absolute -z-10" | ||
| width={250} | ||
| height={250} | ||
| /> | ||
|
|
||
| {/* Heder */} | ||
| {/* Sketch Background */} | ||
| <Image | ||
| src={sketchBG} | ||
| alt="bg-landing" | ||
| className="right-10 top-12 sm:opacity-100 opacity-35 absolute -z-10" | ||
| width={250} | ||
| height={250} | ||
| /> | ||
|
|
||
| {/* Blender Background */} | ||
| <Image | ||
| src={blenderBG} | ||
| alt="bg-landing" | ||
| className="right-24 top-80 sm:opacity-100 opacity-35 absolute -z-10" | ||
| width={250} | ||
| height={250} | ||
| /> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Decorative background images should have empty alt text for a11y compliance
These SVGs are purely decorative (they convey no content) so screen-reader users should not hear “bg-landing” announced five times. The WCAG recommendation is to use an empty alt="" (or set aria-hidden="true") for such assets.
- alt="bg-landing"
+ alt=""(Apply to all background <Image> elements.)
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <Image | |
| src={shadowBGLanding} | |
| alt="bg-landing" | |
| className="top-0 left-0 absolute -z-10" | |
| width={1440} | |
| height={1024} | |
| priority | |
| /> | |
| <img | |
| src="/images/landing-simbol.svg" | |
| {/* Planet Background */} | |
| <Image | |
| src={planetBG} | |
| alt="bg-landing" | |
| className="right-0 hidden sm:block absolute -z-10" | |
| className="left-0 hidden sm:block absolute -z-10" | |
| width={250} | |
| height={250} | |
| /> | |
| <img | |
| src="/images/landing-simbol2.svg" | |
| {/* Figma Background */} | |
| <Image | |
| src={figmaBG} | |
| alt="bg-landing" | |
| className="left-0 sm:opacity-100 opacity-35 absolute -z-10" | |
| className="left-10 top-72 sm:opacity-100 opacity-35 absolute -z-10" | |
| width={250} | |
| height={250} | |
| /> | |
| {/* Heder */} | |
| {/* Sketch Background */} | |
| <Image | |
| src={sketchBG} | |
| alt="bg-landing" | |
| className="right-10 top-12 sm:opacity-100 opacity-35 absolute -z-10" | |
| width={250} | |
| height={250} | |
| /> | |
| {/* Blender Background */} | |
| <Image | |
| src={blenderBG} | |
| alt="bg-landing" | |
| className="right-24 top-80 sm:opacity-100 opacity-35 absolute -z-10" | |
| width={250} | |
| height={250} | |
| /> | |
| <Image | |
| src={shadowBGLanding} | |
| - alt="bg-landing" | |
| + alt="" | |
| className="top-0 left-0 absolute -z-10" | |
| width={1440} | |
| height={1024} | |
| priority | |
| /> | |
| {/* Planet Background */} | |
| <Image | |
| src={planetBG} | |
| - alt="bg-landing" | |
| + alt="" | |
| className="left-0 hidden sm:block absolute -z-10" | |
| width={250} | |
| height={250} | |
| /> | |
| {/* Figma Background */} | |
| <Image | |
| src={figmaBG} | |
| - alt="bg-landing" | |
| + alt="" | |
| className="left-10 top-72 sm:opacity-100 opacity-35 absolute -z-10" | |
| width={250} | |
| height={250} | |
| /> | |
| {/* Sketch Background */} | |
| <Image | |
| src={sketchBG} | |
| - alt="bg-landing" | |
| + alt="" | |
| className="right-10 top-12 sm:opacity-100 opacity-35 absolute -z-10" | |
| width={250} | |
| height={250} | |
| /> | |
| {/* Blender Background */} | |
| <Image | |
| src={blenderBG} | |
| - alt="bg-landing" | |
| + alt="" | |
| className="right-24 top-80 sm:opacity-100 opacity-35 absolute -z-10" | |
| width={250} | |
| height={250} | |
| /> |
Dokploy Preview Deployment
|
Updated the GitHub Actions workflow to install Turbo globally and modified the type checking and build steps to utilize Turbo. This improves the reliability of type checks and builds by providing fallback options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.github/workflows/build-and-merge.yml (3)
12-17: Use default GITHUB_TOKEN for checkout
actions/checkoutcan use the built-inGITHUB_TOKENfor read operations. Limiting PAT usage to only the merge steps reduces risk.🧰 Tools
🪛 actionlint (1.7.4)
13-13: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
27-31: Pin Bun version instead oflatest
Usinglatestcan introduce breaking changes as Bun evolves. Consider aligning the Bun version here with yourbun.lockbto guarantee reproducibility.
36-38: Global Turbo installation
Installing Turbo globally may drift versions between CI runs. It’s safer to lock it as a devDependency and invoke viabun x turboornpx turbo.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.github/workflows/build-and-merge.yml(1 hunks).github/workflows/deploy.yml(0 hunks).github/workflows/docker-ci.yml(0 hunks).github/workflows/preview.yml(0 hunks).github/workflows/priview-clean.yml(0 hunks)
💤 Files with no reviewable changes (4)
- .github/workflows/priview-clean.yml
- .github/workflows/docker-ci.yml
- .github/workflows/preview.yml
- .github/workflows/deploy.yml
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/build-and-merge.yml
13-13: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (6)
.github/workflows/build-and-merge.yml (6)
1-6: Workflow triggers are appropriate
The PR lifecycle events (opened,synchronize,reopened,ready_for_review) cover typical merge scenarios.
18-26: Caching Bun dependencies
The cache key and paths are well defined, which will significantly speed up CI runs when dependencies haven’t changed.
32-35: Conditional dependency installation
Skippingbun installon a cache hit is correct and optimizes CI time.
39-44: Unify type-check and build commands
The fallback betweenbun runandnpx turboworks, but standardizing on one CLI pattern (e.g.,bun x turbo buildfor both checks and build) will simplify maintenance.
Please verify that thetype-checksandbuildscripts exist in your rootpackage.json.
49-58: PR author check logic is solid
The script correctly assignsMERGE_IMMEDIATELYbased on the PR author.
80-85: Merge step via GitHub API is functional
Thecurlinvocation for a squash merge is correct. Confirm that the PAT hasreposcopes, or consider switching to the built-inGITHUB_TOKENif it meets your requirements.
| - name: Wait for Approval (if not mrbadri) | ||
| id: check-approval | ||
| if: env.MERGE_IMMEDIATELY == 'false' | ||
| run: | | ||
| APPROVED=0 | ||
| while [ $APPROVED -eq 0 ]; do | ||
| echo "Checking for approvals..." | ||
| REVIEWS=$(curl -s -H "Authorization: token ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \ | ||
| -H "Accept: application/vnd.github.v3+json" \ | ||
| https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews) | ||
| if echo "$REVIEWS" | grep -q '"state": "APPROVED"'; then | ||
| APPROVED=1 | ||
| echo "Pull request has at least one approval!" | ||
| else | ||
| echo "Waiting for at least one approval..." | ||
| sleep 60 | ||
| fi | ||
| done | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add timeout and fix conditional syntax in approval loop
- The
whileloop will hang indefinitely if no approval arrives; add a retry limit or timeout to fail gracefully. - The
if: env.MERGE_IMMEDIATELY == 'false'needs to be wrapped in an expression. Update to:
if: ${{ env.MERGE_IMMEDIATELY == 'false' }}
Added steps to set up Node.js and Bun in the GitHub Actions workflow. Updated dependency installation to include design system dependencies and global tools, improving the build process for the design system.
Temporarily commented out all steps in the GitHub Actions workflow for building and merging pull requests. This preserves the existing structure while allowing for potential modifications or re-enabling in the future.
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Chores
Style
Documentation