Skip to content

(janitor/dependencies) remove unused redis dependency from apps/web - #5844

Open
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/dependencies-remove-unused-redis
Open

(janitor/dependencies) remove unused redis dependency from apps/web#5844
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/dependencies-remove-unused-redis

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Remove one high-confidence unused dependency from apps/web.

Dependencies removed

  • redis (5.11.0) — removed from apps/web/package.json dependencies.

Evidence it was unused

apps/web performs all Redis access through two other packages:

  • @upstash/redis (declared at apps/web/package.json) is the actual client — src/lib/redis.ts does import { Redis } from '@upstash/redis'.
  • @chat-adapter/state-redis (declared at apps/web/package.json) is the chat-state adapter.

The bare redis (node-redis) package is not imported anywhere in the repository:

  • Repo-wide search for from 'redis', from "redis", require('redis'), require("redis"), import('redis'), and import("redis") (.ts/.tsx/.js/.mjs/.cjs) returned no matches.
  • Repo-wide search for the bare-string form 'redis'/"redis" returned only the Docker Compose service name in dev/local/services.ts (unrelated to the npm package) and @upstash/redis/@redis/*/@chat-adapter/state-redis references.
  • knip (already configured in apps/web) lists redis under "Unused dependencies".

Dynamic, configuration, and tooling references checked

  • No dynamic import() / require() of redis.
  • No reference in next.config.*, jest.config.*, tsconfig*.json, or any *.config.* file.
  • No reference in apps/web/package.json scripts or root scripts/*.
  • Not referenced by any apps/web/scripts/*, .mjs/.cjs helper, or Docker/tooling config.
  • Not a framework/compiler plugin, preset, loader, or code-generation tool.
  • No side-effect import or naming-convention discovery (it is not a Tailwind/PostCSS/babel/etc. plugin).

Package publication and peer-dependency considerations

  • apps/web is "private": true; it is not published, so there is no published package contract or peer-dependency surface to preserve.
  • redis was a direct runtime dependency, not a peer or optional dependency.
  • No code relies on redis types; @upstash/redis provides the client types used.

Transitive dependency check

  • redis@5.11.0 remains in the lockfile because it is a transitive dependency of @chat-adapter/state-redis (redis: 5.11.0 under @chat-adapter/state-redis@4.36.0). The lockfile diff therefore only removes the direct apps/web importer entry (3 lines) and leaves the package graph otherwise intact.
  • apps/web source never imported redis, so removing the direct declaration does not expose any undeclared transitive usage.

Validation performed

  • pnpm install (with an enlarged Node heap, since the default 2 GB heap OOMs in this constrained environment) regenerated pnpm-lock.yaml; diff is a clean 3-line removal limited to the apps/web importer's redis entry.
  • pnpm --filter web lint — 0 warnings, 0 errors.
  • pnpm --filter web typecheck (tsgo --noEmit) — passes (exit 0).
  • git diff --check — clean.

Not run in this environment (documented as a limitation, not a failure):

  • apps/web unit tests and next build were not run — they require PostgreSQL/Redis and a full environment that this resource-constrained sandbox cannot start.

Uncertainty

  • None material. redis is a clear leftover from the migration to @upstash/redis; it has no import, config, script, plugin, or peer-dependency consumer. It remains in the tree only as a transitive dependency of @chat-adapter/state-redis, which is unaffected by this change.

apps/web uses @upstash/redis for its Redis client and @chat-adapter/state-redis
for chat state. The bare redis (node-redis) package is declared directly but
never imported anywhere in the repository.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Sep 3, 2026
@kilo-code-bot

kilo-code-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • apps/web/package.json
  • pnpm-lock.yaml

Reviewed by grok-4.6 · Input: 49.2K · Output: 4.1K · Cached: 147.2K

Review guidance: REVIEW.md from base branch main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

janitor Automated dead-code/duplication cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants