Skip to content

Upgrade packages and delete dead code#13

Merged
kovrichard merged 17 commits into
mainfrom
upgrade-packages-delete-dead-code
Apr 29, 2026
Merged

Upgrade packages and delete dead code#13
kovrichard merged 17 commits into
mainfrom
upgrade-packages-delete-dead-code

Conversation

@matekissdev

@matekissdev matekissdev commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores

    • Upgraded dependencies, pinned runtime/tool versions, refreshed configs and schema refs.
    • Added an unused-code check to CI and pre-commit hooks; new tooling configured.
    • Updated TypeScript/build settings and developer tooling.
  • UI

    • Sign-out button component removed (affects logout availability where previously rendered).
    • Notification trigger markup adjusted for consistent styling.

@matekissdev
matekissdev requested a review from kovrichard April 28, 2026 18:17
@matekissdev matekissdev self-assigned this Apr 28, 2026
@vercel

vercel Bot commented Apr 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
catalyst Ignored Ignored Apr 29, 2026 3:08pm

@coderabbitai

coderabbitai Bot commented Apr 28, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@kovrichard has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes and 58 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c86cde50-3d0d-4a86-bcc7-f804ddfd918e

📥 Commits

Reviewing files that changed from the base of the PR and between 19a8f5d and 7c38e9f.

📒 Files selected for processing (1)
  • .github/workflows/build.yml
📝 Walkthrough

Walkthrough

Adds Knip unused-code checks to CI and pre-commit; introduces knip.json; pins Node/Bun and updates many dependencies and scripts; upgrades TypeScript target and adds Bun types; updates Biome schema; small UI changes (notification trigger styling, Biome lint suppression); removes SignOut component and drops signUp/useSession exports.

Changes

Cohort / File(s) Summary
CI & Hooks
.github/workflows/build.yml, .husky/pre-commit
Adds bun run knip to the build workflow and to the pre-commit hook pipeline.
Knip configuration
knip.json
New Knip config: schema, ignore tag (-lintignore), file/path globs to ignore, and ignored dependencies.
Package & scripts
package.json
Pins node and bun versions, adds packageManager, re-adds db:deploy, adds knip script, and updates/removes many dependencies and devDependencies.
TypeScript & Biome
tsconfig.json, biome.json
TS target changed to es2022; adds Bun types; Biome schema URL updated to 2.4.13.
Next config
next.config.mjs
Sets output to process.env.EXPORT_MODE, enables reactCompiler: true, and configures Turbopack root: import.meta.dirname.
Auth exports
src/lib/auth-client.ts
Removes signUp and useSession from exported destructure; remaining auth actions retained.
Component removal
src/components/auth/signout-button.tsx
Deleted SignOut component and its export.
UI tweaks
src/components/notifications/notification-menu.tsx
Replaces Button wrapper with direct buttonVariants classes + cn; preserves icon and badge logic.
Lint suppression
src/components/ui/sidebar.tsx
Adds Biome lint suppression comment around document.cookie assignment.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I hop through CI with whiskers bright,
I sniff out knip’s unused-code light.
Biome hums while TypeScript learns to leap,
Pins set firm so runtimes sleep.
A little nibble, a tidy sweep—hip, hop, hooray, we keep!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main changes in the pull request: multiple dependency upgrades across the codebase and deletion of dead code (SignOut component, unused exports from auth-client).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch upgrade-packages-delete-dead-code

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
Review rate limit: 0/1 reviews remaining, refill in 53 minutes and 58 seconds.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
knip.json (2)

6-18: Blanket-ignoring src/components/ui/* guts the new Knip gate.

This excludes the shared UI layer from unused-export and dependency analysis, so dead code in files like src/components/ui/sidebar.tsx will never be reported. Prefer narrower per-file ignores or tagged suppressions for known false positives.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@knip.json` around lines 6 - 18, Remove the blanket ignore for
"src/components/ui/*" in the knip.json ignore array so the Knip gate can analyze
the shared UI layer (e.g., files like src/components/ui/sidebar.tsx); instead,
add narrower ignores for specific files that are known false positives or add
in-file tagged suppressions/comments for those exact files, keeping the rest of
src/components/ui/ under Knip analysis to catch dead exports and dependency
issues.

19-29: Remove @trpc/react-query from ignoreDependencies since it has no imports in the codebase.

The codebase uses @trpc/tanstack-react-query, @trpc/client, and @trpc/server. A search confirms @trpc/react-query is only listed in package.json as a declared dependency and in knip.json as a suppression—but nowhere is it actually imported. Keeping it in ignoreDependencies masks this dead dependency instead of letting Knip detect it.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@knip.json` around lines 19 - 29, Remove the "@trpc/react-query" entry from
the "ignoreDependencies" array in knip.json so Knip can detect it as an
unused/dead dependency; locate the "ignoreDependencies" array (the list
containing "@next/third-parties", "@tanstack/query-async-storage-persister",
etc.) and delete the "@trpc/react-query" item, then re-run Knip to confirm it
flags the unused dependency for removal from package.json.
tsconfig.json (1)

29-30: Scope Bun types to Bun-only entrypoints.

Adding "types": ["bun"] to the root tsconfig.json makes Bun globals available in every .ts/.tsx file, which is unnecessarily broad. Although Bun-specific APIs are not currently used in app code, this scope expands the type environment for all files. Use a dedicated tsconfig for Bun scripts or per-file Bun type references instead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tsconfig.json` around lines 29 - 30, Remove the broad "types": ["bun"]
setting from the root tsconfig.json so Bun globals are not injected into every
TS/TSX file; instead add a dedicated tsconfig (e.g., tsconfig.bun.json) that
extends the root and contains "types": ["bun"] for Bun-only scripts, or add
per-file triple-slash references (/// <reference types="bun" />) at the top of
Bun entrypoints; update any Bun-specific build/test scripts to use the new
tsconfig.bun.json or the per-file references and ensure the root tsconfig.json
no longer contains the "types": ["bun"] entry.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@knip.json`:
- Around line 6-18: Remove the blanket ignore for "src/components/ui/*" in the
knip.json ignore array so the Knip gate can analyze the shared UI layer (e.g.,
files like src/components/ui/sidebar.tsx); instead, add narrower ignores for
specific files that are known false positives or add in-file tagged
suppressions/comments for those exact files, keeping the rest of
src/components/ui/ under Knip analysis to catch dead exports and dependency
issues.
- Around line 19-29: Remove the "@trpc/react-query" entry from the
"ignoreDependencies" array in knip.json so Knip can detect it as an unused/dead
dependency; locate the "ignoreDependencies" array (the list containing
"@next/third-parties", "@tanstack/query-async-storage-persister", etc.) and
delete the "@trpc/react-query" item, then re-run Knip to confirm it flags the
unused dependency for removal from package.json.

In `@tsconfig.json`:
- Around line 29-30: Remove the broad "types": ["bun"] setting from the root
tsconfig.json so Bun globals are not injected into every TS/TSX file; instead
add a dedicated tsconfig (e.g., tsconfig.bun.json) that extends the root and
contains "types": ["bun"] for Bun-only scripts, or add per-file triple-slash
references (/// <reference types="bun" />) at the top of Bun entrypoints; update
any Bun-specific build/test scripts to use the new tsconfig.bun.json or the
per-file references and ensure the root tsconfig.json no longer contains the
"types": ["bun"] entry.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 36aea508-4516-4532-8752-38bade2e290b

📥 Commits

Reviewing files that changed from the base of the PR and between 91fe0a2 and 00d45c2.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • .github/workflows/build.yml
  • .husky/pre-commit
  • biome.json
  • knip.json
  • package.json
  • src/components/ui/sidebar.tsx
  • tsconfig.json

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 (1)
next.config.mjs (1)

6-6: Add validation for EXPORT_MODE to fail fast on invalid values.

Passing raw env input to the output field risks silent config errors. While Next.js validates the config and logs warnings, explicit validation upfront prevents unexpected behavior across environments.

Proposed validation
 import NextBundleAnalyzer from '@next/bundle-analyzer';
 
 /** `@type` {import('next').NextConfig} */
