[PR #6205] [MERGED] refactor(frontend): remove unreachable barrel modules #6166

Closed
opened 2026-11-02 04:06:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6205
Author: @n0ctal
Created: 8/12/2026
Status: ✅ Merged
Merged: 8/13/2026
Merged by: @MHSanaei

Base: main ← Head: codex/upstream-remove-unused-frontend-barrels


📝 Commits (2)

  • 1e72cea refactor(frontend): remove unreachable barrel modules
  • d53dccd Merge branch 'main' into codex/upstream-remove-unused-frontend-barrels

📊 Changes

7 files changed (+0 additions, -20 deletions)

View changed files

➖ frontend/src/components/feedback/index.ts (+0 -2)
➖ frontend/src/components/ui/notifications/index.ts (+0 -8)
➖ frontend/src/pages/inbounds/clients/index.ts (+0 -4)
➖ frontend/src/pages/inbounds/form/index.ts (+0 -1)
➖ frontend/src/pages/inbounds/info/index.ts (+0 -1)
➖ frontend/src/schemas/index.ts (+0 -2)
➖ frontend/src/schemas/protocols/shared/index.ts (+0 -2)

📄 Description

Summary

Seven barrel modules re-export symbols that nothing imports through them. Every consumer already imports the concrete module directly. This removes the seven files.

Why

A barrel that nobody imports is not neutral. It creates a second, equally plausible import path for the same symbol, so two files that use the same component can end up importing it two different ways. It also keeps modules alive for tools such as knip, which masks genuinely unused code behind an unused re-export.

None of the seven is imported as a directory (from '@/schemas' and friends), which is the usual reason to keep a barrel around.

Scope

Deleted, 20 lines total:

  • frontend/src/components/feedback/index.ts
  • frontend/src/components/ui/notifications/index.ts
  • frontend/src/pages/inbounds/clients/index.ts
  • frontend/src/pages/inbounds/form/index.ts
  • frontend/src/pages/inbounds/info/index.ts
  • frontend/src/schemas/index.ts
  • frontend/src/schemas/protocols/shared/index.ts

No import statement anywhere is rewritten, because no import went through these files.

Validation

  • Directory-style imports resolving to each of the seven were searched for explicitly and none exist.
  • knip output after the change no longer lists them.
  • tsc --noEmit, eslint src, vitest run (1065 tests in 112 files), production vite build: all pass.
  • make gen-check clean.

Risk

Low, and it is the kind of change tsc is good at catching: a missed consumer becomes a compile error rather than a runtime surprise. Storybook entries and src/test/* were treated as live entry points and not touched.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6205 **Author:** [@n0ctal](https://github.com/n0ctal) **Created:** 8/12/2026 **Status:** ✅ Merged **Merged:** 8/13/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `codex/upstream-remove-unused-frontend-barrels` --- ### 📝 Commits (2) - [`1e72cea`](https://github.com/MHSanaei/3x-ui/commit/1e72cea9d6ef05ecb9056d9644de9276eb9fde80) refactor(frontend): remove unreachable barrel modules - [`d53dccd`](https://github.com/MHSanaei/3x-ui/commit/d53dccd413dac004fcf8dc59023968799a2e175f) Merge branch 'main' into codex/upstream-remove-unused-frontend-barrels ### 📊 Changes **7 files changed** (+0 additions, -20 deletions) <details> <summary>View changed files</summary> ➖ `frontend/src/components/feedback/index.ts` (+0 -2) ➖ `frontend/src/components/ui/notifications/index.ts` (+0 -8) ➖ `frontend/src/pages/inbounds/clients/index.ts` (+0 -4) ➖ `frontend/src/pages/inbounds/form/index.ts` (+0 -1) ➖ `frontend/src/pages/inbounds/info/index.ts` (+0 -1) ➖ `frontend/src/schemas/index.ts` (+0 -2) ➖ `frontend/src/schemas/protocols/shared/index.ts` (+0 -2) </details> ### 📄 Description ## Summary Seven barrel modules re-export symbols that nothing imports through them. Every consumer already imports the concrete module directly. This removes the seven files. ## Why A barrel that nobody imports is not neutral. It creates a second, equally plausible import path for the same symbol, so two files that use the same component can end up importing it two different ways. It also keeps modules alive for tools such as `knip`, which masks genuinely unused code behind an unused re-export. None of the seven is imported as a directory (`from '@/schemas'` and friends), which is the usual reason to keep a barrel around. ## Scope Deleted, 20 lines total: - `frontend/src/components/feedback/index.ts` - `frontend/src/components/ui/notifications/index.ts` - `frontend/src/pages/inbounds/clients/index.ts` - `frontend/src/pages/inbounds/form/index.ts` - `frontend/src/pages/inbounds/info/index.ts` - `frontend/src/schemas/index.ts` - `frontend/src/schemas/protocols/shared/index.ts` No import statement anywhere is rewritten, because no import went through these files. ## Validation - Directory-style imports resolving to each of the seven were searched for explicitly and none exist. - `knip` output after the change no longer lists them. - `tsc --noEmit`, `eslint src`, `vitest run` (1065 tests in 112 files), production `vite build`: all pass. - `make gen-check` clean. ## Risk Low, and it is the kind of change `tsc` is good at catching: a missed consumer becomes a compile error rather than a runtime surprise. Storybook entries and `src/test/*` were treated as live entry points and not touched. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:06:50 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6166
No description provided.