Skip to content

chore(deps): remove unused dependencies and dead components - #158

Merged
zeemscript merged 1 commit into
Deen-Bridge:devfrom
eleven-smg:chore/remove-unused-deps-and-dead-components
Jul 29, 2026
Merged

chore(deps): remove unused dependencies and dead components#158
zeemscript merged 1 commit into
Deen-Bridge:devfrom
eleven-smg:chore/remove-unused-deps-and-dead-components

Conversation

@eleven-smg

@eleven-smg eleven-smg commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What

Removes two unused runtime dependencies, one dead component, and the dead exports in lib/data.js. Verified against the live dev tree rather than the line numbers in the issue, which have moved.

Dependencies

socket.io-client and react-select-country-list appear nowhere outside package.json β€” zero imports across the tree. Removed via npm uninstall, so package-lock.json drops only those two plus their transitives (engine.io-client, engine.io-parser, socket.io-parser, @socket.io/component-emitter, xmlhttprequest-ssl, and their nested debug copies). All @next/swc-* platform entries are intact, so npm ci still resolves on Linux CI.
NEXT_PUBLIC_SOCKET_URL dropped from .env.example alongside them.

Dead code

  • components/DebugAuthLogs.jsx β€” deleted; zero importers.
  • lib/data.js β€” only steps, partners, islamicCategories and data are imported anywhere in the codebase. Removed the unused links, books, spaces and usermessages exports, a large block of commented-out SpaceCard markup, and the icon imports left dangling by those removals. 530 lines.
  • Duplicate "use client" directives removed from ReelFeed.jsx and ReelCard.jsx.
    Removing links also removes the four sidebar entries pointing at /dashboard/classes, /dashboard/assignments, /dashboard/exams and /dashboard/results β€” none of which exist as routes.

Bug fixed in passing

components/molecules/errors/NotFound.jsx sent users to /dashboard/classes when the history stack was too short β€” a 404 page redirecting to another 404. Now /dashboard.
The deleted books array also contained a malformed entry (id 16 was missing its closing brace, merging it into id 17 with duplicate keys).

Judgement call for review

I did not delete components/molecules/dashboard/Notybell.jsx. It is unreferenced, but it is a complete SSE-backed notification bell built on hooks/useNotificationSSE.js, which is live in the tree. The bell actually rendered by nav-header.jsx is the placeholder at components/atoms/dashboard/Notybell.jsx. Deleting the working implementation looked like a product decision rather than cleanup, so both files now carry a header comment stating which is live and which is pending. Happy to delete it in a follow-up if the SSE bell has been abandoned.
Overlap: open PRs #118 and #119 also delete components/DebugAuthLogs.jsx. Whichever merges second will need a trivial conflict resolution.

Verification

npm run lint clean (the two remaining warnings are pre-existing, in lib/actions/cached-api.js and lib/utils/cloudinaryUpload.js, both untouched here). npm run build succeeds β€” 33 static pages generated.
Closes #84

Summary by CodeRabbit

  • Bug Fixes

    • Updated the β€œGo Back” action on dashboard not-found pages to return users to the main dashboard.
  • Removed Features

    • Removed the authentication debug-log overlay.
    • Removed unused static data and outdated interface content.
  • Chores

    • Removed obsolete configuration entries and unused packages.
    • Clarified notification bell implementation notes.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@eleven-smg is attempting to deploy a commit to the Deen Bridge Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 98cd1ecc-35d2-41c6-93dd-b123bc7298e9

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between dd25d84 and a2989bb.

β›” Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
πŸ“’ Files selected for processing (9)
  • .env.example
  • components/DebugAuthLogs.jsx
  • components/atoms/dashboard/Notybell.jsx
  • components/molecules/dashboard/Notybell.jsx
  • components/molecules/errors/NotFound.jsx
  • components/organisms/reels/ReelCard.jsx
  • components/organisms/reels/ReelFeed.jsx
  • lib/data.js
  • package.json
πŸ’€ Files with no reviewable changes (6)
  • components/DebugAuthLogs.jsx
  • components/organisms/reels/ReelFeed.jsx
  • package.json
  • .env.example
  • lib/data.js
  • components/organisms/reels/ReelCard.jsx

Walkthrough

The PR removes unused socket configuration, dependencies, static data, debug tooling, and commented UI code. It also updates dashboard fallback navigation, adjusts reels client-directive regions, and documents the relationship between notification bell implementations.

Changes

Application cleanup

Layer / File(s) Summary
Remove unused artifacts
.env.example, package.json, lib/data.js, components/DebugAuthLogs.jsx
Removes the socket URL, two dependencies, unused icon imports, three static data exports, commented UI code, and the debug authentication log component.
Update navigation and client directives
components/molecules/errors/NotFound.jsx, components/organisms/reels/ReelCard.jsx, components/organisms/reels/ReelFeed.jsx
Changes the dashboard fallback route to /dashboard and adjusts the reels client-directive regions.
Clarify notification bell ownership
components/atoms/dashboard/Notybell.jsx, components/molecules/dashboard/Notybell.jsx
Adds comments describing the active placeholder bell and the retained SSE-backed implementation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • Deen-Bridge/dnb-frontend issue 78 β€” The notification bell comments overlap with its focus on the mock and SSE notification components.

Possibly related PRs

Suggested reviewers: zeemscript

πŸš₯ Pre-merge checks | βœ… 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive Most #84 cleanup is present, but the required package-lock update can't be verified because package-lock.json was excluded by !**/package-lock.json. Please include package-lock.json in review or provide its diff so the lockfile requirement and any remaining sidebar/reels criteria can be confirmed.
βœ… 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 clearly matches the main cleanup: removing unused dependencies and dead components.
Out of Scope Changes check βœ… Passed The changes stay within the cleanup scope: dependency removal, dead-code pruning, and the dashboard redirect fix.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches πŸ’‘ 1
πŸ› οΈ Fix failing CI checks πŸ’‘
  • Fix failing CI checks
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests

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

@zeemscript
zeemscript merged commit fc806e9 into Deen-Bridge:dev Jul 29, 2026
2 of 3 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.

2 participants