+const exportMode = process.env.EXPORT_MODE;
+if (exportMode && exportMode !== 'standalone' && exportMode !== 'export') {
+    throw new Error("Invalid EXPORT_MODE. Use 'standalone' or 'export'.");
+}
+
 const nextConfig = {
     // Use `bun run build:standalone` if you are using Docker
-    output: process.env.EXPORT_MODE,
+    output: exportMode,
     turbopack: {
         root: import.meta.dirname,
     },
     reactCompiler: true,
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@next.config.mjs` at line 6, The current next.config.mjs assigns
process.env.EXPORT_MODE directly to the Next.js config output field which can
mask bad env values; update next.config.mjs to validate EXPORT_MODE before
exporting the config: read and normalize process.env.EXPORT_MODE (trim and
toLowerCase), check it against an explicit allowed set (e.g., "standalone",
"export", "server" or whatever your app supports), and if it's missing or not in
the allowed set throw a clear Error that fails fast with guidance on acceptable
values; if you want a default, explicitly set a documented default (e.g.,
"standalone") instead of passing the raw env through.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/notifications/notification-menu.tsx`:
- Around line 18-25: The PopoverTrigger (containing the Bell icon) lacks an
accessible name when notifications.length === 0; add an aria-label (or
aria-labelledby) prop on PopoverTrigger to provide a clear name (e.g.,
"Notifications" and optionally include the unread count when
notifications.length > 0). Update the PopoverTrigger element in
notification-menu.tsx (the element wrapping Bell) to always supply this
accessible name so screen readers can announce the control even when the visual
label is absent.

---

Nitpick comments:
In `@next.config.mjs`:
- Line 6: The current next.config.mjs assigns process.env.EXPORT_MODE directly
to the Next.js config output field which can mask bad env values; update
next.config.mjs to validate EXPORT_MODE before exporting the config: read and
normalize process.env.EXPORT_MODE (trim and toLowerCase), check it against an
explicit allowed set (e.g., "standalone", "export", "server" or whatever your
app supports), and if it's missing or not in the allowed set throw a clear Error
that fails fast with guidance on acceptable values; if you want a default,
explicitly set a documented default (e.g., "standalone") instead of passing the
raw env through.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 26c8aac3-c7db-4dc5-aa1c-7f7a7244f082

📥 Commits

Reviewing files that changed from the base of the PR and between 00d45c2 and 19a8f5d.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • knip.json
  • next.config.mjs
  • package.json
  • src/components/auth/signout-button.tsx
  • src/components/notifications/notification-menu.tsx
  • src/lib/auth-client.ts
💤 Files with no reviewable changes (1)
  • src/components/auth/signout-button.tsx
✅ Files skipped from review due to trivial changes (1)
  • knip.json

Comment on lines +18 to +25
<PopoverTrigger
className={cn(
buttonVariants({ variant: "ghost", size: "icon" }),
"relative rounded-full"
)}
>
<Bell size={22} />
{notifications.length > 0 && (

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add an accessible name to the trigger button (Line 18).

When unread count is 0, this becomes effectively icon-only and may have no clear accessible name for screen readers.

♿ Suggested fix
       <PopoverTrigger
+        aria-label={
+          notifications.length > 0
+            ? `Open notifications (${notifications.length} unread)`
+            : "Open notifications"
+        }
         className={cn(
           buttonVariants({ variant: "ghost", size: "icon" }),
           "relative rounded-full"
         )}
       >
📝 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
<PopoverTrigger
className={cn(
buttonVariants({ variant: "ghost", size: "icon" }),
"relative rounded-full"
)}
>
<Bell size={22} />
{notifications.length > 0 && (
<PopoverTrigger
aria-label={
notifications.length > 0
? `Open notifications (${notifications.length} unread)`
: "Open notifications"
}
className={cn(
buttonVariants({ variant: "ghost", size: "icon" }),
"relative rounded-full"
)}
>
<Bell size={22} />
{notifications.length > 0 && (
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/notifications/notification-menu.tsx` around lines 18 - 25, The
PopoverTrigger (containing the Bell icon) lacks an accessible name when
notifications.length === 0; add an aria-label (or aria-labelledby) prop on
PopoverTrigger to provide a clear name (e.g., "Notifications" and optionally
include the unread count when notifications.length > 0). Update the
PopoverTrigger element in notification-menu.tsx (the element wrapping Bell) to
always supply this accessible name so screen readers can announce the control
even when the visual label is absent.

@sonarqubecloud

Copy link
Copy Markdown

@kovrichard
kovrichard merged commit af2d63b into main Apr 29, 2026
5 checks passed
@kovrichard
kovrichard deleted the upgrade-packages-delete-dead-code branch April 29, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants