Skip to content

Update to v0.1.10#13

Merged
hpware merged 4 commits intomasterfrom
canery
Dec 9, 2025
Merged

Update to v0.1.10#13
hpware merged 4 commits intomasterfrom
canery

Conversation

@hpware
Copy link
Copy Markdown
Owner

@hpware hpware commented Dec 9, 2025

Summary by CodeRabbit

  • Style

    • Navigation moved to a fixed bottom bar with icon-based controls; layout spacing adjusted and footer removed
    • Profile image now enforces explicit 100×100px sizing
    • Theme control simplified to a single icon toggle cycling light/dark/system
  • Chores

    • Authentication config adjusted for development/trusted-proxy scenarios
    • CI/tooling: added automated version-increment script and workflows with guards; project version bumped

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

@dokploy-hpwartwweb2
Copy link
Copy Markdown

dokploy-hpwartwweb2 Bot commented Dec 9, 2025

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
app ✅ Done Preview URL 2025-12-09T07:41:56.911Z

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 9, 2025

Walkthrough

Removed the root layout and footer, refactored conditional layout and navigation into a bottom icon bar, replaced dropdown theme toggle with an inline cycling button, tightened profile image sizing, added auth config flags, and introduced CI scripts/workflows to auto-increment and build versions.

Changes

Cohort / File(s) Summary
Layout removal
apps/web/src/components/layout.tsx
Entire file deleted: root layout component, generateMetadata export, font/setup imports, and layout markup removed.
Conditional layout & Footer removal
apps/web/src/components/conditional-layout.tsx, apps/web/src/components/footer.tsx
conditional-layout.tsx: removed Footer import/usage, unwrapped Navigation, adjusted main spacing (mt-12 pt-5mt-2 mb-12 pb-5) and moved {children} into <main>; footer.tsx: file deleted and default export removed.
Navigation redesign & user menu
apps/web/src/components/navigation.tsx
Replaced top header with a fixed bottom-centered icon bar; removed scroll-dependent logic; navigation actions converted to icon buttons; user menu simplified to inline icon buttons with loading/unauthenticated/authenticated states; ModeToggle included in bottom bar.
Mode toggle refactor
apps/web/src/components/mode-toggle.tsx, apps/web/src/app/dashboard/sidebar.tsx
mode-toggle.tsx: replaced dropdown UI with a single Button that cycles themes (white → dark → system); removed inline dropdown rendering. sidebar.tsx: removed inline ModeToggle implementation and now imports/uses external ModeToggle.
Profile image sizing
apps/web/src/app/user/[userid]/page.tsx
Image component className extended with explicit w-[100px] h-[100px] Tailwind utilities while preserving existing styles.
Theme provider formatting
apps/web/src/components/theme-provider.tsx
Whitespace/indentation adjustments only; no behavioral change.
Auth configuration
packages/auth/src/index.ts
Added advanced config flags: disableCSRFCheck: true for dev and trustedProxyHeaders: true.
CI versioning scripts & workflows
.github/scripts/increment-version.js, .github/scripts/README.md, .github/workflows/version-and-build.yml, .github/workflows/auto-update-version.yml.disabled, .github/workflows/build_docker_image.yml.disabled
Added version increment script and README; new workflow version-and-build.yml to auto-increment version and build/push Docker image with guards to avoid loops; added disabled workflows and conditional guard in build workflow.
Project version bump
apps/web/projectData.ts
data.version updated from "0.1.9" to "0.1.10-canery-1".

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Verify Next.js behavior after removing layout.tsx and generateMetadata.
  • Confirm routing/layout interactions in conditional-layout.tsx (dashboard vs non-dashboard).
  • Test bottom navigation for accessibility, focus order, and responsiveness.
  • Validate theme consistency between components after ModeToggle change.
  • Ensure auth flags (disableCSRFCheck, trustedProxyHeaders) are environment-gated and safe.
  • Check CI script idempotency and workflow guard to prevent infinite auto-commit loops.

Poem

🐇 I nudged the layout, watched the footer hop away,

Icons tumble down where thumbs now play,
Themes spin with a click — sun, moon, then machine,
A tiny script nudges version to the scene,
I wiggle my whiskers — code refreshed today! 🥕✨

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 pull request title accurately reflects the main objective of the changeset, which is to update the project version from 0.1.9 to 0.1.10-canery-1, as evidenced by the version bump in projectData.ts and the comprehensive automation infrastructure added.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch canery

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.

@hpware hpware changed the title Canery Update to v0.1.10 Dec 9, 2025
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

🧹 Nitpick comments (3)
packages/auth/src/index.ts (1)

24-24: Simplify the boolean expression.

The ternary operator is redundant since the comparison already returns a boolean.

Apply this diff:

-    disableCSRFCheck: process.env.NODE_ENV === "development" ? true : false,
+    disableCSRFCheck: process.env.NODE_ENV === "development",
apps/web/src/app/user/[userid]/page.tsx (1)

46-50: Remove redundant Tailwind size utilities.

The Image component already has width="100" and height="100" props that control sizing. The additional Tailwind classes w-[100px] and h-[100px] are redundant and could potentially conflict with Next.js Image optimization.

Apply this diff:

-            className="rounded-full border border-black dark:border-white select-none w-[100px] h-[100px]"
+            className="rounded-full border border-black dark:border-white select-none"
apps/web/src/components/mode-toggle.tsx (1)

5-5: Remove unused import.

ThemeProvider is imported but never used in this file.

Apply this diff:

-import { LaptopMinimalIcon, Moon, Sun } from "lucide-react";
-import { ThemeProvider, useTheme } from "next-themes";
+import { LaptopMinimalIcon, Moon, Sun } from "lucide-react";
+import { useTheme } from "next-themes";
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f45df48 and 06721e2.

📒 Files selected for processing (9)
  • apps/web/src/app/dashboard/sidebar.tsx (2 hunks)
  • apps/web/src/app/user/[userid]/page.tsx (1 hunks)
  • apps/web/src/components/conditional-layout.tsx (1 hunks)
  • apps/web/src/components/footer.tsx (0 hunks)
  • apps/web/src/components/layout.tsx (0 hunks)
  • apps/web/src/components/mode-toggle.tsx (1 hunks)
  • apps/web/src/components/navigation.tsx (2 hunks)
  • apps/web/src/components/theme-provider.tsx (1 hunks)
  • packages/auth/src/index.ts (1 hunks)
💤 Files with no reviewable changes (2)
  • apps/web/src/components/footer.tsx
  • apps/web/src/components/layout.tsx
🧰 Additional context used
🧬 Code graph analysis (4)
apps/web/src/components/conditional-layout.tsx (1)
apps/web/src/components/navigation.tsx (1)
  • Navigation (30-52)
apps/web/src/components/navigation.tsx (5)
apps/web/src/components/ui/button.tsx (1)
  • Button (60-60)
apps/web/src/components/mode-toggle.tsx (1)
  • ModeToggle (14-38)
apps/web/src/components/user-menu.tsx (1)
  • UserMenu (15-59)
apps/web/src/components/ui/spinner.tsx (1)
  • Spinner (5-14)
apps/web/src/lib/auth-client.ts (1)
  • authClient (4-6)
apps/web/src/components/mode-toggle.tsx (2)
apps/web/src/components/ui/button.tsx (1)
  • Button (60-60)
apps/web/src/components/ui/dropdown-menu.tsx (4)
  • DropdownMenu (242-242)
  • DropdownMenuTrigger (244-244)
  • DropdownMenuContent (245-245)
  • DropdownMenuItem (248-248)
apps/web/src/app/dashboard/sidebar.tsx (1)
apps/web/src/components/mode-toggle.tsx (1)
  • ModeToggleDropdown (40-65)
🔇 Additional comments (6)
packages/auth/src/index.ts (1)

24-25: Verify proxy and CSRF configuration aligns with deployment environment.

Disabling CSRF checks in development is acceptable, but ensure trustedProxyHeaders: true is appropriate for your production proxy setup (e.g., when behind nginx, Cloudflare, or AWS ALB). Incorrect proxy header trust can lead to security issues like IP spoofing.

apps/web/src/components/theme-provider.tsx (1)

6-11: LGTM!

The formatting adjustments maintain the same functionality while improving code readability.

apps/web/src/app/dashboard/sidebar.tsx (1)

17-17: LGTM!

The import and usage of ModeToggleDropdown correctly replaces the previous inline theme toggle implementation, centralizing the theme control UI.

Also applies to: 143-143

apps/web/src/components/conditional-layout.tsx (1)

19-26: LGTM!

The spacing adjustments correctly accommodate the new bottom navigation: reduced top margin (mt-2), added bottom margin (mb-12) for the fixed bottom bar, and removed the header wrapper. The Footer removal aligns with the broader layout simplification.

apps/web/src/components/navigation.tsx (2)

30-52: LGTM!

The bottom navigation layout is well-structured with appropriate fixed positioning, backdrop blur effects, and icon-based controls. The addition of a copyright notice is a nice touch.


54-112: LGTM!

The UserMenu implementation correctly handles all three states (loading, unauthenticated, authenticated) with appropriate icon buttons and navigation actions. The sign-out flow properly integrates with authClient.

Comment on lines 14 to +38
export function ModeToggle() {
const { setTheme } = useTheme();
const { setTheme, theme } = useTheme();

return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="outline" size="icon">
<Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
<Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
<span className="sr-only">Toggle theme</span>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem onClick={() => setTheme("light")}>
Light
</DropdownMenuItem>
<DropdownMenuItem onClick={() => setTheme("dark")}>
Dark
</DropdownMenuItem>
<DropdownMenuItem onClick={() => setTheme("system")}>
System
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
);
return (
<Button
variant="outline"
size="icon"
onClick={() =>
theme === "white"
? setTheme("dark")
: theme === "dark"
? setTheme("system")
: setTheme("white")
}
>
{theme === "white" ? (
<Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all" />
) : theme === "dark" ? (
<Moon className="absolute h-[1.2rem] w-[1.2rem] transition-all rotate-0 scale-100" />
) : (
<LaptopMinimalIcon className="absolute h-[1.2rem] w-[1.2rem] transition-all rotate-0 scale-100" />
)}
</Button>
);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Critical: Theme value inconsistency between components.

ModeToggle cycles between "white", "dark", and "system" (lines 22-26), while ModeToggleDropdown uses "light", "dark", and "system" (lines 53-59). This mismatch will cause unexpected behavior:

  • If a user selects "Light" from the dropdown, the theme is set to "light"
  • Clicking the ModeToggle button will match the else clause (line 26) and set the theme to "white"
  • This creates two different light theme states that don't align

Standardize on a single theme value. Apply this diff to use "light" consistently:

     <Button
       variant="outline"
       size="icon"
       onClick={() =>
-        theme === "white"
+        theme === "light"
           ? setTheme("dark")
           : theme === "dark"
             ? setTheme("system")
-            : setTheme("white")
+            : setTheme("light")
       }
     >
-      {theme === "white" ? (
+      {theme === "light" ? (
         <Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all" />
       ) : theme === "dark" ? (

Also applies to: 40-65

🤖 Prompt for AI Agents
In apps/web/src/components/mode-toggle.tsx around lines 14 to 38 (also applies
to lines 40–65), the ModeToggle component uses the theme value "white" while
other components use "light", causing inconsistent behavior; update ModeToggle
to use "light" everywhere it currently references "white" (both in the onClick
toggle branches and the JSX conditional rendering) so the cycle becomes "light"
↔ "dark" ↔ "system" and all components use the same theme string.

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

Caution

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

⚠️ Outside diff range comments (2)
apps/web/src/components/navigation.tsx (2)

4-11: Remove unused imports.

The following imports are no longer used after refactoring from dropdown to inline icon buttons:

  • DropdownMenu components (lines 4-11)
  • Skeleton component (line 14)
  • Moon and Sun icons (lines 24, 26) — these are likely used inside the ModeToggle component, not here

Apply this diff to remove unused imports:

-import {
-  DropdownMenu,
-  DropdownMenuContent,
-  DropdownMenuItem,
-  DropdownMenuLabel,
-  DropdownMenuSeparator,
-  DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
 import { authClient } from "@/lib/auth-client";
 import { Button } from "./ui/button";
-import { Skeleton } from "./ui/skeleton";
 import { Spinner } from "./ui/spinner";
 import { useRouter } from "next/navigation";
 import * as React from "react";
 import { ModeToggle } from "./mode-toggle";
 import {
   HouseIcon,
   LayoutDashboardIcon,
   LogInIcon,
   LogOutIcon,
-  Moon,
   SearchIcon,
-  Sun,
   UserIcon,
 } from "lucide-react";
-import { useTheme } from "next-themes";

Also applies to: 14-14, 24-24, 26-26


3-3: Remove unused React imports.

Line 3 imports useEffect and useState which are no longer used after removing scroll-based state logic.

Apply this diff:

-import { useEffect, useState } from "react";
+import * as React from "react";

Note: Line 17 already imports React, so you can consolidate or remove line 3 entirely.

🧹 Nitpick comments (5)
apps/web/src/components/navigation.tsx (1)

48-48: Remove trailing space in copyright text.

Minor formatting: there's an unnecessary trailing space after the year.

Apply this diff:

-      <span className="text-sm mt-1">&copy; {new Date().getFullYear()} </span>
+      <span className="text-sm mt-1">&copy; {new Date().getFullYear()}</span>
.github/workflows/version-and-build.yml (2)

63-63: Add [skip ci] marker for broader CI compatibility.

While the emoji marker 🤖 Auto-increment version works with your workflow guard, adding [skip ci] is a widely recognized convention that prevents other CI systems and tools from triggering on these automated commits.

Apply this diff:

-          git commit -m "🤖 Auto-increment version to ${{ steps.version_update.outputs.new }}"
+          git commit -m "🤖 Auto-increment version to ${{ steps.version_update.outputs.new }} [skip ci]"

80-80: Verify version output is set before using in Docker tags.

If the increment script fails to set the new output, this would attempt to create a Docker tag with an empty value, potentially causing the build to fail or create an incorrectly tagged image.

Consider adding a verification step after version update:

- name: Verify version outputs
  run: |
    if [ -z "${{ steps.version_update.outputs.new }}" ]; then
      echo "Error: Version output not set"
      exit 1
    fi
.github/scripts/increment-version.js (2)

61-74: Preserve original quote style in version string.

The regex matches both single and double quotes but the replacement always uses double quotes, changing the code style when the original used single quotes.

Apply this diff to preserve the quote character:

     // Extract current version using regex
-    const versionPattern = /version:\s*["']([^"']+)["']/;
+    const versionPattern = /version:\s*(["'])([^"']+)\1/;
     const match = content.match(versionPattern);
 
     if (!match) {
       throw new Error("Could not find version property in projectData.ts");
     }
 
-    const currentVersion = match[1];
+    const quoteChar = match[1];
+    const currentVersion = match[2];
     const newVersion = incrementVersion(currentVersion);
 
     // Replace the version in the content
     const newContent = content.replace(
       versionPattern,
-      `version: "${newVersion}"`,
+      `version: ${quoteChar}${newVersion}${quoteChar}`,
     );

78-78: Consider atomic file writes for robustness.

Using writeFileSync directly could leave the file corrupted if the write operation is interrupted. Consider writing to a temporary file first, then renaming for atomic updates.

Example atomic write pattern:

import { writeFileSync, renameSync } from "fs";
import { tmpdir } from "os";
import { join } from "path";

const tempPath = join(tmpdir(), `projectData.ts.tmp.${Date.now()}`);
writeFileSync(tempPath, newContent, "utf8");
renameSync(tempPath, PROJECT_DATA_PATH);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 06721e2 and d146547.

📒 Files selected for processing (7)
  • .github/scripts/README.md (1 hunks)
  • .github/scripts/increment-version.js (1 hunks)
  • .github/workflows/auto-update-version.yml.disabled (1 hunks)
  • .github/workflows/build_docker_image.yml.disabled (1 hunks)
  • .github/workflows/version-and-build.yml (1 hunks)
  • apps/web/projectData.ts (1 hunks)
  • apps/web/src/components/navigation.tsx (2 hunks)
✅ Files skipped from review due to trivial changes (2)
  • .github/scripts/README.md
  • apps/web/projectData.ts
🧰 Additional context used
🧬 Code graph analysis (1)
apps/web/src/components/navigation.tsx (5)
apps/web/src/components/ui/button.tsx (1)
  • Button (60-60)
apps/web/src/components/mode-toggle.tsx (1)
  • ModeToggle (14-38)
apps/web/src/components/user-menu.tsx (1)
  • UserMenu (15-59)
apps/web/src/components/ui/spinner.tsx (1)
  • Spinner (5-14)
apps/web/src/lib/auth-client.ts (1)
  • authClient (4-6)
🔇 Additional comments (4)
apps/web/src/components/navigation.tsx (1)

90-90: No action requiredsession.user.id is properly typed and guaranteed to exist in better-auth's Session type. The property is used consistently throughout the codebase for database queries and navigation without issues.

.github/workflows/build_docker_image.yml.disabled (1)

20-21: LGTM! Guard correctly prevents CI loops.

The conditional properly skips workflow execution when triggered by the auto-increment bot, preventing infinite loops. This is consistent with the pattern used in the other workflow files.

.github/workflows/auto-update-version.yml.disabled (1)

1-64: LGTM! Well-structured auto-versioning workflow.

The workflow correctly:

  • Guards against infinite loops (line 16)
  • Executes the increment script and captures outputs
  • Commits only when changes are detected
  • Includes both emoji marker and [skip ci] for broad CI system compatibility (line 58)
.github/scripts/increment-version.js (1)

12-53: LGTM! Flexible version increment logic.

The multi-pattern approach correctly handles:

  • Dash-suffixed versions (e.g., "0.1.10-canery-1")
  • Semantic versions (e.g., "0.1.10")
  • Fallback for unusual formats

The pattern matching order ensures more specific patterns match first, preventing conflicts.

Comment thread .github/scripts/increment-version.js Outdated
Comment thread apps/web/src/components/navigation.tsx
Comment on lines +35 to 44
<Link href="/">
<Button variant="outline" size="icon" className="cursor-pointer">
<HouseIcon />
</Button>
</Link>
<nav className="md:flex md:gap-4">
{links.map(({ to, label }) => {
return (
<Link key={to} href={to} className="">
{label}
</Link>
);
})}
</nav>
</div>
<div className="flex items-center gap-2 my-0 py-0">
<Link href="/search">
<Button variant="outline">
<SearchIcon className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all" />
<Button variant="outline" size="icon" className="cursor-pointer">
<SearchIcon />
</Button>
</Link>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Use consistent Link/Button pattern with asChild.

Lines 35-44 nest Link around Button, while lines 68-72 correctly use the asChild pattern. The asChild approach is the recommended pattern for shadcn/ui Button components with Next.js Link.

Apply this diff for consistency:

-      <Link href="/">
-        <Button variant="outline" size="icon" className="cursor-pointer">
+      <Button variant="outline" size="icon" asChild aria-label="Home">
+        <Link href="/">
           <HouseIcon />
-        </Button>
-      </Link>
-      <Link href="/search">
-        <Button variant="outline" size="icon" className="cursor-pointer">
+        </Link>
+      </Button>
+      <Button variant="outline" size="icon" asChild aria-label="Search">
+        <Link href="/search">
           <SearchIcon />
-        </Button>
-      </Link>
+        </Link>
+      </Button>
📝 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.

Suggested change
<Link href="/">
<Button variant="outline" size="icon" className="cursor-pointer">
<HouseIcon />
</Button>
</Link>
<nav className="md:flex md:gap-4">
{links.map(({ to, label }) => {
return (
<Link key={to} href={to} className="">
{label}
</Link>
);
})}
</nav>
</div>
<div className="flex items-center gap-2 my-0 py-0">
<Link href="/search">
<Button variant="outline">
<SearchIcon className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all" />
<Button variant="outline" size="icon" className="cursor-pointer">
<SearchIcon />
</Button>
</Link>
<Button variant="outline" size="icon" asChild aria-label="Home">
<Link href="/">
<HouseIcon />
</Link>
</Button>
<Button variant="outline" size="icon" asChild aria-label="Search">
<Link href="/search">
<SearchIcon />
</Link>
</Button>
🤖 Prompt for AI Agents
In apps/web/src/components/navigation.tsx around lines 35 to 44, the Link
components currently wrap Button elements; change to the consistent shadcn/ui
pattern by using Button with the asChild prop and placing Next.js Link as the
Button's child (i.e., <Button asChild ...><Link href="/">...</Link></Button>),
keep the same props (variant, size, className) on Button and preserve the icon
children, and ensure accessibility attributes and imports remain unchanged.

Comment thread apps/web/src/components/navigation.tsx Outdated
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: 0

♻️ Duplicate comments (1)
apps/web/src/components/mode-toggle.tsx (1)

22-30: Theme value "white" should be "light" for consistency with next-themes.

The standard theme values in next-themes are "light", "dark", and "system". Using "white" will likely not work correctly unless custom theme configuration exists.

This issue was already flagged in a previous review. Please apply the suggested fix to use "light" instead of "white".

🧹 Nitpick comments (3)
apps/web/src/components/mode-toggle.tsx (1)

4-12: Remove unused imports.

ThemeProvider and the DropdownMenu components are imported but no longer used after the refactor from dropdown to button-based toggle.

 import * as React from "react";
-import { LaptopMinimalIcon, Moon, Sun } from "lucide-react";
-import { ThemeProvider, useTheme } from "next-themes";
+import { LaptopMinimalIcon, Moon, Sun } from "lucide-react";
+import { useTheme } from "next-themes";
 import { Button } from "@/components/ui/button";
-import {
-  DropdownMenu,
-  DropdownMenuContent,
-  DropdownMenuItem,
-  DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
apps/web/src/components/navigation.tsx (2)

4-11: Remove unused imports.

Several imports are no longer used after the refactoring:

  • DropdownMenu and related components (lines 4-11)
  • Skeleton (line 14)
  • Moon, Sun icons (lines 24, 26)
  • useTheme hook (line 29)
 "use client";
 import Link from "next/link";
-import { useEffect, useState } from "react";
-import {
-  DropdownMenu,
-  DropdownMenuContent,
-  DropdownMenuItem,
-  DropdownMenuLabel,
-  DropdownMenuSeparator,
-  DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
+import { useState } from "react";
 import { authClient } from "@/lib/auth-client";
 import { Button } from "./ui/button";
-import { Skeleton } from "./ui/skeleton";
 import { Spinner } from "./ui/spinner";
 import { useRouter } from "next/navigation";
 import * as React from "react";
 import { ModeToggle } from "./mode-toggle";
 import {
   HouseIcon,
   LayoutDashboardIcon,
   LogInIcon,
   LogOutIcon,
-  Moon,
   SearchIcon,
-  Sun,
   UserIcon,
 } from "lucide-react";
-import { useTheme } from "next-themes";

Also applies to: 14-14, 24-27, 29-29


35-54: Consider using the asChild pattern for consistency.

Lines 83-93 correctly use the asChild pattern for the Login button, but the Home and Search buttons (lines 35-44, 45-54) still wrap Button inside Link. While functional, using asChild consistently is the recommended approach for shadcn/ui.

-      <Link href="/">
-        <Button
-          variant="outline"
-          size="icon"
-          className="cursor-pointer"
-          aria-label="Home"
-        >
+      <Button
+        variant="outline"
+        size="icon"
+        className="cursor-pointer"
+        aria-label="Home"
+        asChild
+      >
+        <Link href="/">
           <HouseIcon />
-        </Button>
-      </Link>
-      <Link href="/search">
-        <Button
-          variant="outline"
-          size="icon"
-          className="cursor-pointer"
-          aria-label="Search"
-        >
+        </Link>
+      </Button>
+      <Button
+        variant="outline"
+        size="icon"
+        className="cursor-pointer"
+        aria-label="Search"
+        asChild
+      >
+        <Link href="/search">
           <SearchIcon />
-        </Button>
-      </Link>
+        </Link>
+      </Button>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d146547 and e7fa605.

📒 Files selected for processing (4)
  • .github/scripts/increment-version.js (1 hunks)
  • apps/web/src/app/dashboard/sidebar.tsx (1 hunks)
  • apps/web/src/components/mode-toggle.tsx (1 hunks)
  • apps/web/src/components/navigation.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/scripts/increment-version.js
🔇 Additional comments (2)
apps/web/src/app/dashboard/sidebar.tsx (1)

15-15: LGTM! Clean extraction of theme toggle to shared component.

The refactoring to use an external ModeToggle component improves code reuse across the dashboard sidebar and navigation bar. The integration is straightforward and correctly placed in the sidebar header.

Also applies to: 131-131

apps/web/src/components/navigation.tsx (1)

35-56: Good: Accessibility labels added to icon buttons.

All icon-only buttons now have appropriate aria-label attributes, addressing the accessibility concerns from the previous review. This ensures screen reader users can understand the purpose of each button.

Also applies to: 68-134

@hpware
Copy link
Copy Markdown
Owner Author

hpware commented Dec 9, 2025

yay

@hpware hpware merged commit c337bf8 into master Dec 9, 2025
4 checks passed
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