Skip to content

chore(deps): upgrade next and tailwind#62

Open
mezotv wants to merge 11 commits intojoschan21:mainfrom
mezotv:chore/deps-migration
Open

chore(deps): upgrade next and tailwind#62
mezotv wants to merge 11 commits intojoschan21:mainfrom
mezotv:chore/deps-migration

Conversation

@mezotv
Copy link
Copy Markdown
Contributor

@mezotv mezotv commented Nov 13, 2025

Upgrades next and tailwind and makes sure the styles and all work perfectly, also optimized @phosphor-ui/icons!

Summary by CodeRabbit

  • Chores
    • Upgraded core frameworks and many UI/dev dependencies; enabled optimized icon imports and updated PostCSS/Tailwind tooling; Tailwind config removed causing fallback to default theme.
  • Style
    • Global theming moved to CSS variables; reorganized utilities and animations. Buttons, inputs, tooltips, skeletons, and separators refreshed for improved focus, disabled states, sizing, and dark-mode consistency.
  • Bug Fixes / UX
    • Sidebar rebuilt for improved mobile/desktop behavior, resizable drag support, and more predictable keyboard interactions.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link
Copy Markdown

vercel bot commented Nov 13, 2025

@mezotv is attempting to deploy a commit to the joschan21's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 13, 2025

Walkthrough

Enables Next.js experimental optimizePackageImports for @phosphor-icons/react; large dependency upgrades (Next/React/Tailwind and many UI libs); switches PostCSS plugin key and global CSS to Tailwind v4 style; removes tailwind.config.ts; refactors Sidebar to a provider with drag-resize state and converts many components to function components; renames exported proxy middleware.

Changes

Cohort / File(s) Summary
Next / Configs
next.config.ts, tsconfig.json
Adds experimental optimizePackageImports entry for @phosphor-icons/react; reformats tsconfig.json arrays and adds .next/dev/types/**/*.ts to include.
Dependencies
package.json
Major dependency upgrades: next → 16.x, react/react-dom → 19.2.x; many @radix-ui/* bumps; Tailwind moved to 4.x with @tailwindcss/postcss & @tailwindcss/typography added; recharts added; assorted devDeps/types updated.
PostCSS & Global CSS
postcss.config.mjs, src/app/globals.css
PostCSS now default-exports an object and uses "@tailwindcss/postcss" plugin key; globals replace @tailwind directives with @import 'tailwindcss', add tw-animate-css, introduce an @theme CSS variable block, new layers/utilities and keyframes for Tailwind v4 compatibility.
Tailwind Config Removal
tailwind.config.ts
File removed — custom theme extensions, animations, keyframes and custom .ring-3 utility deleted.
Sidebar Refactor
src/components/ui/sidebar.tsx
Converts forwardRef-based API into plain function components and a SidebarProvider that owns width/open/drag state and cookie persistence; renames context type to SidebarContextProps; adds useSidebar changes, many data-slot attributes, drag-resize handling (via useSidebarResize), desktop/mobile branching, and width constants.
UI Component Styling
src/components/ui/button.tsx, src/components/ui/input.tsx, src/components/ui/separator.tsx, src/components/ui/skeleton.tsx, src/components/ui/tooltip.tsx
Presentational-only changes: updated className strings, focus-visible ring utilities, color/token swaps, icon size token renames, input height/focus behavior adjustments, separator data-slot rename and bg token change, skeleton bg token swap, tooltip color/size updates.
Proxy Export Rename
src/proxy.ts
Renames exported function from middleware(request: NextRequest) to proxy(request: NextRequest); implementation unchanged.
Formatting / Minor Export Edits
postcss.config.mjs, tsconfig.json
Simplified PostCSS export shape and reflowed JSON/arrays formatting in tsconfig.json.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant App as App / Consumer
  participant Provider as SidebarProvider
  participant Context as SidebarContext
  participant Rail as SidebarRail (drag handle)
  participant Content as SidebarContent

  App->>Provider: mount (reads defaultOpen/defaultWidth)
  Provider->>Context: initialize state (open, width, dragging)
  Provider-->>App: provide context (open,width,actions)
  App->>Content: render using context values
  Note over Rail,Provider: User starts drag-resize
  Rail->>Provider: startDrag()
  loop while dragging
    Rail->>Provider: updateWidth(delta)
    Provider-->>Content: broadcast width change
  end
  Rail->>Provider: endDrag()
  Provider->>Context: persist width (cookie) and restore transitions
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

  • Areas needing focused review:
    • src/components/ui/sidebar.tsx — provider API/signature changes, context typing, drag-resize logic, cookie persistence, keyboard shortcuts, and mobile Sheet integration.
    • Removal of tailwind.config.ts + src/app/globals.css — ensure theme tokens and utilities are present or intentionally migrated.
    • package.json — compatibility checks for Next 16 / React 19 / Tailwind 4 and new PostCSS plugin.
    • postcss.config.mjs — plugin key change and export shape for build pipeline.
    • src/proxy.ts — middleware export rename and Next middleware expectations.

Possibly related PRs

Poem

🐇 I hopped through configs, nudged imports light,
rails that stretch and a sidebar bright,
deps climbed high and styles rearrange,
buttons hum, inputs change their range,
I twitch my nose and cheer this code tonight ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(deps): upgrade next and tailwind' directly summarizes the main changes—upgrading Next.js (15.3.1→16.0.7), Tailwind (3.4.1→4.1.12), and related dependencies, which comprise the bulk of the changeset.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ac1e6e and 7a25576.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • package.json (5 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: mezotv
Repo: joschan21/contentport PR: 62
File: src/proxy.ts:8-8
Timestamp: 2025-11-13T14:26:23.051Z
Learning: In Next.js 16, middleware has been renamed to proxy. The file convention changes from middleware.ts to proxy.ts, and the exported function changes from middleware to proxy. The config export with matcher array remains the same. The runtime changes to Node.js by default (Edge runtime is not supported for proxy).
🔇 Additional comments (4)
package.json (4)

111-114: ✅ React 19.2.1 and @types versions align correctly.

The versions match: React 19.2.1 with @types/react 19.2.4 and @types/react-dom 19.2.3 (patch-level alignment is appropriate). This is compatible with Next.js 16.0.7.


147-148: ✅ Tailwind v4 tooling correctly updated.

New @tailwindcss/postcss (4.1.12) and @tailwindcss/typography (0.5.19) have been added to devDependencies, and tailwindcss has been bumped to 4.1.12. This aligns with Tailwind CSS v4's architecture (Oxide engine, separate PostCSS plugin). The postcss.config.mjs refactor (noted in related files) should reflect these changes.

Ensure postcss.config.mjs uses the new @tailwindcss/postcss plugin instead of the legacy tailwindcss plugin. Based on learnings, verify that the plugin export key has been updated for Tailwind v4.

Also applies to: 159-159


124-124: recharts 3.4.1 is compatible with React 19.2.1 — test ResponsiveContainer/ComposedChart rendering.

Recharts 3.4.1 explicitly supports React 19 (peer dependency range includes ^19.0.0) and does not rely on removed React APIs (ReactDOM.render, findDOMNode, string refs). However, be aware of reported React 19 edge cases with ResponsiveContainer and ComposedChart rendering, particularly in production builds. Additionally, some installations may require adding a react-is resolution/override to match React 19; verify in your environment or add if needed.


102-102: Remove this comment — the premise is incorrect.

eslint-plugin-react-hooks v6 does not have a peer-dependency requirement on React 19.2. The plugin enforces Hooks rules and includes optional React Compiler integrations, but operates independently of React minor versions. While v6 may be useful for new features, it is not required for React 19.2 compatibility.

Likely an incorrect or invalid review comment.


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

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

Copy link
Copy Markdown
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: 4

🧹 Nitpick comments (5)
tsconfig.json (1)

18-18: Remove redundant React imports from three files now compatible with automatic JSX runtime.

The jsx: "react-jsx" configuration change is correct and fully supported by React 19.2.0 and Next.js 16.0.3. No JSX pragma conflicts were found. However, three files still have unnecessary explicit React imports that should be removed:

  • src/hooks/use-sidebar-resize.ts
  • src/frontend/studio/components/modal.tsx
  • src/lib/highlight-utils.ts

These imports are no longer needed with the automatic JSX runtime enabled.

src/app/globals.css (1)

200-208: Replace hardcoded lime color with theme token.

Line 204 uses a hardcoded lime value with a comment indicating it's a known issue. Consider using a theme token from your color system for consistency and maintainability.

     fill: none;
-    stroke: lime; /* 💥 hardcoded ugly color */
+    stroke: var(--color-brand-500); /* or another appropriate theme color */
     stroke-width: 0.01; /* visible on a normalized 0–1 viewBox */
src/components/ui/sidebar.tsx (3)

114-119: Inconsistent dependency array pattern.

While state setters from useState are stable, omitting setOpenMobile from the dependency array while including setOpen creates an inconsistent pattern. Although this works, it may confuse future maintainers.

Consider one of these approaches for consistency:

  1. Include setOpenMobile in the deps (preferred for clarity)
  2. Remove setOpen from deps as well (if relying on setter stability)

Apply this diff if you prefer explicit dependencies:

  }, [
    isMobile,
    setOpen, 
-		//* remove setOpenMobile from dependencies because setOpenMobile are state setters created by useState
-		// setOpenMobile
+   setOpenMobile,
  ]);

157-170: Same dependency array inconsistency.

The same pattern appears here—setOpenMobile is omitted while other values are included. This creates inconsistency in the dependency management approach.

For consistency with the rest of the dependency array, consider including setOpenMobile:

    [
      state,
      open,
      setOpen,
      isMobile,
      openMobile,
-     //* remove setOpenMobile from dependencies because setOpenMobile are state setters created by useState
-     // setOpenMobile,
+     setOpenMobile,
      toggleSidebar,
      //* add width to dependencies
      width,
      //* add isDraggingRail to dependencies
      isDraggingRail,
    ],

360-360: Remove stable ref from useMemo dependencies.

The ref from useRef is stable across renders and doesn't need to be in the dependency array. Only dragRef should be included.

Apply this diff:

-  const combinedRef = React.useMemo(() => mergeButtonRefs([ref, dragRef]), [ref, dragRef])
+  const combinedRef = React.useMemo(() => mergeButtonRefs([ref, dragRef]), [dragRef])
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e60a0f9 and 5e8825f.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • next.config.ts (1 hunks)
  • package.json (5 hunks)
  • postcss.config.mjs (1 hunks)
  • src/app/globals.css (2 hunks)
  • src/components/ui/button.tsx (2 hunks)
  • src/components/ui/input.tsx (1 hunks)
  • src/components/ui/separator.tsx (1 hunks)
  • src/components/ui/sidebar.tsx (2 hunks)
  • src/components/ui/skeleton.tsx (1 hunks)
  • src/components/ui/tooltip.tsx (1 hunks)
  • src/proxy.ts (1 hunks)
  • tsconfig.json (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,jsx,ts,tsx,py,go,java,rb}

📄 CodeRabbit inference engine (.cursor/rules/posthog-integration.mdc)

Never hallucinate an API key. Instead, always use the API key populated in the .env file.

Files:

  • next.config.ts
  • src/components/ui/tooltip.tsx
  • src/components/ui/skeleton.tsx
  • src/components/ui/separator.tsx
  • src/proxy.ts
  • src/components/ui/button.tsx
  • src/components/ui/input.tsx
  • src/components/ui/sidebar.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/posthog-integration.mdc)

**/*.{ts,tsx,js,jsx}: If using TypeScript, use an enum to store flag names. If using JavaScript, store flag names as strings to an object declared as a constant, to simulate an enum. Use a consistent naming convention for this storage.
enum/const object members should be written UPPERCASE_WITH_UNDERSCORE.
Gate flag-dependent code on a check that verifies the flag's values are valid and expected.
If a custom property for a person or event is at any point referenced in two or more files or two or more callsites in the same file, use an enum or const object, as above in feature flags.

Files:

  • next.config.ts
  • src/components/ui/tooltip.tsx
  • src/components/ui/skeleton.tsx
  • src/components/ui/separator.tsx
  • src/proxy.ts
  • src/components/ui/button.tsx
  • src/components/ui/input.tsx
  • src/components/ui/sidebar.tsx
🧠 Learnings (1)
📚 Learning: 2025-07-24T11:44:30.888Z
Learnt from: CR
Repo: joschan21/contentport PR: 0
File: .cursor/rules/posthog-integration.mdc:0-0
Timestamp: 2025-07-24T11:44:30.888Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : enum/const object members should be written UPPERCASE_WITH_UNDERSCORE.

Applied to files:

  • tsconfig.json
🧬 Code graph analysis (3)
src/components/ui/skeleton.tsx (1)
src/lib/utils.ts (1)
  • cn (6-8)
src/components/ui/separator.tsx (1)
src/lib/utils.ts (1)
  • cn (6-8)
src/components/ui/sidebar.tsx (2)
src/lib/utils.ts (1)
  • cn (6-8)
src/components/ui/duolingo-button.tsx (1)
  • DuolingoButton (48-79)
🪛 Biome (2.1.2)
src/app/globals.css

[error] 169-169: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

pointer-events is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)

🔇 Additional comments (33)
src/components/ui/separator.tsx (1)

16-21: LGTM! Theme token migration is correct.

The migration from bg-stone-200 to bg-border properly uses semantic theme tokens consistent with Tailwind v4's theming approach. The data-slot change from "separator-root" to "separator" also aligns with a cleaner naming convention.

src/components/ui/tooltip.tsx (2)

49-49: LGTM! Theme token migration is correct.

The migration from hardcoded colors (bg-gray-800) to semantic theme tokens (bg-foreground, text-background) properly aligns with Tailwind v4's theming approach. Note that the font size has been reduced from text-sm to text-xs, which may affect readability for longer tooltip content.


55-55: Arrow sizing reduced—verify visual consistency.

The arrow size has been reduced from size-3.5 to size-2.5. Ensure this smaller arrow size aligns with the overall tooltip design and remains visible across different backgrounds.

postcss.config.mjs (1)

2-6: LGTM! Correct PostCSS configuration for Tailwind v4.

The migration from tailwindcss: {} to @tailwindcss/postcss: {} is required for Tailwind CSS v4 compatibility. The direct default export is also cleaner than the previous pattern.

tsconfig.json (3)

3-7: LGTM! Improved readability.

The multi-line formatting of the lib array improves readability without affecting functionality.


41-41: LGTM! Enhanced type coverage.

Adding .next/dev/types/**/*.ts to the include array ensures TypeScript picks up Next.js development-time type definitions, improving type safety during development.


43-46: LGTM! Appropriate exclusions.

Excluding the jobs directory is reasonable, likely containing scripts or background jobs that don't need TypeScript compilation.

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

8-8: LGTM! Enhanced accessibility and focus management.

The additions improve the button component:

  • focus-visible:border-ring and focus-visible:ring-ring/50 provide better keyboard navigation indicators
  • disabled:cursor-not-allowed improves UX by showing appropriate cursor state
  • Focus-visible is preferable to focus as it only shows the ring for keyboard navigation, not mouse clicks

12-12: LGTM! Correct theme token migration.

The migration from hardcoded bg-indigo-700 to semantic bg-primary token aligns with Tailwind v4's theme-driven approach, enabling consistent theming across the application.


28-29: LGTM! Added icon size variants.

The new icon-sm (size-8) and icon-lg (size-10) variants provide useful size options for icon-only buttons, complementing the existing icon (size-9) variant.

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

11-11: LGTM! Comprehensive styling improvements.

The updated styling improves the input component:

  • Height reduced to h-9 (matches button height for consistency)
  • Semantic tokens (border-input, bg-transparent) align with Tailwind v4 theming
  • Dark mode support with dark:bg-input/30
  • Custom selection colors (selection:bg-primary) enhance UX
  • Properly styled file input button

12-12: LGTM! Improved focus behavior.

Migrating from focus-within to focus-visible improves accessibility by only showing the focus ring for keyboard navigation, not mouse clicks. This aligns with the button component's focus behavior.

next.config.ts (1)

6-8: Configuration is correct and matches installed dependency.

Verification confirms that:

  • Installed package: @phosphor-icons/react (v2.1.10)
  • Configuration uses: @phosphor-icons/react
  • All imports across the codebase (20+ files) consistently use @phosphor-icons/react
  • No references to @phosphor-ui/icons found

The package name is accurate and consistent throughout the codebase.

src/app/globals.css (6)

1-2: LGTM! Correct Tailwind v4 import syntax.

The migration from the old @tailwind base/components/utilities directives to the new @import 'tailwindcss' syntax is correct per Tailwind v4 documentation.


6-95: Excellent Tailwind v4 theme architecture.

The @theme inline block properly defines:

  • Brand color palette with comprehensive scales
  • System color tokens that reference CSS variables
  • Radius utilities
  • Custom marquee animations

This follows Tailwind v4 best practices for theme-driven design.


97-113: Good migration strategy for Tailwind v4 compatibility.

This compatibility layer addresses the breaking change where Tailwind v4 changed the default border color from gray to currentColor. The clear documentation and fallback approach allows gradual migration without visual regressions.


115-149: Proper migration to Tailwind v4 @Utility directive.

These custom utilities (animation-delay, text-balance, line-clamp) are correctly defined using the new @utility directive, which is the recommended approach in Tailwind v4 for custom utility classes.


211-282: Comprehensive theme variable definitions.

The :root and .dark theme variables are well-structured and provide complete coverage of all theme tokens. The HSL color space usage and consistent naming conventions align with modern theming best practices.


293-352: Editor utilities properly migrated to v4 layer system.

The lexical editor styles, mention nodes, and placeholder behaviors are correctly organized within the @layer utilities block, maintaining their functionality while aligning with Tailwind v4's architecture.

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

7-7: Excellent theme token migration.

Changing from bg-gray-200 to bg-accent aligns with the theme-driven architecture established in globals.css. This enables proper dark mode support and makes the component more adaptable to theme customizations.

package.json (2)

38-54: Updated dependencies align with v4 migration.

The Radix UI component updates and new Tailwind-related devDependencies (@tailwindcss/postcss, @tailwindcss/typography) properly support the Tailwind v4 migration. The version bumps appear to be coordinated patch/minor updates that should maintain compatibility.

Also applies to: 149-150


102-102: I need to verify the actual compatibility concerns for these major version upgrades. Let me search for relevant documentation.

Let me verify one more detail about revalidateTag usage and the next.config.ts file.Now let me run one final script to check for revalidateTag usage and next.config.ts:Based on my comprehensive verification through code inspection and web research, I can now generate the rewritten review comment:

Verify and update revalidateTag() API calls for Next.js 16 compatibility.

Next.js 16 requires asynchronous access to cookies(), headers(), and draftMode() APIs. Your codebase already properly implements these patterns—confirmed usage at src/app/studio/layout.tsx:7 with await cookies(), and similar patterns for headers() throughout the codebase.

However, revalidateTag() now requires a cacheLife profile as the second argument to enable stale-while-revalidate (SWR) behavior. The single-argument form is deprecated and currently works if TypeScript errors are suppressed, but may be removed in a future version. Audit the codebase for any calls to revalidateTag() with only one argument and update them to the two-argument form.

Radix UI released minor versions with full React 19 compatibility. Your pinned Radix UI versions (1.x–2.x range) support React 19.2.0. No breaking changes detected with your component library usage.

All async API patterns (params, searchParams, cookies, headers) are already properly migrated. No deprecated patterns like useFormState detected. The upgrade path is well-aligned with Next.js 16 requirements.

src/components/ui/sidebar.tsx (11)

1-40: LGTM! Clean imports and well-defined constants.

The imports are properly organized and the constants for sidebar dimensions are well-structured. The minimum width (14rem) being less than the default width (16rem) allows for proper resize constraints.


41-67: LGTM! Well-structured context pattern.

The SidebarContextProps type clearly defines all state and handlers, and the useSidebar hook properly enforces usage within a provider with a helpful error message.


235-258: LGTM! Good mobile accessibility implementation.

The mobile sidebar properly uses Sheet with screen-reader-only labels for the header, title, and description. The hidden close button suggests an alternative closing mechanism is provided elsewhere in the UI.


385-461: LGTM! Clean layout component implementations.

These layout components follow consistent patterns with proper prop spreading, className merging, and data-slot attributes for styling hooks. The use of semantic HTML elements (e.g., <main> for SidebarInset) is appropriate.


463-530: LGTM! Good composition pattern with asChild support.

The group components properly implement the asChild pattern using Radix's Slot component, providing flexibility for consumers. The use of outline-hidden is correct for Tailwind v4 (which reserves outline-none for a different purpose).


532-574: LGTM! Well-structured menu components with proper CVA variants.

The menu components use appropriate semantic HTML (ul, li) and the CVA variants are well-defined. The important modifier syntax is correct throughout (e.g., size-8!, p-2!).


576-624: LGTM! Excellent tooltip and button composition.

The SidebarMenuButton properly handles the asChild pattern and tooltip logic. The conditional tooltip display (only when collapsed and not mobile) provides good UX. The string-to-object conversion for tooltip props is handled elegantly.


626-678: LGTM! Well-implemented action and badge components.

Both components use consistent patterns with proper hover states and responsive behavior. The showOnHover logic provides good progressive disclosure of actions.


680-716: LGTM! Smart skeleton implementation with randomized widths.

The use of useMemo with an empty dependency array ensures each skeleton instance gets a stable random width, creating a more realistic loading state. The CSS custom property pattern is clean.


718-777: LGTM! Consistent submenu implementation.

The submenu components maintain the same patterns as their parent menu counterparts, with proper semantic HTML and size variants. The use of <a> as the default element for SidebarMenuSubButton is semantically appropriate for navigation.


779-804: LGTM! Complete and well-organized exports.

All components and the useSidebar hook are properly exported as named exports, providing a clean public API for the sidebar system.

mezotv and others added 3 commits November 13, 2025 14:54
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Copy Markdown
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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/app/globals.css (1)

283-290: Consolidate duplicate @layer base blocks.

Lines 283–290 and 353–360 define identical @layer base rules. Merge them into a single block to avoid redundancy.

 @layer base {
   * {
     @apply border-border outline-ring/50;
   }
   body {
     @apply bg-background text-foreground;
   }
 }
-
-@keyframes typing {

Then remove the duplicate at lines 353–360.

Also applies to: 353-360

♻️ Duplicate comments (1)
src/components/ui/sidebar.tsx (1)

282-282: Fix inconsistent Tailwind v4 important modifier syntax.

Line 282 uses the old Tailwind v3 syntax (*:!duration-0 with ! before the utility), while line 297 correctly uses Tailwind v4 syntax (*:duration-0! with ! after the utility). This inconsistency needs to be resolved.

Apply this diff to fix line 282:

-           "group-data-[dragging=true]:duration-0! group-data-[dragging=true]_*:!duration-0",
+           "group-data-[dragging=true]:duration-0! group-data-[dragging=true]_*:duration-0!",
🧹 Nitpick comments (1)
src/app/globals.css (1)

210-245: Consolidate duplicate :root blocks and remove unused ceramic color variables.

The :root block is defined twice: once at lines 210–245 (comprehensive theme) and again at lines 471–474 (only ceramic colors). Merge the ceramic colors into the main :root block or remove them if they're not used elsewhere.

 :root {
   --background: hsl(0 0% 100%);
   --foreground: hsl(0 0% 3.9%);
+  --ceramic-black: #000000;
+  --ceramic-white: #ffffff;
   /* ... rest of vars ... */
 }

-:root {
-  --ceramic-black: #000000;
-  --ceramic-white: #ffffff;
-}

Also applies to: 471-474

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3ee4bbd and f7c8b64.

📒 Files selected for processing (2)
  • src/app/globals.css (2 hunks)
  • src/components/ui/sidebar.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,jsx,ts,tsx,py,go,java,rb}

📄 CodeRabbit inference engine (.cursor/rules/posthog-integration.mdc)

Never hallucinate an API key. Instead, always use the API key populated in the .env file.

Files:

  • src/components/ui/sidebar.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/posthog-integration.mdc)

**/*.{ts,tsx,js,jsx}: If using TypeScript, use an enum to store flag names. If using JavaScript, store flag names as strings to an object declared as a constant, to simulate an enum. Use a consistent naming convention for this storage.
enum/const object members should be written UPPERCASE_WITH_UNDERSCORE.
Gate flag-dependent code on a check that verifies the flag's values are valid and expected.
If a custom property for a person or event is at any point referenced in two or more files or two or more callsites in the same file, use an enum or const object, as above in feature flags.

Files:

  • src/components/ui/sidebar.tsx
🧠 Learnings (1)
📓 Common learnings
Learnt from: mezotv
Repo: joschan21/contentport PR: 62
File: src/proxy.ts:8-8
Timestamp: 2025-11-13T14:26:23.030Z
Learning: In Next.js 16, middleware has been renamed to proxy. The file convention changes from middleware.ts to proxy.ts, and the exported function changes from middleware to proxy. The config export with matcher array remains the same. The runtime changes to Node.js by default (Edge runtime is not supported for proxy).
🧬 Code graph analysis (1)
src/components/ui/sidebar.tsx (3)
src/components/ui/tooltip.tsx (4)
  • TooltipProvider (61-61)
  • TooltipContent (61-61)
  • Tooltip (61-61)
  • TooltipTrigger (61-61)
src/lib/utils.ts (1)
  • cn (6-8)
src/components/ui/duolingo-button.tsx (1)
  • DuolingoButton (48-79)
🔇 Additional comments (8)
src/app/globals.css (2)

105-113: Verify the undefined CSS variable fallback for border color.

Line 111 uses var(--color-gray-200, currentcolor) as a fallback, but --color-gray-200 is not defined in your @theme block or :root section. If gray-200 is not intentionally defined, simplify this to use currentcolor directly or define the missing variable.

- border-color: var(--color-gray-200, currentcolor);
+ border-color: currentcolor;

Or, add --color-gray-200 to your :root if it should be part of the theme.


156-169: Duplicate pointer-events: none property resolved.

The past review flagged a duplicate pointer-events: none in the .glass rule. Confirming that in the current version, line 159 contains the single instance and there is no longer a duplicate at the end of the rule. ✓

src/components/ui/sidebar.tsx (6)

1-67: LGTM! Constants, types, and context setup are well-structured.

The updated type definitions for SidebarContextProps correctly include the new drag-resize properties (width, setWidth, isDraggingRail, setIsDraggingRail), and the cookie name follows path-safe conventions.


69-196: LGTM! SidebarProvider refactor is well-implemented.

The conversion to a plain function component is clean, and the state management logic is correct. The comments at lines 117-118 and 163-164 correctly explain why setOpenMobile is excluded from dependency arrays (useState setters are stable and don't need to be dependencies). Cookie persistence and keyboard shortcut handling are properly implemented.


314-338: LGTM! SidebarTrigger implementation is clean.

The component correctly uses the DuolingoButton and properly chains the onClick handler with toggleSidebar. Good accessibility with the sr-only label.


340-383: LGTM! SidebarRail drag-resize integration is well-implemented.

The component correctly integrates the useSidebarResize hook and properly merges refs. The enableDrag prop provides good flexibility for disabling drag functionality when needed.


385-777: LGTM! All sidebar subcomponents are consistently refactored.

The conversion of all components from forwardRef to plain function components is executed consistently and correctly. Key highlights:

  • data-slot attributes are properly added to all components for styling hooks
  • The asChild pattern is correctly implemented using Slot where needed
  • Tailwind v4 syntax is used correctly throughout (with ! after utilities)
  • Props are properly spread and typed

The refactor maintains API compatibility while simplifying the component structure.


779-804: LGTM! All components are properly exported.

The export list is complete and includes all sidebar components, the provider, and the useSidebar hook.

Copy link
Copy Markdown
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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f7c8b64 and 34d00fb.

⛔ Files ignored due to path filters (2)
  • bun.lock is excluded by !**/*.lock
  • bun.lockb is excluded by !**/bun.lockb
📒 Files selected for processing (2)
  • package.json (5 hunks)
  • tsconfig.json (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • tsconfig.json
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: mezotv
Repo: joschan21/contentport PR: 62
File: src/proxy.ts:8-8
Timestamp: 2025-11-13T14:26:23.051Z
Learning: In Next.js 16, middleware has been renamed to proxy. The file convention changes from middleware.ts to proxy.ts, and the exported function changes from middleware to proxy. The config export with matcher array remains the same. The runtime changes to Node.js by default (Edge runtime is not supported for proxy).
🔇 Additional comments (5)
package.json (5)

111-111: Exact pinning of React and @types packages is intentional but restrictive.

Pinning React, React-DOM, and their type definitions to exact versions (19.2.0, 19.2.4, 19.2.3) is appropriate for reproducibility during a major upgrade. However, ensure this is a deliberate choice and that your CI/CD pipeline and documentation reflect the strict version requirement. Patch updates to React 19.2.x or @types may not be applied automatically, which could delay security or bug fixes.

Also applies to: 113-113, 153-154


97-97: Dependency set for UI and styling ecosystem looks cohesive.

Updates to lucide-react (0.553.0), recharts (3.4.1 added), tailwind-merge (3.4.0), and tw-animate-css (1.4.0) align with the overall Next.js 16 + React 19 + Tailwind 4 upgrade scope. These are well-maintained libraries with good React 19 support records. No immediate concerns here.

Also applies to: 124-124, 134-134, 136-136


149-150: Tailwind v4 setup with PostCSS 8.x is compatible and correct.

Web search confirms that @tailwindcss/postcss@4.1.12 requires PostCSS 8.x (tested with PostCSS 8.4), and your postcss@^8 dependency satisfies this requirement. No compatibility issues or PostCSS 9.x migration concerns.


102-104: Resolve concern: Next.js 16.0.5 officially supports React 19.2.0.

Official documentation confirms that Next.js 16 (including 16.0.5) is built for and explicitly targets React 19.2.0. Exact version pinning to 19.2.0 is appropriate and aligns with Next.js 16's official peer-dependency requirements. No compatibility risk exists.


38-54: All Radix UI packages in the update explicitly support React 19.

The versions specified (e.g., @radix-ui/react-dialog@1.1.15, @radix-ui/react-dropdown-menu@2.1.16, @radix-ui/react-label@2.1.8, @radix-ui/react-select@2.2.6) all declare React 19 as a supported peer dependency with the range ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc. No compatibility issues with React 19 are present.

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